[165] update queues

pull/1145/head
meisnate12 2 years ago
parent f90040e5c4
commit a81c473b1f

@ -1 +1 @@
1.17.3-develop164 1.17.3-develop165

@ -25,32 +25,19 @@ external_templates:
queues: queues:
position: position:
default:
horizontal_offset: 30
horizontal_align: right
vertical_offset: 465
vertical_align: top
right: right:
- horizontal_offset: 30 -
horizontal_align: right - vertical_offset: 670
vertical_offset: 465 - vertical_offset: 875
vertical_align: top
- horizontal_offset: 30
horizontal_align: right
vertical_offset: 670
vertical_align: top
- horizontal_offset: 30
horizontal_align: right
vertical_offset: 875
vertical_align: top
left: left:
- horizontal_offset: 30 - horizontal_align: left
horizontal_align: left - vertical_offset: 670
vertical_offset: 465 - vertical_offset: 875
vertical_align: top
- horizontal_offset: 30
horizontal_align: left
vertical_offset: 670
vertical_align: top
- horizontal_offset: 30
horizontal_align: left
vertical_offset: 875
vertical_align: top
templates: templates:
flixpatrol: flixpatrol:

Before

Width:  |  Height:  |  Size: 4.6 KiB

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

@ -1,5 +1,5 @@
############################################################################## ##############################################################################
# Language Count Overlay # # Audio/Subtitle Language Count Overlay #
# Created by Yozora, Bullmoose20, & Sohjiro # # Created by Yozora, Bullmoose20, & Sohjiro #
# Credit to Magic815 for base images # # Credit to Magic815 for base images #
# EDITING THIS FILE MAY CAUSE PULLING NEW UPDATES TO FAIL # # EDITING THIS FILE MAY CAUSE PULLING NEW UPDATES TO FAIL #
@ -9,6 +9,12 @@
external_templates: external_templates:
pmm: templates pmm: templates
template_variables: template_variables:
conditionals:
image_key:
default: audio
conditions:
- use_subtitles: true
value: subs
group: language group: language
horizontal_offset: 0 horizontal_offset: 0
horizontal_align: center horizontal_align: center
@ -17,10 +23,16 @@ external_templates:
back_color: "#00000099" back_color: "#00000099"
back_width: 188 back_width: 188
back_height: 105 back_height: 105
pmm: <<overlay_name>> pmm: <<key>>_<<image_key>>
templates: templates:
language: language:
conditionals:
search_attribute:
default: audio_language
conditions:
- use_subtitles: true
value: subtitle_language
default: default:
minimum: 2 minimum: 2
optional: optional:
@ -28,15 +40,15 @@ templates:
ignore_blank_results: true ignore_blank_results: true
plex_all: true plex_all: true
filters: filters:
audio_language.count_gte: <<minimum>> <<search_attribute>>.count_gte: <<minimum>>
audio_language.count_lt: <<lt>> <<search_attribute>>.count_lt: <<lt>>
overlays: overlays:
Dual-Audio: Dual:
variables: {key: dual, weight: 20, lt: 3} variables: {key: dual, weight: 20, lt: 3}
template: [name: standard, name: language] template: [name: standard, name: language]
Multi-Audio: Multi:
variables: {key: multi, weight: 10} variables: {key: multi, weight: 10}
template: [name: standard, name: language] template: [name: standard, name: language]

