mirror of
https://github.com/meisnate12/Plex-Meta-Manager
synced 2024-11-10 06:54:21 +00:00
[175] update queuess
This commit is contained in:
parent
4fe1d93720
commit
b29390e600
5 changed files with 425 additions and 50 deletions
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
|||
1.17.3-develop174
|
||||
1.17.3-develop175
|
||||
|
|
|
@ -45,25 +45,389 @@ external_templates:
|
|||
font: fonts/Inter-Bold.ttf
|
||||
font_size: 50
|
||||
final_name: text(<<final_text>>)
|
||||
|
||||
vars:
|
||||
c: &c 0
|
||||
v1: &v1 15
|
||||
v2: &v2 76
|
||||
v3: &v3 137
|
||||
v4: &v4 198
|
||||
v5: &v5 259
|
||||
vc1: &vc1 -122
|
||||
vc2: &vc2 -61
|
||||
vc3: &vc3 0
|
||||
vc4: &vc4 61
|
||||
vc5: &vc5 122
|
||||
vhc1: &vhc1 -95
|
||||
vhc2: &vhc2 95
|
||||
h1: &h1 15
|
||||
h2: &h2 206
|
||||
h3: &h3 397
|
||||
h4: &h4 588
|
||||
h5: &h5 779
|
||||
hc1: &hc1 0
|
||||
hc2: &hc2 191
|
||||
hc3: &hc3 -191
|
||||
hc4: &hc4 382
|
||||
hc5: &hc5 -382
|
||||
hvc1: &hvc1 -30
|
||||
hvc2: &hvc2 30
|
||||
|
||||
queues:
|
||||
flags:
|
||||
default:
|
||||
vertical_align: top
|
||||
horizontal_offset: 15
|
||||
vertical_offset: 15
|
||||
left:
|
||||
- horizontal_align: left
|
||||
- vertical_offset: 76
|
||||
- vertical_offset: 137
|
||||
- vertical_offset: 198
|
||||
- vertical_offset: 259
|
||||
right:
|
||||
- horizontal_align: right
|
||||
- vertical_offset: 76
|
||||
- vertical_offset: 137
|
||||
- vertical_offset: 198
|
||||
- vertical_offset: 259
|
||||
position: <<flag_alignment>>_<<vertical_position>>_<<horizontal_position>>_<<flag_position>>
|
||||
horizontal_position: left
|
||||
vertical_position: top
|
||||
flag_alignment: vertical
|
||||
flag_position: 1
|
||||
horizontal_offset: *h1
|
||||
vertical_offset: *v1
|
||||
|
||||
vertical_top_left_1:
|
||||
- vertical_align: top
|
||||
horizontal_align: left
|
||||
- vertical_offset: *v2
|
||||
- vertical_offset: *v3
|
||||
- vertical_offset: *v4
|
||||
- vertical_offset: *v5
|
||||
vertical_top_left_2:
|
||||
- vertical_align: top
|
||||
horizontal_align: left
|
||||
horizontal_offset: *h2
|
||||
- vertical_offset: *v2
|
||||
- vertical_offset: *v3
|
||||
- vertical_offset: *v4
|
||||
- vertical_offset: *v5
|
||||
vertical_center_left_1:
|
||||
- vertical_align: center
|
||||
horizontal_align: left
|
||||
vertical_offset: *vc1
|
||||
- vertical_offset: *vc2
|
||||
- vertical_offset: *vc3
|
||||
- vertical_offset: *vc4
|
||||
- vertical_offset: *vc5
|
||||
vertical_center_left_2:
|
||||
- vertical_align: center
|
||||
horizontal_align: left
|
||||
vertical_offset: *vc1
|
||||
horizontal_offset: *h2
|
||||
- vertical_offset: *vc2
|
||||
- vertical_offset: *vc3
|
||||
- vertical_offset: *vc4
|
||||
- vertical_offset: *vc5
|
||||
vertical_bottom_left_1:
|
||||
- vertical_align: bottom
|
||||
horizontal_align: left
|
||||
- vertical_offset: *v2
|
||||
- vertical_offset: *v3
|
||||
- vertical_offset: *v4
|
||||
- vertical_offset: *v5
|
||||
vertical_bottom_left_2:
|
||||
- vertical_align: bottom
|
||||
horizontal_align: left
|
||||
horizontal_offset: *h2
|
||||
- vertical_offset: *v2
|
||||
- vertical_offset: *v3
|
||||
- vertical_offset: *v4
|
||||
- vertical_offset: *v5
|
||||
|
||||
vertical_top_center_0:
|
||||
- vertical_align: top
|
||||
horizontal_align: center
|
||||
horizontal_offset: *c
|
||||
- vertical_offset: *v2
|
||||
- vertical_offset: *v3
|
||||
- vertical_offset: *v4
|
||||
- vertical_offset: *v5
|
||||
vertical_top_center_1:
|
||||
- vertical_align: top
|
||||
horizontal_align: center
|
||||
horizontal_offset: *vhc1
|
||||
- vertical_offset: *v2
|
||||
- vertical_offset: *v3
|
||||
- vertical_offset: *v4
|
||||
- vertical_offset: *v5
|
||||
vertical_top_center_2:
|
||||
- vertical_align: top
|
||||
horizontal_align: center
|
||||
horizontal_offset: *vhc2
|
||||
- vertical_offset: *v2
|
||||
- vertical_offset: *v3
|
||||
- vertical_offset: *v4
|
||||
- vertical_offset: *v5
|
||||
vertical_center_center_0:
|
||||
- vertical_align: center
|
||||
horizontal_align: center
|
||||
vertical_offset: *vc1
|
||||
horizontal_offset: *c
|
||||
- vertical_offset: *vc2
|
||||
- vertical_offset: *vc3
|
||||
- vertical_offset: *vc4
|
||||
- vertical_offset: *vc5
|
||||
vertical_center_center_1:
|
||||
- vertical_align: center
|
||||
horizontal_align: center
|
||||
vertical_offset: *vc1
|
||||
horizontal_offset: *vhc1
|
||||
- vertical_offset: *vc2
|
||||
- vertical_offset: *vc3
|
||||
- vertical_offset: *vc4
|
||||
- vertical_offset: *vc5
|
||||
vertical_center_center_2:
|
||||
- vertical_align: center
|
||||
horizontal_align: center
|
||||
vertical_offset: *vc1
|
||||
horizontal_offset: *vhc2
|
||||
- vertical_offset: *vc2
|
||||
- vertical_offset: *vc3
|
||||
- vertical_offset: *vc4
|
||||
- vertical_offset: *vc5
|
||||
vertical_bottom_center_0:
|
||||
- vertical_align: bottom
|
||||
horizontal_align: center
|
||||
horizontal_offset: *c
|
||||
- vertical_offset: *v2
|
||||
- vertical_offset: *v3
|
||||
- vertical_offset: *v4
|
||||
- vertical_offset: *v5
|
||||
vertical_bottom_center_1:
|
||||
- vertical_align: bottom
|
||||
horizontal_align: center
|
||||
horizontal_offset: *vhc1
|
||||
- vertical_offset: *v2
|
||||
- vertical_offset: *v3
|
||||
- vertical_offset: *v4
|
||||
- vertical_offset: *v5
|
||||
vertical_bottom_center_2:
|
||||
- vertical_align: bottom
|
||||
horizontal_align: center
|
||||
horizontal_offset: *vhc2
|
||||
- vertical_offset: *v2
|
||||
- vertical_offset: *v3
|
||||
- vertical_offset: *v4
|
||||
- vertical_offset: *v5
|
||||
|
||||
vertical_top_right_1:
|
||||
- vertical_align: top
|
||||
horizontal_align: right
|
||||
- vertical_offset: *v2
|
||||
- vertical_offset: *v3
|
||||
- vertical_offset: *v4
|
||||
- vertical_offset: *v5
|
||||
vertical_top_right_2:
|
||||
- vertical_align: top
|
||||
horizontal_align: right
|
||||
horizontal_offset: *h2
|
||||
- vertical_offset: *v2
|
||||
- vertical_offset: *v3
|
||||
- vertical_offset: *v4
|
||||
- vertical_offset: *v5
|
||||
vertical_center_right_1:
|
||||
- vertical_align: center
|
||||
horizontal_align: right
|
||||
vertical_offset: *vc1
|
||||
- vertical_offset: *vc2
|
||||
- vertical_offset: *vc3
|
||||
- vertical_offset: *vc4
|
||||
- vertical_offset: *vc5
|
||||
vertical_center_right_2:
|
||||
- vertical_align: center
|
||||
horizontal_align: right
|
||||
vertical_offset: *vc1
|
||||
horizontal_offset: *h2
|
||||
- vertical_offset: *vc2
|
||||
- vertical_offset: *vc3
|
||||
- vertical_offset: *vc4
|
||||
- vertical_offset: *vc5
|
||||
vertical_bottom_right_1:
|
||||
- vertical_align: bottom
|
||||
horizontal_align: right
|
||||
- vertical_offset: *v2
|
||||
- vertical_offset: *v3
|
||||
- vertical_offset: *v4
|
||||
- vertical_offset: *v5
|
||||
vertical_bottom_right_2:
|
||||
- vertical_align: bottom
|
||||
horizontal_align: right
|
||||
horizontal_offset: *h2
|
||||
- vertical_offset: *v2
|
||||
- vertical_offset: *v3
|
||||
- vertical_offset: *v4
|
||||
- vertical_offset: *v5
|
||||
|
||||
|
||||
horizontal_top_left_1:
|
||||
- vertical_align: top
|
||||
horizontal_align: left
|
||||
- horizontal_offset: *h2
|
||||
- horizontal_offset: *h3
|
||||
- horizontal_offset: *h4
|
||||
- horizontal_offset: *h5
|
||||
horizontal_top_left_2:
|
||||
- vertical_align: top
|
||||
horizontal_align: left
|
||||
vertical_offset: *v2
|
||||
- horizontal_offset: *h2
|
||||
- horizontal_offset: *h3
|
||||
- horizontal_offset: *h4
|
||||
- horizontal_offset: *h5
|
||||
horizontal_center_left_0:
|
||||
- vertical_align: center
|
||||
horizontal_align: left
|
||||
vertical_offset: *c
|
||||
- horizontal_offset: *h2
|
||||
- horizontal_offset: *h3
|
||||
- horizontal_offset: *h4
|
||||
- horizontal_offset: *h5
|
||||
horizontal_center_left_1:
|
||||
- vertical_align: center
|
||||
horizontal_align: left
|
||||
vertical_offset: *hvc1
|
||||
- horizontal_offset: *h2
|
||||
- horizontal_offset: *h3
|
||||
- horizontal_offset: *h4
|
||||
- horizontal_offset: *h5
|
||||
horizontal_center_left_2:
|
||||
- vertical_align: center
|
||||
horizontal_align: left
|
||||
vertical_offset: *hvc2
|
||||
- horizontal_offset: *h2
|
||||
- horizontal_offset: *h3
|
||||
- horizontal_offset: *h4
|
||||
- horizontal_offset: *h5
|
||||
horizontal_bottom_left_1:
|
||||
- vertical_align: bottom
|
||||
horizontal_align: left
|
||||
- horizontal_offset: *h2
|
||||
- horizontal_offset: *h3
|
||||
- horizontal_offset: *h4
|
||||
- horizontal_offset: *h5
|
||||
horizontal_bottom_left_2:
|
||||
- vertical_align: bottom
|
||||
horizontal_align: left
|
||||
vertical_offset: *v2
|
||||
- horizontal_offset: *h2
|
||||
- horizontal_offset: *h3
|
||||
- horizontal_offset: *h4
|
||||
- horizontal_offset: *h5
|
||||
|
||||
horizontal_top_center_1:
|
||||
- vertical_align: top
|
||||
horizontal_align: center
|
||||
horizontal_offset: *hc1
|
||||
- horizontal_offset: *hc2
|
||||
- horizontal_offset: *hc3
|
||||
- horizontal_offset: *hc4
|
||||
- horizontal_offset: *hc5
|
||||
horizontal_top_center_2:
|
||||
- vertical_align: top
|
||||
horizontal_align: center
|
||||
vertical_offset: *v2
|
||||
horizontal_offset: *hc1
|
||||
- horizontal_offset: *hc2
|
||||
- horizontal_offset: *hc3
|
||||
- horizontal_offset: *hc4
|
||||
- horizontal_offset: *hc5
|
||||
horizontal_center_center_0:
|
||||
- vertical_align: center
|
||||
horizontal_align: center
|
||||
vertical_offset: *c
|
||||
horizontal_offset: *hc1
|
||||
- horizontal_offset: *hc2
|
||||
- horizontal_offset: *hc3
|
||||
- horizontal_offset: *hc4
|
||||
- horizontal_offset: *hc5
|
||||
horizontal_center_center_1:
|
||||
- vertical_align: center
|
||||
horizontal_align: center
|
||||
vertical_offset: *hvc1
|
||||
horizontal_offset: *hc1
|
||||
- horizontal_offset: *hc2
|
||||
- horizontal_offset: *hc3
|
||||
- horizontal_offset: *hc4
|
||||
- horizontal_offset: *hc5
|
||||
horizontal_center_center_2:
|
||||
- vertical_align: center
|
||||
horizontal_align: center
|
||||
vertical_offset: *hvc2
|
||||
horizontal_offset: *hc1
|
||||
- horizontal_offset: *hc2
|
||||
- horizontal_offset: *hc3
|
||||
- horizontal_offset: *hc4
|
||||
- horizontal_offset: *hc5
|
||||
horizontal_bottom_center_1:
|
||||
- vertical_align: bottom
|
||||
horizontal_align: center
|
||||
horizontal_offset: *hc1
|
||||
- horizontal_offset: *hc2
|
||||
- horizontal_offset: *hc3
|
||||
- horizontal_offset: *hc4
|
||||
- horizontal_offset: *hc5
|
||||
horizontal_bottom_center_2:
|
||||
- vertical_align: bottom
|
||||
horizontal_align: center
|
||||
vertical_offset: *v2
|
||||
horizontal_offset: *hc1
|
||||
- horizontal_offset: *hc2
|
||||
- horizontal_offset: *hc3
|
||||
- horizontal_offset: *hc4
|
||||
- horizontal_offset: *hc5
|
||||
|
||||
horizontal_top_right_1:
|
||||
- vertical_align: top
|
||||
horizontal_align: right
|
||||
- horizontal_offset: *h2
|
||||
- horizontal_offset: *h3
|
||||
- horizontal_offset: *h4
|
||||
- horizontal_offset: *h5
|
||||
horizontal_top_right_2:
|
||||
- vertical_align: top
|
||||
horizontal_align: right
|
||||
vertical_offset: *v2
|
||||
- horizontal_offset: *h2
|
||||
- horizontal_offset: *h3
|
||||
- horizontal_offset: *h4
|
||||
- horizontal_offset: *h5
|
||||
horizontal_center_right_0:
|
||||
- vertical_align: center
|
||||
horizontal_align: right
|
||||
vertical_offset: *c
|
||||
- horizontal_offset: *h2
|
||||
- horizontal_offset: *h3
|
||||
- horizontal_offset: *h4
|
||||
- horizontal_offset: *h5
|
||||
horizontal_center_right_1:
|
||||
- vertical_align: center
|
||||
horizontal_align: right
|
||||
vertical_offset: *hvc1
|
||||
- horizontal_offset: *h2
|
||||
- horizontal_offset: *h3
|
||||
- horizontal_offset: *h4
|
||||
- horizontal_offset: *h5
|
||||
horizontal_center_right_2:
|
||||
- vertical_align: center
|
||||
horizontal_align: right
|
||||
vertical_offset: *hvc2
|
||||
- horizontal_offset: *h2
|
||||
- horizontal_offset: *h3
|
||||
- horizontal_offset: *h4
|
||||
- horizontal_offset: *h5
|
||||
horizontal_bottom_right_1:
|
||||
- vertical_align: bottom
|
||||
horizontal_align: right
|
||||
- horizontal_offset: *h2
|
||||
- horizontal_offset: *h3
|
||||
- horizontal_offset: *h4
|
||||
- horizontal_offset: *h5
|
||||
horizontal_bottom_right_2:
|
||||
- vertical_align: bottom
|
||||
horizontal_align: right
|
||||
vertical_offset: *v2
|
||||
- horizontal_offset: *h2
|
||||
- horizontal_offset: *h3
|
||||
- horizontal_offset: *h4
|
||||
- horizontal_offset: *h5
|
||||
|
||||
templates:
|
||||
flags:
|
||||
|
|
|
@ -114,25 +114,29 @@ Note that the `templates_variables:` section only needs to be used if you do wan
|
|||
|
||||
All [Shared Overlay Variables](variables) are available with the default values below as well as the additional Variables below which can be used to customize the file.
|
||||
|
||||
| Variable | Default |
|
||||
|:--------------------|:---------------------------:|
|
||||
| `horizontal_offset` | `15` |
|
||||
| `horizontal_align` | `left`/`right` |
|
||||
| `vertical_offset` | `15`/`76`/`137`/`198`/`259` |
|
||||
| `vertical_align` | `top` |
|
||||
| `back_color` | `#00000099` |
|
||||
| `back_radius` | `26`/` ` |
|
||||
| `back_width` | `190` |
|
||||
| `back_height` | `105` |
|
||||
| `back_align` | `left`/`right` |
|
||||
| `font` | `fonts/Inter-Bold.ttf` |
|
||||
| `font_size` | `50` |
|
||||
| Variable | Default |
|
||||
|:--------------------|:----------------------------:|
|
||||
| `horizontal_offset` | `15`/`206`/`397`/`588`/`779` |
|
||||
| `horizontal_align` | `left`/`right`/`center` |
|
||||
| `vertical_offset` | `15`/`76`/`137`/`198`/`259` |
|
||||
| `vertical_align` | `top`/`bottom`/`center` |
|
||||
| `back_color` | `#00000099` |
|
||||
| `back_radius` | `26`/` ` |
|
||||
| `back_width` | `190` |
|
||||
| `back_height` | `105` |
|
||||
| `back_align` | `left`/`right` |
|
||||
| `font` | `fonts/Inter-Bold.ttf` |
|
||||
| `font_size` | `50` |
|
||||
|
||||
| Variable | Description & Values |
|
||||
|:------------------------------|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| `position` | **Description:** Changes the position of all Overlay Queues in this File.<br>**Default:** `left`<br>**Values:** `left`, `right`, `half`, or List of Coordinates |
|
||||
| `position_audio_flags` | **Description:** Changes the position of the audio flags Overlays.<br>**Default:** `left`<br>**Values:** `left`, `right`, `half`, or List of Coordinates |
|
||||
| `position_subtitle_flags` | **Description:** Changes the position of the subtitle flags Overlays.<br>**Default:** `left`<br>**Values:** `left`, `right`, `half`, or List of Coordinates |
|
||||
| `horizontal_position` | **Description:** Choose the horizontal position for the flag group.<br>**Default:** `left`<br>**Values:** `left`, `right`, or `center` |
|
||||
| `vertical_position` | **Description:** Choose the vertical position for the flag group.<br>**Default:** `top`<br>**Values:** `top`, `bottom`, or `center` |
|
||||
| `flag_alignment` | **Description:** Choose the display alignment for the flag group.<br>**Default:** `vertical`<br>**Values:** `horizontal`, or `vertical` |
|
||||
| `flag_position` | **Description:** Choose the display position for the flag group.<br>**Default:** `1`<br>**Values:** `0`, `1`, or `2` |
|
||||
| `style` | **Description:** Controls the visual theme of the overlays created.<table class="clearTable"><tr><th>Values:</th></tr><tr><td><code>round</code></td><td>Round Theme</td></tr><tr><td><code>square</code></td><td>Square Theme</td></tr><tr><td><code>half</code></td><td>Square Flag with Round Background</td></tr></table> |
|
||||
| `offset` | **Description:** Controls the offset between the flag and the text.<br>**Default:** `10`<br>**Values:** Any Integer 0 or greater |
|
||||
| `align` | **Description:** Controls the flag alignment in the backdrop.<br>**Default:** `left`<br>**Values:** `left` or `right` |
|
||||
|
|
|
@ -86,9 +86,9 @@ All [Shared Overlay Variables](variables) can be appended by `rating1_`, `rating
|
|||
| `rating2_image` | **Description:** Choose the rating image to display in rating2.<br>**Values:** `anidb`, `imdb`, `letterboxd`, `tmdb`, `metacritic`, `rt_popcorn`, `rt_tomato`, `trakt`, or `mal` |
|
||||
| `rating3` | **Description:** Choose the rating to display in rating3.<br>**Values:** `critic`, `audience`, or `user` |
|
||||
| `rating3_image` | **Description:** Choose the rating image to display in rating3.<br>**Values:** `anidb`, `imdb`, `letterboxd`, `tmdb`, `metacritic`, `rt_popcorn`, `rt_tomato`, `trakt`, or `mal` |
|
||||
| `horizontal_position` | **Description:** Choose the horizontal position for the rating group.<br>**Values:** `left`, `right`, or `center` |
|
||||
| `vertical_position` | **Description:** Choose the vertical position for the rating group.<br>**Values:** `top`, `bottom`, or `center` |
|
||||
| `rating_alignment` | **Description:** Choose the display alignment for the rating group.<br>**Values:** `horizontal`, or `vertical` |
|
||||
| `horizontal_position` | **Description:** Choose the horizontal position for the rating group.<br>**Default:** `left`<br>**Values:** `left`, `right`, or `center` |
|
||||
| `vertical_position` | **Description:** Choose the vertical position for the rating group.<br>**Default:** `center`<br>**Values:** `top`, `bottom`, or `center` |
|
||||
| `rating_alignment` | **Description:** Choose the display alignment for the rating group.<br>**Default:** `vertical`<br>**Values:** `horizontal`, or `vertical` |
|
||||
| `font`<sup>1</sup> | **Description:** Choose the font for the Overlay.<br>**Default:** `fonts/Inter-Bold.ttf`<br>**Values:** Path to font file |
|
||||
| `font_style`<sup>1</sup> | **Description:** Font style for Variable Fonts.<br>**Values:** Variable Font Style |
|
||||
| `font_size`<sup>1</sup> | **Description:** Choose the font size for the Overlay.<br>**Default:** `63`<br>**Values:** Any Number greater then 0 |
|
||||
|
|
|
@ -1513,36 +1513,43 @@ class OverlayFile(DataFile):
|
|||
for queue_name, queue in queues.items():
|
||||
queue_position = temp_vars[f"position_{queue_name}"] if f"position_{queue_name}" in temp_vars and temp_vars[f"position_{queue_name}"] else position
|
||||
initial_queue = None
|
||||
defaults = {"horizontal_align": None, "vertical_align": None, "horizontal_offset": None, "vertical_offset": None}
|
||||
if isinstance(queue, dict) and "default" in queue and queue["default"] and isinstance(queue["default"], dict):
|
||||
for k, v in queue["default"].items():
|
||||
if k == "position":
|
||||
if not queue_position:
|
||||
queue_position = v
|
||||
else:
|
||||
defaults[k] = v
|
||||
if queue_position and isinstance(queue_position, list):
|
||||
initial_queue = queue_position
|
||||
elif queue_position and isinstance(queue, dict) and queue_position in queue:
|
||||
initial_queue = queue[queue_position]
|
||||
elif isinstance(queue, list):
|
||||
initial_queue = queue
|
||||
elif isinstance(queue, dict):
|
||||
initial_queue = next((v for k, v in queue.items() if k != "default"), None)
|
||||
if queue_position:
|
||||
pos_str = str(queue_position)
|
||||
for x in range(4):
|
||||
dict_to_use = temp_vars if x < 2 else defaults
|
||||
for k, v in dict_to_use.items():
|
||||
if f"<<{k}>>" in pos_str:
|
||||
pos_str = pos_str.replace(f"<<{k}>>", str(v))
|
||||
if pos_str in queue:
|
||||
initial_queue = queue[pos_str]
|
||||
if not initial_queue:
|
||||
initial_queue = next((v for k, v in queue.items() if k != "default"), None)
|
||||
if not isinstance(initial_queue, list):
|
||||
raise Failed(f"Config Error: queue {queue_name} must be a list")
|
||||
|
||||
def attr_scanner(attr):
|
||||
if isinstance(queue, dict) and "default" in queue and attr in queue["default"] and queue["default"][attr] is not None:
|
||||
return queue["default"][attr]
|
||||
|
||||
horizontal_align = attr_scanner("horizontal_align")
|
||||
vertical_align = attr_scanner("vertical_align")
|
||||
horizontal_offset = attr_scanner("horizontal_offset")
|
||||
vertical_offset = attr_scanner("vertical_offset")
|
||||
final_queue = []
|
||||
for pos in initial_queue:
|
||||
if not pos:
|
||||
pos = {}
|
||||
horizontal_align = pos["horizontal_align"] if "horizontal_align" in pos else horizontal_align
|
||||
vertical_align = pos["vertical_align"] if "vertical_align" in pos else vertical_align
|
||||
horizontal_offset = pos["horizontal_offset"] if "horizontal_offset" in pos else horizontal_offset
|
||||
vertical_offset = pos["vertical_offset"] if "vertical_offset" in pos else vertical_offset
|
||||
defaults["horizontal_align"] = pos["horizontal_align"] if "horizontal_align" in pos else defaults["horizontal_align"]
|
||||
defaults["vertical_align"] = pos["vertical_align"] if "vertical_align" in pos else defaults["vertical_align"]
|
||||
defaults["horizontal_offset"] = pos["horizontal_offset"] if "horizontal_offset" in pos else defaults["horizontal_offset"]
|
||||
defaults["vertical_offset"] = pos["vertical_offset"] if "vertical_offset" in pos else defaults["vertical_offset"]
|
||||
new_pos = {
|
||||
"horizontal_align": horizontal_align, "vertical_align": vertical_align,
|
||||
"horizontal_offset": horizontal_offset, "vertical_offset": vertical_offset
|
||||
"horizontal_align": defaults["horizontal_align"], "vertical_align": defaults["vertical_align"],
|
||||
"horizontal_offset": defaults["horizontal_offset"], "vertical_offset": defaults["vertical_offset"]
|
||||
}
|
||||
for pk, pv in new_pos.items():
|
||||
if pv is None:
|
||||
|
|
Loading…
Reference in a new issue