@ -1,5 +1,5 @@
############################################################################## ##############################################################################
# Languages Overlays # # Audio/Subtitle Language Flags Overlays #
# Created by Yozora, Bullmoose20, Cpt Kuesel, & Sohjiro # # Created by Yozora, Bullmoose20, Cpt Kuesel, & Sohjiro #
# EDITING THIS FILE MAY CAUSE PULLING NEW UPDATES TO FAIL # # EDITING THIS FILE MAY CAUSE PULLING NEW UPDATES TO FAIL #
# https://metamanager.wiki/en/latest/defaults/overlays/languages.html # # https://metamanager.wiki/en/latest/defaults/overlays/languages.html #
@ -8,64 +8,57 @@
external_templates: external_templates:
pmm: templates pmm: templates
template_variables: template_variables:
conditionals:
final_text:
default: <<text>>
conditions:
- use_lowercase: true
value: <<key>>
final_style:
default: round
conditions:
- style: [square, half]
value: square
back_radius:
conditions:
- style: [round, half]
value: 26
- style: square
value:
style: round style: round
country: <<key>> country: <<key>>
queue: position queue: position
pmm: flag/<<style>>/<<country>> pmm: flag/<<final_style>>/<<country>>
addon_position: left addon_position: left
addon_offset: 5 offset: 10
addon_offset: <<offset>>
back_color: "#00000099" back_color: "#00000099"
back_width: 190 back_width: 190
back_radius: 15 back_radius: <<back_radius>>
back_align: left back_align: left
font: fonts/Inter-Bold.ttf font: fonts/Inter-Bold.ttf
font_size: 50 font_size: 50
final_name: text(<<text>>) final_name: text(<<final_text>>)
queues: queues:
position: position:
default:
horizontal_align: left
vertical_align: top
horizontal_offset: 15
vertical_offset: 15
left: left:
- horizontal_align: left -
vertical_align: top - vertical_offset: 75
horizontal_offset: 15 - vertical_offset: 135
vertical_offset: 15 - vertical_offset: 195
- horizontal_align: left - vertical_offset: 255
vertical_align: top
horizontal_offset: 15
vertical_offset: 75
- horizontal_align: left
vertical_align: top
horizontal_offset: 15
vertical_offset: 135
- horizontal_align: left
vertical_align: top
horizontal_offset: 15
vertical_offset: 195
- horizontal_align: left
vertical_align: top
horizontal_offset: 15
vertical_offset: 255
right: right:
- horizontal_align: right - horizontal_align: right
vertical_align: top - vertical_offset: 75
horizontal_offset: 15 - vertical_offset: 135
vertical_offset: 15 - vertical_offset: 195
- horizontal_align: right - vertical_offset: 255
vertical_align: top
horizontal_offset: 15
vertical_offset: 75
- horizontal_align: right
vertical_align: top
horizontal_offset: 15
vertical_offset: 135
- horizontal_align: right
vertical_align: top
horizontal_offset: 15
vertical_offset: 195
- horizontal_align: right
vertical_align: top
horizontal_offset: 15
vertical_offset: 255
templates: templates:
flags: flags:

@ -281,7 +281,8 @@ html_theme_options = {
("Direct Play Only", "defaults/overlays/direct_play"), ("Direct Play Only", "defaults/overlays/direct_play"),
("Episode Info", "defaults/overlays/episode_info"), ("Episode Info", "defaults/overlays/episode_info"),
("FlixPatrol Top", "defaults/overlays/flixpatrol"), ("FlixPatrol Top", "defaults/overlays/flixpatrol"),
("Language Count", "defaults/overlays/language_count"), ("Audio/Subtitle Language Count", "defaults/overlays/language_count"),
("Audio/Subtitle Language Flags", "defaults/overlays/languages"),
("Languages", "defaults/overlays/languages"), ("Languages", "defaults/overlays/languages"),
("MediaStinger", "defaults/overlays/mediastinger"), ("MediaStinger", "defaults/overlays/mediastinger"),
("Ratings", "defaults/overlays/ratings"), ("Ratings", "defaults/overlays/ratings"),

@ -43,7 +43,7 @@ All [Shared Collection Variables](../variables) are available as well as the add
| Variable | Description & Values | | Variable | Description & Values |
|:------------------------------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| |:------------------------------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `style ` | **Description:** Controls the visual theme of the collections created.<table class="clearTable"><tr><th>Values:</th></tr><tr><td><code>bw</code></td><td>Black & White Theme</td></tr><tr><td><code>rainier</code></td><td>Rainier Theme</td></tr></table> | | `style` | **Description:** Controls the visual theme of the collections created.<table class="clearTable"><tr><th>Values:</th></tr><tr><td><code>bw</code></td><td>Black & White Theme</td></tr><tr><td><code>rainier</code></td><td>Rainier Theme</td></tr></table> |
| `use_separator` | **Description:** Turn the [Separator Collection](../separators) off.<br>**Values:** `false` to turn of the collection | | `use_separator` | **Description:** Turn the [Separator Collection](../separators) off.<br>**Values:** `false` to turn of the collection |
| `sep_style` | **Description:** Choose the [Separator Style](../separators.md#separator-styles).<br>**Default:** `orig`<br>**Values:** `orig`, `red`, `blue`, `green`, `gray`, `purple`, or `stb` | | `sep_style` | **Description:** Choose the [Separator Style](../separators.md#separator-styles).<br>**Default:** `orig`<br>**Values:** `orig`, `red`, `blue`, `green`, `gray`, `purple`, or `stb` |
| `limit` | **Description:** Changes the Builder Limit for all collections in a Defaults file.<br>**Values:** Number Greater then 0 | | `limit` | **Description:** Changes the Builder Limit for all collections in a Defaults file.<br>**Values:** Number Greater then 0 |

@ -46,7 +46,7 @@ All [Shared Collection Variables](../variables) are available as well as the add
| Variable | Description & Values | | Variable | Description & Values |
|:------------------------------|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| |:------------------------------|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `style ` | **Description:** Controls the visual theme of the collections created.<table class="clearTable"><tr><th>Values:</th></tr><tr><td><code>default</code></td><td>Default Theme</td></tr><tr><td><code>standards</code></td><td>Standards Theme</td></tr></table> | | `style` | **Description:** Controls the visual theme of the collections created.<table class="clearTable"><tr><th>Values:</th></tr><tr><td><code>default</code></td><td>Default Theme</td></tr><tr><td><code>standards</code></td><td>Standards Theme</td></tr></table> |
| `use_separator` | **Description:** Turn the [Separator Collection](../separators) off.<br>**Values:** `false` to turn of the collection | | `use_separator` | **Description:** Turn the [Separator Collection](../separators) off.<br>**Values:** `false` to turn of the collection |
| `sep_style` | **Description:** Choose the [Separator Style](../separators.md#separator-styles).<br>**Default:** `orig`<br>**Values:** `orig`, `red`, `blue`, `green`, `gray`, `purple`, or `stb` | | `sep_style` | **Description:** Choose the [Separator Style](../separators.md#separator-styles).<br>**Default:** `orig`<br>**Values:** `orig`, `red`, `blue`, `green`, `gray`, `purple`, or `stb` |
| `limit` | **Description:** Changes the Builder Limit for all collections in a Defaults file.<br>**Values:** Number Greater then 0 | | `limit` | **Description:** Changes the Builder Limit for all collections in a Defaults file.<br>**Values:** Number Greater then 0 |

@ -43,7 +43,7 @@ All [Shared Collection Variables](../variables) are available as well as the add
|:------------------------------|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| |:------------------------------|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `use_separator` | **Description:** Turn the [Separator Collection](../separators) off.<br>**Values:** `false` to turn of the collection | | `use_separator` | **Description:** Turn the [Separator Collection](../separators) off.<br>**Values:** `false` to turn of the collection |
| `sep_style` | **Description:** Choose the [Separator Style](../separators.md#separator-styles).<br>**Default:** `orig`<br>**Values:** `orig`, `red`, `blue`, `green`, `gray`, `purple`, or `stb` | | `sep_style` | **Description:** Choose the [Separator Style](../separators.md#separator-styles).<br>**Default:** `orig`<br>**Values:** `orig`, `red`, `blue`, `green`, `gray`, `purple`, or `stb` |
| `style ` | **Description:** Controls the visual theme of the collections created<table class="clearTable"><tr><th>Values:</th></tr><tr><td><code>white</code></td><td>White Theme</td></tr><tr><td><code>color</code></td><td>Color Theme</td></tr></table> | | `style` | **Description:** Controls the visual theme of the collections created<table class="clearTable"><tr><th>Values:</th></tr><tr><td><code>white</code></td><td>White Theme</td></tr><tr><td><code>color</code></td><td>Color Theme</td></tr></table> |
| `limit` | **Description:** Changes the Builder Limit for all collections in a Defaults file.<br>**Values:** Number Greater then 0 | | `limit` | **Description:** Changes the Builder Limit for all collections in a Defaults file.<br>**Values:** Number Greater then 0 |
| `limit_<<key>>`<sup>1</sup> | **Description:** Changes the Builder Limit of the specified key's collection.<br>**Default:** `limit`<br>**Values:** Number Greater then 0 | | `limit_<<key>>`<sup>1</sup> | **Description:** Changes the Builder Limit of the specified key's collection.<br>**Default:** `limit`<br>**Values:** Number Greater then 0 |
| `sort_by` | **Description:** Changes the Smart Filter Sort for all collections in a Defaults file.<br>**Default:** `release.desc`<br>**Values:** [Any `smart_filter` Sort Option](../../metadata/builders/smart.md#sort-options) | | `sort_by` | **Description:** Changes the Smart Filter Sort for all collections in a Defaults file.<br>**Default:** `release.desc`<br>**Values:** [Any `smart_filter` Sort Option](../../metadata/builders/smart.md#sort-options) |

@ -42,7 +42,7 @@ All [Shared Collection Variables](../variables) are available as well as the add
|:------------------------------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| |:------------------------------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `use_separator` | **Description:** Turn the [Separator Collection](../separators) off.<br>**Values:** `false` to turn of the collection | | `use_separator` | **Description:** Turn the [Separator Collection](../separators) off.<br>**Values:** `false` to turn of the collection |
| `sep_style` | **Description:** Choose the [Separator Style](../separators.md#separator-styles).<br>**Default:** `orig`<br>**Values:** `orig`, `red`, `blue`, `green`, `gray`, `purple`, or `stb` | | `sep_style` | **Description:** Choose the [Separator Style](../separators.md#separator-styles).<br>**Default:** `orig`<br>**Values:** `orig`, `red`, `blue`, `green`, `gray`, `purple`, or `stb` |
| `style ` | **Description:** Controls the visual theme of the collections created<table class="clearTable"><tr><th>Values:</th></tr><tr><td><code>bw</code></td><td>Black & White Theme</td></tr><tr><td><code>rainier</code></td><td>Rainier Theme</td></tr></table> | | `style` | **Description:** Controls the visual theme of the collections created<table class="clearTable"><tr><th>Values:</th></tr><tr><td><code>bw</code></td><td>Black & White Theme</td></tr><tr><td><code>rainier</code></td><td>Rainier Theme</td></tr></table> |
| `limit` | **Description:** Changes the Builder Limit for all collections in a Defaults file.<br>**Values:** Number Greater then 0 | | `limit` | **Description:** Changes the Builder Limit for all collections in a Defaults file.<br>**Values:** Number Greater then 0 |
| `limit_<<key>>`<sup>1</sup> | **Description:** Changes the Builder Limit of the specified key's collection.<br>**Default:** `limit`<br>**Values:** Number Greater then 0 | | `limit_<<key>>`<sup>1</sup> | **Description:** Changes the Builder Limit of the specified key's collection.<br>**Default:** `limit`<br>**Values:** Number Greater then 0 |
| `sort_by` | **Description:** Changes the Smart Filter Sort for all collections in a Defaults file.<br>**Default:** `release.desc`<br>**Values:** [Any `smart_filter` Sort Option](../../metadata/builders/smart.md#sort-options) | | `sort_by` | **Description:** Changes the Smart Filter Sort for all collections in a Defaults file.<br>**Default:** `release.desc`<br>**Values:** [Any `smart_filter` Sort Option](../../metadata/builders/smart.md#sort-options) |

@ -42,7 +42,7 @@ All [Shared Collection Variables](../variables) are available as well as the add
|:------------------------------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| |:------------------------------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `use_separator` | **Description:** Turn the [Separator Collection](../separators) off.<br>**Values:** `false` to turn of the collection | | `use_separator` | **Description:** Turn the [Separator Collection](../separators) off.<br>**Values:** `false` to turn of the collection |
| `sep_style` | **Description:** Choose the [Separator Style](../separators.md#separator-styles).<br>**Default:** `orig`<br>**Values:** `orig`, `red`, `blue`, `green`, `gray`, `purple`, or `stb` | | `sep_style` | **Description:** Choose the [Separator Style](../separators.md#separator-styles).<br>**Default:** `orig`<br>**Values:** `orig`, `red`, `blue`, `green`, `gray`, `purple`, or `stb` |
| `style ` | **Description:** Controls the visual theme of the collections created<table class="clearTable"><tr><th>Values:</th></tr><tr><td><code>bw</code></td><td>Black & White Theme</td></tr><tr><td><code>rainier</code></td><td>Rainier Theme</td></tr></table> | | `style` | **Description:** Controls the visual theme of the collections created<table class="clearTable"><tr><th>Values:</th></tr><tr><td><code>bw</code></td><td>Black & White Theme</td></tr><tr><td><code>rainier</code></td><td>Rainier Theme</td></tr></table> |
| `limit` | **Description:** Changes the Builder Limit for all collections in a Defaults file.<br>**Values:** Number Greater then 0 | | `limit` | **Description:** Changes the Builder Limit for all collections in a Defaults file.<br>**Values:** Number Greater then 0 |
| `limit_<<key>>`<sup>1</sup> | **Description:** Changes the Builder Limit of the specified key's collection.<br>**Default:** `limit`<br>**Values:** Number Greater then 0 | | `limit_<<key>>`<sup>1</sup> | **Description:** Changes the Builder Limit of the specified key's collection.<br>**Default:** `limit`<br>**Values:** Number Greater then 0 |
| `sort_by` | **Description:** Changes the Smart Filter Sort for all collections in a Defaults file.<br>**Default:** `release.desc`<br>**Values:** [Any `smart_filter` Sort Option](../../metadata/builders/smart.md#sort-options) | | `sort_by` | **Description:** Changes the Smart Filter Sort for all collections in a Defaults file.<br>**Default:** `release.desc`<br>**Values:** [Any `smart_filter` Sort Option](../../metadata/builders/smart.md#sort-options) |

@ -42,7 +42,7 @@ All [Shared Collection Variables](../variables) are available as well as the add
|:------------------------------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| |:------------------------------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `use_separator` | **Description:** Turn the [Separator Collection](../separators) off.<br>**Values:** `false` to turn of the collection | | `use_separator` | **Description:** Turn the [Separator Collection](../separators) off.<br>**Values:** `false` to turn of the collection |
| `sep_style` | **Description:** Choose the [Separator Style](../separators.md#separator-styles).<br>**Default:** `orig`<br>**Values:** `orig`, `red`, `blue`, `green`, `gray`, `purple`, or `stb` | | `sep_style` | **Description:** Choose the [Separator Style](../separators.md#separator-styles).<br>**Default:** `orig`<br>**Values:** `orig`, `red`, `blue`, `green`, `gray`, `purple`, or `stb` |
| `style ` | **Description:** Controls the visual theme of the collections created<table class="clearTable"><tr><th>Values:</th></tr><tr><td><code>bw</code></td><td>Black & White Theme</td></tr><tr><td><code>rainier</code></td><td>Rainier Theme</td></tr></table> | | `style` | **Description:** Controls the visual theme of the collections created<table class="clearTable"><tr><th>Values:</th></tr><tr><td><code>bw</code></td><td>Black & White Theme</td></tr><tr><td><code>rainier</code></td><td>Rainier Theme</td></tr></table> |
| `limit` | **Description:** Changes the Builder Limit for all collections in a Defaults file.<br>**Values:** Number Greater then 0 | | `limit` | **Description:** Changes the Builder Limit for all collections in a Defaults file.<br>**Values:** Number Greater then 0 |
| `limit_<<key>>`<sup>1</sup> | **Description:** Changes the Builder Limit of the specified key's collection.<br>**Default:** `limit`<br>**Values:** Number Greater then 0 | | `limit_<<key>>`<sup>1</sup> | **Description:** Changes the Builder Limit of the specified key's collection.<br>**Default:** `limit`<br>**Values:** Number Greater then 0 |
| `sort_by` | **Description:** Changes the Smart Filter Sort for all collections in a Defaults file.<br>**Default:** `release.desc`<br>**Values:** [Any `smart_filter` Sort Option](../../metadata/builders/smart.md#sort-options) | | `sort_by` | **Description:** Changes the Smart Filter Sort for all collections in a Defaults file.<br>**Default:** `release.desc`<br>**Values:** [Any `smart_filter` Sort Option](../../metadata/builders/smart.md#sort-options) |

@ -1,19 +1,19 @@
# Audio Language Overlay # Audio/Subtitle Language Count Overlay
The `audio_language` Default Overlay File is used to create an overlay based on the number of audio languages available on each item within your library. The `language_count` Default Overlay File is used to create an overlay based on the number of audio/subtitle languages available on each item within your library.
**This file works with Movie and Show Libraries.** **This file works with Movie and Show Libraries.**
**Designed for [TRaSH Guides](https://trash-guides.info/) filename naming scheme** **Designed for [TRaSH Guides](https://trash-guides.info/) filename naming scheme**
![](images/audio_language.png) ![](images/language_count.png)
## Supported Audio Languages ## Supported Audio/Subtitle Languages
| Audio Codec | Key | Weight | | Audio/Subtitle Languages | Key | Weight |
|:------------|:-------:|:------:| |:-------------------------|:-------:|:------:|
| Dual | `dual` | `20` | | Dual | `dual` | `20` |
| Multi | `multi` | `10` | | Multi | `multi` | `10` |
## Config ## Config
@ -23,14 +23,14 @@ The below YAML in your config.yml will create the overlays:
libraries: libraries:
Movies: Movies:
overlay_path: overlay_path:
- pmm: audio_language - pmm: language_count
TV Shows: TV Shows:
overlay_path: overlay_path:
- pmm: audio_language - pmm: language_count
- pmm: audio_language - pmm: language_count
template_variables: template_variables:
overlay_level: season overlay_level: season
- pmm: audio_language - pmm: language_count
template_variables: template_variables:
overlay_level: episode overlay_level: episode
``` ```
@ -54,11 +54,12 @@ All [Shared Overlay Variables](variables) are available with the default values
| `back_width` | `188` | | `back_width` | `188` |
| `back_height` | `105` | | `back_height` | `105` |
| Variable | Description & Values | | Variable | Description & Values |
|:-----------------------------|:-------------------------------------------------------------------------------------------------------------| |:-----------------------------|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `minimum` | **Description:** Choose the minimum for the `multi` Overlay.<br>**Default:** `2` <br>**Values:** Any Number | | `use_subtitles` | **Description:** Controls if the overlay is based on subtitle language instead of audio language.<br>**Values:** `true` to look at subtitle language instead of audio language |
| `overlay_level` | **Description:** Choose the Overlay Level.<br>**Values:** `season` or `episode` | | `minimum` | **Description:** Choose the minimum for the `multi` Overlay.<br>**Default:** `2` <br>**Values:** Any Number |
| `weight_<<key>>`<sup>1</sup> | **Description:** Controls the weight of the Overlay. Higher numbers have priority.<br>**Values:** Any Number | | `overlay_level` | **Description:** Choose the Overlay Level.<br>**Values:** `season` or `episode` |
| `weight_<<key>>`<sup>1</sup> | **Description:** Controls the weight of the Overlay. Higher numbers have priority.<br>**Values:** Any Number |
1. Each default overlay has a `key` that when calling to effect a specific collection you must replace `<<key>>` with when calling. 1. Each default overlay has a `key` that when calling to effect a specific collection you must replace `<<key>>` with when calling.
@ -68,8 +69,7 @@ The below is an example config.yml extract with some Template Variables added in
libraries: libraries:
Movies: Movies:
overlay_path: overlay_path:
- pmm: audio_codec - pmm: language_count
template_variables: template_variables:
use_opus: false use_subtitles: true
use_mp3: false
``` ```

@ -1,7 +1,153 @@
| f | # Audio/Subtitle Language Flags Overlay
|:--------------------------------------------------------------------------:|
| Languages Overlays | The `languages` Default Overlay File is used to create an overlay of a flag and [ISO 639-1 Code](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) based on the audio/subtitle languages available on each item within your library.
| Created by Yozora, Bullmoose20, Cpt Kuesel, & Sohjiro |
| EDITING THIS FILE MAY CAUSE PULLING NEW UPDATES TO FAIL | **This file works with Movie and Show Libraries.**
| https://metamanager.wiki/en/latest/defaults/overlays/languages.html |
# Languages Overlays # **Designed for [TRaSH Guides](https://trash-guides.info/) filename naming scheme**
![](images/languages.png)
## Supported Audio/Subtitle Language Flags
| Audio/Subtitle Languages | Key | Weight |
|:-------------------------|:----:|:------:|
| German | `de` | `610` |
| English | `en` | `600` |
| French | `fr` | `590` |
| Japanese | `ja` | `580` |
| Korean | `ko` | `570` |
| Chinese | `zh` | `560` |
| Danish | `da` | `550` |
| Russian | `ru` | `540` |
| Spanish | `es` | `530` |
| Italian | `it` | `520` |
| Portuguese | `pt` | `510` |
| Hindi | `hi` | `500` |
| Telugu | `te` | `490` |
| Farsi | `fa` | `480` |
| Thai | `th` | `470` |
| Dutch | `nl` | `460` |
| Norwegian | `no` | `450` |
| Icelandic | `is` | `440` |
| Swedish | `sv` | `430` |
| Turkish | `tr` | `420` |
| Polish | `pl` | `410` |
| Czech | `cs` | `400` |
| Ukrainian | `uk` | `390` |
| Hungarian | `hu` | `380` |
| Arabic | `ar` | `370` |
| Bulgarian | `bg` | `360` |
| Bengali | `bn` | `350` |
| Bosnian | `bs` | `340` |
| Catalan | `ca` | `330` |
| Welsh | `cy` | `320` |
| Greek | `el` | `310` |
| Estonian | `et` | `300` |
| Basque | `eu` | `290` |
| Finnish | `fi` | `280` |
| Filipino | `fi` | `270` |
| Galician | `gl` | `260` |
| Hebrew | `he` | `250` |
| Croatian | `hr` | `240` |
| Indonesian | `id` | `230` |
| Georgian | `ka` | `220` |
| Kazakh | `kk` | `210` |
| Kannada | `kn` | `200` |
| Latin | `la` | `190` |
| Lithuanian | `lt` | `180` |
| Latvian | `lv` | `170` |
| Macedonian | `mk` | `160` |
| Malayalam | `ml` | `150` |
| Marathi | `mr` | `140` |
| Malay | `ms` | `130` |
| Norwegian Nokmål | `nb` | `120` |
| Norwegian Nynorsk | `nn` | `110` |
| Punjabi | `pa` | `100` |
| Romanian | `ro` | `90` |
| Slovak | `sk` | `80` |
| Slovenian | `sv` | `70` |
| Albanian | `sq` | `60` |
| Serbian | `sr` | `50` |
| Swahili | `sw` | `40` |
| Tamil | `ta` | `30` |
| Urdu | `ur` | `20` |
| Vietnamese | `vi` | `10` |
#### Square Style
Below is a screenshot of the alternative Square (`square`) style which can be set via the `style` template variable.
![](../images/languages2.png)
#### Half Style
Below is a screenshot of the alternative Half (`half`) style which can be set via the `style` template variable.
![](../images/languages3.png)
## Config
The below YAML in your config.yml will create the overlays:
```yaml
libraries:
Movies:
overlay_path:
- pmm: languages
TV Shows:
overlay_path:
- pmm: languages
- pmm: languages
template_variables:
overlay_level: season
- pmm: languages
template_variables:
overlay_level: episode
```
## Template Variables
Template Variables can be used to manipulate the file in various ways to slightly change how it works without having to make your own local copy.
Note that the `templates_variables:` section only needs to be used if you do want to actually change how the defaults work. Any value not specified is its default value if it has one if not it's just ignored.
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`/`75`/`135`/`195`/`255` |
| `vertical_align` | `top` |
| `back_color` | `#00000099` |
| `back_radius` | `26`/`` |
| `back_width` | `190` |
| `back_height` | `105` |
| `back_align` | `left` |
| `font` | `fonts/Inter-Bold.ttf` |
| `font_size` | `50` |
| Variable | Description & Values |
|:-----------------------------|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `position` | **Description:** Changes the position of the Overlays.<br>**Default:** `left`<br>**Values:** `left`, `right`, `half`, or List of Coordinates |
| `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 |
| `use_lowercase` | **Description:** Controls if the overlay display is in lowercase.<br>**Values:** `true` to use lowercase text |
| `use_subtitles` | **Description:** Controls if the overlay is based on subtitle language instead of audio language.<br>**Values:** `true` to look at subtitle language instead of audio language |
| `overlay_level` | **Description:** Choose the Overlay Level.<br>**Values:** `season` or `episode` |
| `weight_<<key>>`<sup>1</sup> | **Description:** Controls the weight of the Overlay. Higher numbers have priority.<br>**Values:** Any Number |
1. Each default overlay has a `key` that when calling to effect a specific collection you must replace `<<key>>` with when calling.
The below is an example config.yml extract with some Template Variables added in to change how the file works.
```yaml
libraries:
Movies:
overlay_path:
- pmm: languages
template_variables:
use_subtitles: true
style: square
```

@ -43,7 +43,7 @@ All [Shared Collection Variables](../variables) are available as well as the add
|:------------------------------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| |:------------------------------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `use_separator` | **Description:** Turn the [Separator Collection](../separators) off.<br>**Values:** `false` to turn of the collection | | `use_separator` | **Description:** Turn the [Separator Collection](../separators) off.<br>**Values:** `false` to turn of the collection |
| `sep_style` | **Description:** Choose the [Separator Style](../separators.md#separator-styles).<br>**Default:** `orig`<br>**Values:** `orig`, `red`, `blue`, `green`, `gray`, `purple`, or `stb` | | `sep_style` | **Description:** Choose the [Separator Style](../separators.md#separator-styles).<br>**Default:** `orig`<br>**Values:** `orig`, `red`, `blue`, `green`, `gray`, `purple`, or `stb` |
| `style ` | **Description:** Controls the visual theme of the collections created<table class="clearTable"><tr><th>Values:</th></tr><tr><td><code>white</code></td><td>White Theme</td></tr><tr><td><code>color</code></td><td>Color Theme</td></tr></table> | | `style` | **Description:** Controls the visual theme of the collections created<table class="clearTable"><tr><th>Values:</th></tr><tr><td><code>white</code></td><td>White Theme</td></tr><tr><td><code>color</code></td><td>Color Theme</td></tr></table> |
| `limit` | **Description:** Changes the Builder Limit for all collections in a Defaults file.<br>**Values:** Number Greater then 0 | | `limit` | **Description:** Changes the Builder Limit for all collections in a Defaults file.<br>**Values:** Number Greater then 0 |
| `limit_<<key>>`<sup>1</sup> | **Description:** Changes the Builder Limit of the specified key's collection.<br>**Default:** `limit`<br>**Values:** Number Greater then 0 | | `limit_<<key>>`<sup>1</sup> | **Description:** Changes the Builder Limit of the specified key's collection.<br>**Default:** `limit`<br>**Values:** Number Greater then 0 |
| `sort_by` | **Description:** Changes the Smart Filter Sort for all collections in a Defaults file.<br>**Default:** `release.desc`<br>**Values:** [Any `smart_filter` Sort Option](../../metadata/builders/smart.md#sort-options) | | `sort_by` | **Description:** Changes the Smart Filter Sort for all collections in a Defaults file.<br>**Default:** `release.desc`<br>**Values:** [Any `smart_filter` Sort Option](../../metadata/builders/smart.md#sort-options) |

@ -1498,16 +1498,47 @@ class OverlayFile(DataFile):
queues = get_dict("queues", data, library.queue_names) queues = get_dict("queues", data, library.queue_names)
self.queues = {} self.queues = {}
for queue_name, queue in queues.items(): for queue_name, queue in queues.items():
initial_queue = None
if isinstance(queue, list): if isinstance(queue, list):
self.queues[queue_name] = queue initial_queue = queue
elif queue_name in temp_vars and temp_vars[queue_name] and isinstance(temp_vars[queue_name], list): elif queue_name in temp_vars and temp_vars[queue_name] and isinstance(temp_vars[queue_name], list):
self.queues[queue_name] = temp_vars[queue_name] initial_queue = temp_vars[queue_name]
elif queue_name in temp_vars and temp_vars[queue_name] and temp_vars[queue_name] in queue: elif queue_name in temp_vars and temp_vars[queue_name] and temp_vars[queue_name] in queue:
self.queues[queue_name] = queue[temp_vars[queue_name]] initial_queue = queue[temp_vars[queue_name]]
elif isinstance(queue, dict): elif isinstance(queue, dict):
for dq, dv in queue.items(): for dk, dv in queue.items():
self.queues[queue_name] = dv if dk != "default":
break initial_queue = dv
break
if initial_queue is None:
raise Failed(f"Config Error: queue {queue_name} must be a list or dictionary")
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 = {}
new_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
}
for pk, pv in new_pos.items():
if pv is None:
raise Failed(f"Config Error: queue missing {pv} attribute")
final_queue.append(new_pos)
self.queues[queue_name] = final_queue
self.external_templates(data, overlay=True) self.external_templates(data, overlay=True)
self.translation_files(data, overlay=True) self.translation_files(data, overlay=True)
if not self.overlays: if not self.overlays:

@ -195,8 +195,8 @@ class Overlay:
except ValueError: except ValueError:
raise Failed(f"Overlay Error: overlay {attr}: {self.data[attr]} invalid") raise Failed(f"Overlay Error: overlay {attr}: {self.data[attr]} invalid")
self.back_color = color("back_color") self.back_color = color("back_color")
self.back_radius = util.parse("Overlay", "back_radius", self.data["back_radius"], datatype="int", parent="overlay") if "back_radius" in self.data else None self.back_radius = util.parse("Overlay", "back_radius", self.data["back_radius"], datatype="int", parent="overlay") if "back_radius" in self.data and self.data["back_radius"] else None
self.back_line_width = util.parse("Overlay", "back_line_width", self.data["back_line_width"], datatype="int", parent="overlay") if "back_line_width" in self.data else None self.back_line_width = util.parse("Overlay", "back_line_width", self.data["back_line_width"], datatype="int", parent="overlay") if "back_line_width" in self.data and self.data["back_line_width"] else None
self.back_line_color = color("back_line_color") self.back_line_color = color("back_line_color")
self.back_padding = util.parse("Overlay", "back_padding", self.data["back_padding"], datatype="int", parent="overlay", default=0) if "back_padding" in self.data else 0 self.back_padding = util.parse("Overlay", "back_padding", self.data["back_padding"], datatype="int", parent="overlay", default=0) if "back_padding" in self.data else 0
self.back_align = util.parse("Overlay", "back_align", self.data["back_align"], parent="overlay", default="center", options=["left", "right", "center", "top", "bottom"]) if "back_align" in self.data else "center" self.back_align = util.parse("Overlay", "back_align", self.data["back_align"], parent="overlay", default="center", options=["left", "right", "center", "top", "bottom"]) if "back_align" in self.data else "center"

@ -756,9 +756,9 @@ def parse(error, attribute, data, datatype=None, methods=None, parent=None, defa
if start and end and start < end: if start and end and start < end:
return f"{start}{range_split}{end}" return f"{start}{range_split}{end}"
else: else:
value = check_int(value, datatype=datatype, minimum=minimum, maximum=maximum) new_value = check_int(value, datatype=datatype, minimum=minimum, maximum=maximum)
if value is not None: if new_value is not None:
return value return new_value
message = f"{display} {value} must {'each ' if range_split else ''}be {'an integer' if datatype == 'int' else 'a number'}" message = f"{display} {value} must {'each ' if range_split else ''}be {'an integer' if datatype == 'int' else 'a number'}"
message = f"{message} {minimum} or greater" if maximum is None else f"{message} between {minimum} and {maximum}" message = f"{message} {minimum} or greater" if maximum is None else f"{message} between {minimum} and {maximum}"
if range_split: if range_split:

Loading…
Cancel
Save