[159] update how translations work

pull/1357/head
meisnate12 2 years ago
parent fcd2e94a9e
commit 7e25b6c5f7

@ -1 +1 @@
1.18.3-develop158 1.18.3-develop159

@ -11,9 +11,6 @@ external_templates:
template_variables: template_variables:
collection_section: 130 collection_section: 130
translations:
pmm: translations
collections: collections:
BAFTA Best Films: BAFTA Best Films:
variables: variables:
@ -23,10 +20,9 @@ collections:
sort: BAFTA ! sort: BAFTA !
allowed_libraries: movie allowed_libraries: movie
image: award/bafta/winner image: award/bafta/winner
translation_key: bafta_best
- name: arr - name: arr
- name: custom - name: custom
- name: translation
translation_key: bafta_best
trakt_list: https://trakt.tv/users/maxwelldeux/lists/bafta-award-best-film trakt_list: https://trakt.tv/users/maxwelldeux/lists/bafta-award-best-film
dynamic_collections: dynamic_collections:
@ -40,7 +36,6 @@ dynamic_collections:
template: template:
- use_year_collections - use_year_collections
- trakt - trakt
- translation
- shared - shared
- arr - arr
- custom - custom

@ -11,9 +11,6 @@ external_templates:
template_variables: template_variables:
collection_section: 130 collection_section: 130
translations:
pmm: translations
collections: collections:
Cannes Golden Palm Winners: Cannes Golden Palm Winners:
variables: variables:
@ -23,10 +20,9 @@ collections:
sort: Cannes ! sort: Cannes !
allowed_libraries: movie allowed_libraries: movie
image: award/cannes/winner image: award/cannes/winner
translation_key: cannes_best
- name: arr - name: arr
- name: custom - name: custom
- name: translation
translation_key: cannes_best
trakt_list: https://trakt.tv/users/maxwelldeux/lists/cannes-film-festival-palme-d-or trakt_list: https://trakt.tv/users/maxwelldeux/lists/cannes-film-festival-palme-d-or
dynamic_collections: dynamic_collections:
@ -40,7 +36,6 @@ dynamic_collections:
template: template:
- use_year_collections - use_year_collections
- trakt - trakt
- translation
- shared - shared
- arr - arr
- custom - custom

@ -11,9 +11,6 @@ external_templates:
template_variables: template_variables:
collection_section: 130 collection_section: 130
translations:
pmm: translations
dynamic_collections: dynamic_collections:
Critics Choice Awards: Critics Choice Awards:
type: number type: number
@ -25,7 +22,6 @@ dynamic_collections:
template: template:
- use_year_collections - use_year_collections
- trakt - trakt
- translation
- shared - shared
- arr - arr
- custom - custom

@ -10,9 +10,6 @@ external_templates:
template_variables: template_variables:
collection_section: 130 collection_section: 130
translations:
pmm: translations
dynamic_collections: dynamic_collections:
Emmy Awards: Emmy Awards:
type: number type: number

@ -11,9 +11,6 @@ external_templates:
template_variables: template_variables:
collection_section: 130 collection_section: 130
translations:
pmm: translations
collections: collections:
Golden Globes Best Picture Winners: Golden Globes Best Picture Winners:
variables: variables:
@ -23,11 +20,10 @@ collections:
sort: Golden Globes !1 sort: Golden Globes !1
allowed_libraries: movie allowed_libraries: movie
image: award/golden/best_picture_winner image: award/golden/best_picture_winner
translation_key: golden_best
- name: arr - name: arr
- name: custom - name: custom
collection_order: release.desc collection_order: release.desc
- name: translation
translation_key: golden_best
delete_collections_named: delete_collections_named:
- Golden Globe Best Motion Pictures - Golden Globe Best Motion Pictures
tmdb_list: tmdb_list:
@ -43,10 +39,9 @@ collections:
sort: Golden Globes !2 sort: Golden Globes !2
allowed_libraries: movie allowed_libraries: movie
image: award/golden/best_director_winner image: award/golden/best_director_winner
translation_key: golden_director
- name: arr - name: arr
- name: custom - name: custom
- name: translation
translation_key: golden_director
tmdb_list: 8235502 tmdb_list: 8235502
dynamic_collections: dynamic_collections:
@ -60,7 +55,6 @@ dynamic_collections:
template: template:
- use_year_collections - use_year_collections
- imdb - imdb
- translation
- shared - shared
- arr - arr
- custom - custom

@ -10,9 +10,6 @@ external_templates:
template_variables: template_variables:
collection_section: 130 collection_section: 130
translations:
pmm: translations
collections: collections:
Oscars Best Picture Winners: Oscars Best Picture Winners:
variables: variables:
@ -22,10 +19,9 @@ collections:
sort: Oscars !1 sort: Oscars !1
allowed_libraries: movie allowed_libraries: movie
image: award/oscars/best_picture_winner image: award/oscars/best_picture_winner
translation_key: oscars_picture
- name: arr - name: arr
- name: custom - name: custom
- name: translation
translation_key: oscars_picture
imdb_list: https://www.imdb.com/search/title/?groups=best_picture_winner imdb_list: https://www.imdb.com/search/title/?groups=best_picture_winner
Oscars Best Director Winners: Oscars Best Director Winners:
@ -36,10 +32,9 @@ collections:
sort: Oscars !2 sort: Oscars !2
allowed_libraries: movie allowed_libraries: movie
image: award/oscars/best_director_winner image: award/oscars/best_director_winner
translation_key: oscars_director
- name: arr - name: arr
- name: custom - name: custom
- name: translation
translation_key: oscars_director
imdb_list: https://www.imdb.com/search/title/?groups=best_director_winner imdb_list: https://www.imdb.com/search/title/?groups=best_director_winner
dynamic_collections: dynamic_collections:
@ -53,7 +48,6 @@ dynamic_collections:
template: template:
- use_year_collections - use_year_collections
- imdb - imdb
- translation
- shared - shared
- arr - arr
- custom - custom

@ -11,9 +11,6 @@ external_templates:
template_variables: template_variables:
collection_section: 130 collection_section: 130
translations:
pmm: translations
collections: collections:
Berlinale Golden Bears: Berlinale Golden Bears:
variables: variables:
@ -22,10 +19,9 @@ collections:
- name: shared - name: shared
allowed_libraries: movie allowed_libraries: movie
image: award/berlinale/winner image: award/berlinale/winner
translation_key: berlinale_best
- name: arr - name: arr
- name: custom - name: custom
- name: translation
translation_key: berlinale_best
trakt_list: https://trakt.tv/users/maxwelldeux/lists/berlin-international-film-festival-golden-bears trakt_list: https://trakt.tv/users/maxwelldeux/lists/berlin-international-film-festival-golden-bears
César Best Film Winners: César Best Film Winners:
@ -35,10 +31,9 @@ collections:
- name: shared - name: shared
allowed_libraries: movie allowed_libraries: movie
image: award/cesar/winner image: award/cesar/winner
translation_key: cesar_best
- name: arr - name: arr
- name: custom - name: custom
- name: translation
translation_key: cesar_best
trakt_list: https://trakt.tv/users/maxwelldeux/lists/cesar-award-best-french-film trakt_list: https://trakt.tv/users/maxwelldeux/lists/cesar-award-best-french-film
Razzies Golden Raspberry Winners: Razzies Golden Raspberry Winners:
@ -48,10 +43,9 @@ collections:
- name: shared - name: shared
allowed_libraries: movie allowed_libraries: movie
image: award/razzies/winner image: award/razzies/winner
translation_key: razzie_worst
- name: arr - name: arr
- name: custom - name: custom
- name: translation
translation_key: razzie_worst
trakt_list: https://trakt.tv/users/hdlists/lists/razzie-awards-worst-picture-winners trakt_list: https://trakt.tv/users/hdlists/lists/razzie-awards-worst-picture-winners
Venice Golden Lions: Venice Golden Lions:
@ -61,8 +55,7 @@ collections:
- name: shared - name: shared
allowed_libraries: movie allowed_libraries: movie
image: award/venice/winner image: award/venice/winner
translation_key: venice_best
- name: arr - name: arr
- name: custom - name: custom
- name: translation
translation_key: venice_best
trakt_list: https://trakt.tv/users/maxwelldeux/lists/venice-film-festival-golden-lion trakt_list: https://trakt.tv/users/maxwelldeux/lists/venice-film-festival-golden-lion

@ -10,14 +10,10 @@ external_templates:
template_variables: template_variables:
collection_section: 130 collection_section: 130
translations:
pmm: translations
collections: collections:
Award Collections: Award Collections:
template: template:
- name: separator - name: separator
separator: award separator: award
- name: translation
key_name: Award key_name: Award
translation_key: separator translation_key: separator

@ -11,9 +11,6 @@ external_templates:
template_variables: template_variables:
collection_section: 130 collection_section: 130
translations:
pmm: translations
dynamic_collections: dynamic_collections:
Independent Spirit Awards Awards: Independent Spirit Awards Awards:
type: number type: number
@ -25,7 +22,6 @@ dynamic_collections:
template: template:
- use_year_collections - use_year_collections
- trakt - trakt
- translation
- shared - shared
- arr - arr
- custom - custom

@ -11,9 +11,6 @@ external_templates:
template_variables: template_variables:
collection_section: 130 collection_section: 130
translations:
pmm: translations
collections: collections:
Sundance Grand Jury Winners: Sundance Grand Jury Winners:
variables: variables:
@ -23,10 +20,9 @@ collections:
sort: Sundance !1 sort: Sundance !1
allowed_libraries: movie allowed_libraries: movie
image: award/sundance/grand_jury_winner image: award/sundance/grand_jury_winner
translation_key: sundance_best
- name: arr - name: arr
- name: custom - name: custom
- name: translation
translation_key: sundance_best
trakt_list_details: https://trakt.tv/users/maxwelldeux/lists/sundance-film-festival-grand-jury-prize trakt_list_details: https://trakt.tv/users/maxwelldeux/lists/sundance-film-festival-grand-jury-prize
dynamic_collections: dynamic_collections:
@ -40,7 +36,6 @@ dynamic_collections:
template: template:
- use_year_collections - use_year_collections
- trakt - trakt
- translation
- shared - shared
- arr - arr
- custom - custom

@ -10,15 +10,11 @@ external_templates:
template_variables: template_variables:
collection_section: "140" collection_section: "140"
translations:
pmm: translations
collections: collections:
Actors Collections: Actors Collections:
template: template:
- name: separator - name: separator
separator: actor separator: actor
- name: translation
key_name: Actors key_name: Actors
translation_key: separator translation_key: separator
@ -32,7 +28,6 @@ dynamic_collections:
template: template:
- tmdb_person - tmdb_person
- smart_filter - smart_filter
- translation
- shared - shared
template_variables: template_variables:
tmdb_person: tmdb_person:

@ -10,15 +10,11 @@ external_templates:
template_variables: template_variables:
collection_section: "090" collection_section: "090"
translations:
pmm: translations
collections: collections:
Audio Language Collections: Audio Language Collections:
template: template:
- name: separator - name: separator
separator: audio_language separator: audio_language
- name: translation
key_name: Audio Language key_name: Audio Language
translation_key: separator translation_key: separator
@ -29,12 +25,10 @@ dynamic_collections:
other_name: Other Audio other_name: Other Audio
template: template:
- smart_filter - smart_filter
- translation
- shared - shared
other_template: other_template:
- other_collection - other_collection
- smart_filter - smart_filter
- translation
- shared - shared
template_variables: template_variables:
search_term: search_term:

@ -10,15 +10,11 @@ external_templates:
template_variables: template_variables:
collection_section: "085" collection_section: "085"
translations:
pmm: translations
collections: collections:
Based On... Collections: Based On... Collections:
template: template:
- name: separator - name: separator
separator: based separator: based
- name: translation
key_name: Based On... key_name: Based On...
translation_key: separator translation_key: separator
@ -33,7 +29,6 @@ dynamic_collections:
title_format: Based on a <<key_name>> title_format: Based on a <<key_name>>
template: template:
- mdb_smart - mdb_smart
- translation
- shared - shared
- arr - arr
template_variables: template_variables:

@ -5,23 +5,43 @@
# https://metamanager.wiki/en/latest/defaults/both/collectionless.html # # https://metamanager.wiki/en/latest/defaults/both/collectionless.html #
############################################################################## ##############################################################################
translations:
pmm: translations
templates: templates:
collectionless: collectionless:
default: default:
exclude_prefix: exclude_prefix:
- "!" - "!"
- "~" - "~"
summary_collectionless: <<collectionless_summary>>
name_collectionless: <<collectionless_name>>
sort_title: ~_Collectionless sort_title: ~_Collectionless
collection_order: alpha collection_order: alpha
url_poster: https://raw.githubusercontent.com/meisnate12/Plex-Meta-Manager-Images/master/collectionless.jpg url_poster: https://raw.githubusercontent.com/meisnate12/Plex-Meta-Manager-Images/master/collectionless.jpg
optional: optional:
- collection_mode - collection_mode
- exclude - exclude
- summary_collectionless
- name_collectionless
- tmdb_movie
- tmdb_show
- tmdb_list
- tvdb_movie
- tvdb_show
- tvdb_list
- imdb_id
- imdb_list
- plex_search
- mdblist_list
- trakt_list
tmdb_movie: <<tmdb_movie>>
tmdb_show: <<tmdb_show>>
tmdb_list: <<tmdb_list>>
tvdb_movie: <<tvdb_movie>>
tvdb_show: <<tvdb_show>>
tvdb_list: <<tvmdb_list>>
imdb_id: <<imdb_id>>
imdb_list: <<imdb_list>>
plex_search: <<plex_search>>
mdblist_list: <<mdblist_list>>
trakt_list: <<trakt_list>>
translation_key: collectionless
url_poster: <<url_poster>> url_poster: <<url_poster>>
collection_order: <<collection_order>> collection_order: <<collection_order>>
sort_title: <<sort_title>> sort_title: <<sort_title>>

@ -10,15 +10,11 @@ external_templates:
template_variables: template_variables:
collection_section: "110" collection_section: "110"
translations:
pmm: translations
collections: collections:
Ratings Collections: Ratings Collections:
template: template:
- name: separator - name: separator
separator: content_rating separator: content_rating
- name: translation
key_name: Ratings key_name: Ratings
translation_key: separator translation_key: separator
@ -29,12 +25,10 @@ dynamic_collections:
other_name: Not Rated <<library_typeU>>s other_name: Not Rated <<library_typeU>>s
template: template:
- smart_filter - smart_filter
- translation
- shared - shared
other_template: other_template:
- other_collection - other_collection
- smart_filter - smart_filter
- translation
- shared - shared
template_variables: template_variables:
search_term: search_term:

@ -10,15 +10,11 @@ external_templates:
template_variables: template_variables:
collection_section: "110" collection_section: "110"
translations:
pmm: translations
collections: collections:
Ratings Collections: Ratings Collections:
template: template:
- name: separator - name: separator
separator: content_rating separator: content_rating
- name: translation
key_name: Ratings key_name: Ratings
translation_key: separator translation_key: separator
@ -29,12 +25,10 @@ dynamic_collections:
other_name: Not Rated <<library_typeU>>s other_name: Not Rated <<library_typeU>>s
template: template:
- smart_filter - smart_filter
- translation
- shared - shared
other_template: other_template:
- other_collection - other_collection
- smart_filter - smart_filter
- translation
- shared - shared
template_variables: template_variables:
search_term: search_term:

@ -10,15 +10,11 @@ external_templates:
template_variables: template_variables:
collection_section: "110" collection_section: "110"
translations:
pmm: translations
collections: collections:
Ratings Collections: Ratings Collections:
template: template:
- name: separator - name: separator
separator: content_rating separator: content_rating
- name: translation
key_name: Ratings key_name: Ratings
translation_key: separator translation_key: separator
@ -29,12 +25,10 @@ dynamic_collections:
other_name: Not Rated <<library_typeU>>s other_name: Not Rated <<library_typeU>>s
template: template:
- smart_filter - smart_filter
- translation
- shared - shared
other_template: other_template:
- other_collection - other_collection
- smart_filter - smart_filter
- translation
- shared - shared
template_variables: template_variables:
search_term: search_term:

@ -10,15 +10,11 @@ external_templates:
template_variables: template_variables:
collection_section: "060" collection_section: "060"
translations:
pmm: translations
collections: collections:
Genre Collections: Genre Collections:
template: template:
- name: separator - name: separator
separator: genre separator: genre
- name: translation
key_name: Genre key_name: Genre
translation_key: separator translation_key: separator
@ -28,7 +24,6 @@ dynamic_collections:
title_format: <<key_name>> <<library_typeU>>s title_format: <<key_name>> <<library_typeU>>s
template: template:
- smart_filter - smart_filter
- translation
- shared - shared
template_variables: template_variables:
search_term: search_term:

@ -30,15 +30,11 @@ external_templates:
key: 4k key: 4k
value: Ultra HD value: Ultra HD
translations:
pmm: translations
collections: collections:
Resolution Collections: Resolution Collections:
template: template:
- name: separator - name: separator
separator: resolution separator: resolution
- name: translation
key_name: Resolution key_name: Resolution
translation_key: separator translation_key: separator
@ -49,12 +45,10 @@ dynamic_collections:
other_name: Other Resolutions <<library_typeU>>s other_name: Other Resolutions <<library_typeU>>s
template: template:
- smart_filter - smart_filter
- translation
- shared - shared
other_template: other_template:
- other_collection - other_collection
- smart_filter - smart_filter
- translation
- shared - shared
template_variables: template_variables:
search_term: search_term:

@ -10,9 +10,6 @@ external_templates:
template_variables: template_variables:
collection_section: "030" collection_section: "030"
translations:
pmm: translations
templates: templates:
mdb_streaming: mdb_streaming:
optional: optional:
@ -76,7 +73,6 @@ collections:
template: template:
- name: separator - name: separator
separator: streaming separator: streaming
- name: translation
key_name: Streaming key_name: Streaming
translation_key: separator translation_key: separator
@ -104,7 +100,6 @@ dynamic_collections:
title_format: <<key_name>> <<library_typeU>>s title_format: <<key_name>> <<library_typeU>>s
template: template:
- mdb_streaming - mdb_streaming
- translation
- shared - shared
- arr - arr
template_variables: template_variables:

@ -10,15 +10,11 @@ external_templates:
template_variables: template_variables:
collection_section: "070" collection_section: "070"
translations:
pmm: translations
collections: collections:
Studio Collections: Studio Collections:
template: template:
- name: separator - name: separator
separator: studio separator: studio
- name: translation
key_name: Studio key_name: Studio
translation_key: separator translation_key: separator
@ -28,7 +24,6 @@ dynamic_collections:
title_format: <<key_name>> title_format: <<key_name>>
template: template:
- smart_filter - smart_filter
- translation
- shared - shared
template_variables: template_variables:
search_term: search_term:

@ -10,15 +10,11 @@ external_templates:
template_variables: template_variables:
collection_section: "070" collection_section: "070"
translations:
pmm: translations
collections: collections:
Anime Collections: Anime Collections:
template: template:
- name: separator - name: separator
separator: studio separator: studio
- name: translation
key_name: Studio key_name: Studio
translation_key: separator translation_key: separator
@ -28,7 +24,6 @@ dynamic_collections:
title_format: <<key_name>> title_format: <<key_name>>
template: template:
- smart_filter - smart_filter
- translation
- shared - shared
template_variables: template_variables:
search_term: search_term:

@ -10,15 +10,11 @@ external_templates:
template_variables: template_variables:
collection_section: "095" collection_section: "095"
translations:
pmm: translations
collections: collections:
Subtitle Language Collections: Subtitle Language Collections:
template: template:
- name: separator - name: separator
separator: subtitle_language separator: subtitle_language
- name: translation
key_name: Subtitle Language key_name: Subtitle Language
translation_key: separator translation_key: separator
@ -29,12 +25,10 @@ dynamic_collections:
other_name: Other Subtitles other_name: Other Subtitles
template: template:
- smart_filter - smart_filter
- translation
- shared - shared
other_template: other_template:
- other_collection - other_collection
- smart_filter - smart_filter
- translation
- shared - shared
template_variables: template_variables:
search_term: search_term:

@ -10,9 +10,6 @@ external_templates:
template_variables: template_variables:
collection_section: "040" collection_section: "040"
translations:
pmm: translations
templates: templates:
universe: universe:
conditionals: conditionals:
@ -41,7 +38,6 @@ collections:
template: template:
- name: separator - name: separator
separator: universe separator: universe
- name: translation
key_name: Universe key_name: Universe
translation_key: separator translation_key: separator
@ -68,7 +64,6 @@ dynamic_collections:
- universe - universe
- arr - arr
- custom - custom
- translation
- shared - shared
template_variables: template_variables:
allowed_libraries: allowed_libraries:

@ -10,15 +10,11 @@ external_templates:
template_variables: template_variables:
collection_section: "105" collection_section: "105"
translations:
pmm: translations
collections: collections:
Year Collections: Year Collections:
template: template:
- name: separator - name: separator
separator: year separator: year
- name: translation
key_name: Year key_name: Year
translation_key: separator translation_key: separator
@ -32,7 +28,6 @@ dynamic_collections:
title_format: Best of <<key_name>> title_format: Best of <<key_name>>
template: template:
- smart_filter - smart_filter
- translation
- shared - shared
template_variables: template_variables:
search_term: search_term:

@ -11,9 +11,6 @@ external_templates:
collection_section: "020" collection_section: "020"
image: chart/<<collection_name_encoded>> image: chart/<<collection_name_encoded>>
translations:
pmm: translations
templates: templates:
anilist: anilist:
default: default:
@ -39,10 +36,9 @@ collections:
template: template:
- name: anilist - name: anilist
- name: shared - name: shared
translation_key: anilist_popular
- name: arr - name: arr
- name: custom - name: custom
- name: translation
translation_key: anilist_popular
AniList Top Rated: AniList Top Rated:
variables: variables:
@ -51,10 +47,9 @@ collections:
- name: anilist - name: anilist
chart: top_rated chart: top_rated
- name: shared - name: shared
translation_key: anilist_top_rated
- name: arr - name: arr
- name: custom - name: custom
- name: translation
translation_key: anilist_top_rated
AniList Trending: AniList Trending:
variables: variables:
@ -62,10 +57,9 @@ collections:
template: template:
- name: anilist - name: anilist
- name: shared - name: shared
translation_key: anilist_trending
- name: arr - name: arr
- name: custom - name: custom
- name: translation
translation_key: anilist_trending
AniList Season: AniList Season:
variables: variables:
@ -73,7 +67,6 @@ collections:
template: template:
- name: season - name: season
- name: shared - name: shared
translation_key: anilist_season
- name: arr - name: arr
- name: custom - name: custom
- name: translation
translation_key: anilist_season

@ -11,11 +11,7 @@ external_templates:
collection_section: "010" collection_section: "010"
image: chart/<<collection_name_encoded>> image: chart/<<collection_name_encoded>>
translations:
pmm: translations
collections: collections:
Newly Released: Newly Released:
variables: variables:
key: released key: released
@ -25,7 +21,6 @@ collections:
search_value: <<in_the_last_released>> search_value: <<in_the_last_released>>
in_the_last_released: 90 in_the_last_released: 90
- name: shared - name: shared
- name: translation
translation_key: basic_released translation_key: basic_released
New Episodes: New Episodes:
@ -39,5 +34,4 @@ collections:
type: episodes type: episodes
- name: shared - name: shared
allowed_libraries: show allowed_libraries: show
- name: translation
translation_key: basic_episodes translation_key: basic_episodes

@ -11,9 +11,6 @@ external_templates:
collection_section: "020" collection_section: "020"
pre: "_#" pre: "_#"
translations:
pmm: translations
templates: templates:
flixpatrol: flixpatrol:
default: default:
@ -28,7 +25,8 @@ templates:
default: <<location_<<key>>>> default: <<location_<<key>>>>
conditions: conditions:
- key: apple - key: apple
value: world value: world
limit: <<limit>>
flixpatrol_top: flixpatrol_top:
platform: <<platform>> platform: <<platform>>
location: <<actual_location>> location: <<actual_location>>
@ -49,7 +47,6 @@ dynamic_collections:
title_format: <<key_name>> Top <<limit>> title_format: <<key_name>> Top <<limit>>
template: template:
- flixpatrol - flixpatrol
- translation
- shared - shared
- arr - arr
- custom - custom

@ -11,9 +11,6 @@ external_templates:
collection_section: "020" collection_section: "020"
image: chart/<<collection_name_encoded>> image: chart/<<collection_name_encoded>>
translations:
pmm: translations
templates: templates:
imdb_chart: imdb_chart:
imdb_chart: <<chart>>_<<library_type>>s imdb_chart: <<chart>>_<<library_type>>s
@ -26,10 +23,9 @@ collections:
- name: imdb_chart - name: imdb_chart
chart: popular chart: popular
- name: shared - name: shared
translation_key: imdb_popular
- name: arr - name: arr
- name: custom - name: custom
- name: translation
translation_key: imdb_popular
IMDb Top 250: IMDb Top 250:
variables: variables:
@ -38,10 +34,9 @@ collections:
- name: imdb_chart - name: imdb_chart
chart: top chart: top
- name: shared - name: shared
translation_key: imdb_top
- name: arr - name: arr
- name: custom - name: custom
- name: translation
translation_key: imdb_top
IMDb Lowest Rated: IMDb Lowest Rated:
variables: variables:
@ -50,7 +45,6 @@ collections:
template: template:
- name: shared - name: shared
allowed_libraries: movie allowed_libraries: movie
translation_key: imdb_lowest
- name: arr - name: arr
- name: custom - name: custom
- name: translation
translation_key: imdb_lowest

@ -11,9 +11,6 @@ external_templates:
collection_section: "020" collection_section: "020"
image: chart/<<collection_name_encoded>> image: chart/<<collection_name_encoded>>
translations:
pmm: translations
templates: templates:
mal: mal:
default: default:
@ -38,10 +35,9 @@ collections:
template: template:
- name: mal - name: mal
- name: shared - name: shared
translation_key: mal_popular
- name: arr - name: arr
- name: custom - name: custom
- name: translation
translation_key: mal_popular
MyAnimeList Favorited: MyAnimeList Favorited:
variables: variables:
@ -50,10 +46,9 @@ collections:
- name: mal - name: mal
chart: favorite chart: favorite
- name: shared - name: shared
translation_key: mal_favorited
- name: arr - name: arr
- name: custom - name: custom
- name: translation
translation_key: mal_favorited
MyAnimeList Top Rated: MyAnimeList Top Rated:
variables: variables:
@ -62,10 +57,9 @@ collections:
- name: mal - name: mal
chart: all chart: all
- name: shared - name: shared
translation_key: mal_top
- name: arr - name: arr
- name: custom - name: custom
- name: translation
translation_key: mal_top
MyAnimeList Top Airing: MyAnimeList Top Airing:
variables: variables:
@ -73,10 +67,9 @@ collections:
template: template:
- name: mal - name: mal
- name: shared - name: shared
translation_key: mal_airing
- name: arr - name: arr
- name: custom - name: custom
- name: translation
translation_key: mal_airing
MyAnimeList Season: MyAnimeList Season:
variables: variables:
@ -84,7 +77,6 @@ collections:
template: template:
- name: season - name: season
- name: shared - name: shared
translation_key: mal_season
- name: arr - name: arr
- name: custom - name: custom
- name: translation
translation_key: mal_season

@ -11,9 +11,6 @@ external_templates:
collection_section: "020" collection_section: "020"
image: chart/<<collection_name_encoded>> image: chart/<<collection_name_encoded>>
translations:
pmm: translations
templates: templates:
anidb: anidb:
default: default:
@ -30,10 +27,9 @@ collections:
template: template:
- name: anidb - name: anidb
- name: shared - name: shared
translation_key: anidb_popular
- name: arr - name: arr
- name: custom - name: custom
- name: translation
translation_key: anidb_popular
Common Sense Selection: Common Sense Selection:
variables: variables:
@ -41,10 +37,9 @@ collections:
template: template:
- name: commonsense - name: commonsense
- name: shared - name: shared
translation_key: commonsense_selection
- name: arr - name: arr
- name: custom - name: custom
- name: translation
translation_key: commonsense_selection
StevenLu's Popular Movies: StevenLu's Popular Movies:
variables: variables:
@ -53,10 +48,9 @@ collections:
template: template:
- name: shared - name: shared
allowed_libraries: movie allowed_libraries: movie
translation_key: stevenlu_popular
- name: arr - name: arr
- name: custom - name: custom
- name: translation
translation_key: stevenlu_popular
Top 10 Pirated Movies of the Week: Top 10 Pirated Movies of the Week:
variables: variables:
@ -65,7 +59,6 @@ collections:
template: template:
- name: shared - name: shared
allowed_libraries: movie allowed_libraries: movie
translation_key: pirated_popular
- name: arr - name: arr
- name: custom - name: custom
- name: translation
translation_key: pirated_popular

@ -10,14 +10,10 @@ external_templates:
template_variables: template_variables:
collection_section: "020" collection_section: "020"
translations:
pmm: translations
collections: collections:
Chart Collections: Chart Collections:
template: template:
- name: separator - name: separator
separator: chart separator: chart
- name: translation
key_name: Chart key_name: Chart
translation_key: separator translation_key: separator

@ -11,9 +11,6 @@ external_templates:
collection_section: "020" collection_section: "020"
image: chart/<<collection_name_encoded>> image: chart/<<collection_name_encoded>>
translations:
pmm: translations
templates: templates:
tautulli: tautulli:
default: default:
@ -34,10 +31,9 @@ collections:
- name: tautulli - name: tautulli
type: popular type: popular
- name: shared - name: shared
translation_key: tautulli_popular
- name: custom - name: custom
cache_builders: 0 cache_builders: 0
- name: translation
translation_key: tautulli_popular
Plex Watched: Plex Watched:
variables: variables:
@ -46,7 +42,6 @@ collections:
- name: tautulli - name: tautulli
type: watched type: watched
- name: shared - name: shared
translation_key: tautulli_watched
- name: custom - name: custom
cache_builders: 0 cache_builders: 0
- name: translation
translation_key: tautulli_watched

@ -11,9 +11,6 @@ external_templates:
collection_section: "020" collection_section: "020"
image: chart/<<collection_name_encoded>> image: chart/<<collection_name_encoded>>
translations:
pmm: translations
templates: templates:
tmdb: tmdb:
default: default:
@ -29,10 +26,9 @@ collections:
template: template:
- name: tmdb - name: tmdb
- name: shared - name: shared
translation_key: tmdb_popular
- name: arr - name: arr
- name: custom - name: custom
- name: translation
translation_key: tmdb_popular
TMDb Top Rated: TMDb Top Rated:
variables: variables:
@ -41,10 +37,9 @@ collections:
- name: tmdb - name: tmdb
chart: top_rated chart: top_rated
- name: shared - name: shared
translation_key: tmdb_top
- name: arr - name: arr
- name: custom - name: custom
- name: translation
translation_key: tmdb_top
TMDb Trending: TMDb Trending:
variables: variables:
@ -53,10 +48,9 @@ collections:
- name: tmdb - name: tmdb
chart: trending_weekly chart: trending_weekly
- name: shared - name: shared
translation_key: tmdb_trending
- name: arr - name: arr
- name: custom - name: custom
- name: translation
translation_key: tmdb_trending
TMDb Airing Today: TMDb Airing Today:
variables: variables:
@ -66,10 +60,9 @@ collections:
chart: airing_today chart: airing_today
- name: shared - name: shared
allowed_libraries: show allowed_libraries: show
translation_key: tmdb_airing
- name: arr - name: arr
- name: custom - name: custom
- name: translation
translation_key: tmdb_airing
TMDb On The Air: TMDb On The Air:
variables: variables:
@ -79,7 +72,6 @@ collections:
chart: on_the_air chart: on_the_air
- name: shared - name: shared
allowed_libraries: show allowed_libraries: show
translation_key: tmdb_air
- name: arr - name: arr
- name: custom - name: custom
- name: translation
translation_key: tmdb_air

@ -11,9 +11,6 @@ external_templates:
collection_section: "020" collection_section: "020"
image: chart/<<collection_name_encoded>> image: chart/<<collection_name_encoded>>
translations:
pmm: translations
templates: templates:
trakt: trakt:
default: default:
@ -30,10 +27,9 @@ collections:
template: template:
- name: trakt - name: trakt
- name: shared - name: shared
translation_key: trakt_collected
- name: arr - name: arr
- name: custom - name: custom
- name: translation
translation_key: trakt_collected
Trakt Popular: Trakt Popular:
variables: variables:
@ -41,10 +37,9 @@ collections:
template: template:
- name: trakt - name: trakt
- name: shared - name: shared
translation_key: trakt_popular
- name: arr - name: arr
- name: custom - name: custom
- name: translation
translation_key: trakt_popular
Trakt Recommended: Trakt Recommended:
variables: variables:
@ -52,10 +47,9 @@ collections:
template: template:
- name: trakt - name: trakt
- name: shared - name: shared
translation_key: trakt_recommended
- name: arr - name: arr
- name: custom - name: custom
- name: translation
translation_key: trakt_recommended
Trakt Trending: Trakt Trending:
variables: variables:
@ -63,10 +57,9 @@ collections:
template: template:
- name: trakt - name: trakt
- name: shared - name: shared
translation_key: trakt_trending
- name: arr - name: arr
- name: custom - name: custom
- name: translation
translation_key: trakt_trending
Trakt Watched: Trakt Watched:
variables: variables:
@ -74,7 +67,6 @@ collections:
template: template:
- name: trakt - name: trakt
- name: shared - name: shared
translation_key: trakt_watched
- name: arr - name: arr
- name: custom - name: custom
- name: translation
translation_key: trakt_watched

@ -10,15 +10,11 @@ external_templates:
template_variables: template_variables:
collection_section: "110" collection_section: "110"
translations:
pmm: translations
collections: collections:
Ratings Collections: Ratings Collections:
template: template:
- name: separator - name: separator
separator: content_rating separator: content_rating
- name: translation
key_name: Ratings key_name: Ratings
translation_key: separator translation_key: separator
@ -29,12 +25,10 @@ dynamic_collections:
other_name: Not Rated <<library_typeU>>s other_name: Not Rated <<library_typeU>>s
template: template:
- smart_filter - smart_filter
- translation
- shared - shared
other_template: other_template:
- other_collection - other_collection
- smart_filter - smart_filter
- translation
- shared - shared
template_variables: template_variables:
search_term: search_term:

@ -11,9 +11,6 @@ external_templates:
template_variables: template_variables:
collection_section: "080" collection_section: "080"
translations:
pmm: translations
collections: collections:
Country Collections: Country Collections:
template: template:
@ -30,12 +27,10 @@ dynamic_collections:
other_name: Other Countries other_name: Other Countries
template: template:
- smart_filter - smart_filter
- translation
- shared - shared
other_template: other_template:
- other_collection - other_collection
- smart_filter - smart_filter
- translation
- shared - shared
template_variables: template_variables:
search_term: search_term:

@ -10,15 +10,11 @@ external_templates:
template_variables: template_variables:
collection_section: "100" collection_section: "100"
translations:
pmm: translations
collections: collections:
Decade Collections: Decade Collections:
template: template:
- name: separator - name: separator
separator: decade separator: decade
- name: translation
key_name: Decade key_name: Decade
translation_key: separator translation_key: separator
@ -28,7 +24,6 @@ dynamic_collections:
title_format: Best of <<key_name>> title_format: Best of <<key_name>>
template: template:
- smart_filter - smart_filter
- translation
- shared - shared
template_variables: template_variables:
search_term: search_term:

@ -10,15 +10,11 @@ external_templates:
template_variables: template_variables:
collection_section: "150" collection_section: "150"
translations:
pmm: translations
collections: collections:
Directors Collections: Directors Collections:
template: template:
- name: separator - name: separator
separator: director separator: director
- name: translation
key_name: Directors key_name: Directors
translation_key: separator translation_key: separator
@ -32,7 +28,6 @@ dynamic_collections:
template: template:
- tmdb_person - tmdb_person
- smart_filter - smart_filter
- translation
- shared - shared
template_variables: template_variables:
tmdb_person: tmdb_person:

@ -26,6 +26,7 @@ templates:
radarr_monitor_<<key>>: <<radarr_monitor>> radarr_monitor_<<key>>: <<radarr_monitor>>
collection_order_<<key>>: <<collection_order>> collection_order_<<key>>: <<collection_order>>
optional: optional:
- name_<<key>>
- summary_<<key>> - summary_<<key>>
- movie - movie
- name_mapping - name_mapping
@ -38,6 +39,7 @@ templates:
- item_radarr_tag - item_radarr_tag
- radarr_monitor - radarr_monitor
- url_poster_<<key>> - url_poster_<<key>>
name: <<name_<<key>>>>
summary: <<summary_<<key>>>> summary: <<summary_<<key>>>>
cache_builders: 1 cache_builders: 1
minimum_items: <<minimum_items>> minimum_items: <<minimum_items>>

@ -10,15 +10,11 @@ external_templates:
template_variables: template_variables:
collection_section: "160" collection_section: "160"
translations:
pmm: translations
collections: collections:
Producers Collections: Producers Collections:
template: template:
- name: separator - name: separator
separator: producer separator: producer
- name: translation
key_name: Producers key_name: Producers
translation_key: separator translation_key: separator
@ -32,7 +28,6 @@ dynamic_collections:
template: template:
- tmdb_person - tmdb_person
- smart_filter - smart_filter
- translation
- shared - shared
template_variables: template_variables:
tmdb_person: tmdb_person:

@ -8,9 +8,6 @@
external_templates: external_templates:
pmm: templates pmm: templates
translations:
pmm: translations
templates: templates:
holiday: holiday:
default: default:
@ -27,6 +24,7 @@ templates:
mdblist_list_<<key>>: <<mdblist_list>> mdblist_list_<<key>>: <<mdblist_list>>
summary_<<key>>: <<seasonal_summary>> summary_<<key>>: <<seasonal_summary>>
name_<<key>>: <<seasonal_name>> name_<<key>>: <<seasonal_name>>
emoji: ""
emoji_<<key>>: <<emoji>> emoji_<<key>>: <<emoji>>
optional: optional:
- schedule - schedule
@ -36,6 +34,11 @@ templates:
- imdb_list - imdb_list
- trakt_list - trakt_list
- mdblist_list - mdblist_list
- summary_<<key>>
- name_<<key>>
- key_name
- translation_key
- limit
smart_label: smart_label:
sort_by: <<sort_by_<<key>>>> sort_by: <<sort_by_<<key>>>>
limit: <<limit_<<key>>>> limit: <<limit_<<key>>>>
@ -50,8 +53,12 @@ templates:
trakt_list: <<trakt_list_<<key>>>> trakt_list: <<trakt_list_<<key>>>>
mdblist_list: <<mdblist_list_<<key>>>> mdblist_list: <<mdblist_list_<<key>>>>
cache_builders: 1 cache_builders: 1
translation_key: <<translation_key>>
key_name: <<key_name>>
summary: <<summary_<<key>>>> summary: <<summary_<<key>>>>
name: <<emoji_<<key>>>><<name_<<key>>>> name: <<name_<<key>>>>
limit: <<limit_<<key>>>>
translation_prefix: <<emoji_<<key>>>>
collections: collections:
Seasonal Collections: Seasonal Collections:
@ -59,7 +66,6 @@ collections:
- name: separator - name: separator
separator: seasonal separator: seasonal
use_separator: false use_separator: false
- name: translation
key_name: Seasonal key_name: Seasonal
translation_key: separator translation_key: separator

@ -10,15 +10,11 @@ external_templates:
template_variables: template_variables:
collection_section: "170" collection_section: "170"
translations:
pmm: translations
collections: collections:
Writers Collections: Writers Collections:
template: template:
- name: separator - name: separator
separator: writer separator: writer
- name: translation
key_name: Writers key_name: Writers
translation_key: separator translation_key: separator
@ -32,7 +28,6 @@ dynamic_collections:
template: template:
- tmdb_person - tmdb_person
- smart_filter - smart_filter
- translation
- shared - shared
template_variables: template_variables:
tmdb_person: tmdb_person:

@ -8,9 +8,6 @@
external_templates: external_templates:
pmm: templates pmm: templates
translations:
pmm: translations
templates: templates:
playlist: playlist:
default: default:

@ -10,15 +10,11 @@ external_templates:
template_variables: template_variables:
collection_section: "110" collection_section: "110"
translations:
pmm: translations
collections: collections:
Ratings Collections: Ratings Collections:
template: template:
- name: separator - name: separator
separator: content_rating separator: content_rating
- name: translation
key_name: Ratings key_name: Ratings
translation_key: separator translation_key: separator
@ -29,12 +25,10 @@ dynamic_collections:
other_name: Not Rated <<library_typeU>>s other_name: Not Rated <<library_typeU>>s
template: template:
- smart_filter - smart_filter
- translation
- shared - shared
other_template: other_template:
- other_collection - other_collection
- smart_filter - smart_filter
- translation
- shared - shared
template_variables: template_variables:
search_term: search_term:

@ -11,15 +11,11 @@ external_templates:
template_variables: template_variables:
collection_section: "080" collection_section: "080"
translations:
pmm: translations
collections: collections:
Country Collections: Country Collections:
template: template:
- name: separator - name: separator
separator: country separator: country
- name: translation
key_name: Country key_name: Country
translation_key: separator translation_key: separator
@ -30,12 +26,10 @@ dynamic_collections:
other_name: Other Countries other_name: Other Countries
template: template:
- filter - filter
- translation
- shared - shared
other_template: other_template:
- other_collection - other_collection
- filter - filter
- translation
- shared - shared
template_variables: template_variables:
filter_term: filter_term:

@ -10,15 +10,11 @@ external_templates:
template_variables: template_variables:
collection_section: "100" collection_section: "100"
translations:
pmm: translations
collections: collections:
Decade Collections: Decade Collections:
template: template:
- name: separator - name: separator
separator: decade separator: decade
- name: translation
key_name: Decade key_name: Decade
translation_key: separator translation_key: separator
@ -28,7 +24,6 @@ dynamic_collections:
title_format: Best of <<key_name>> title_format: Best of <<key_name>>
template: template:
- smart_filter - smart_filter
- translation
- shared - shared
template_variables: template_variables:
search_term: search_term:

@ -27,6 +27,7 @@ templates:
collection_order_<<key>>: <<collection_order>> collection_order_<<key>>: <<collection_order>>
url_poster_<<key>>: https://raw.githubusercontent.com/meisnate12/Plex-Meta-Manager-Images/master/franchise/<<key_name_encoded>>.jpg url_poster_<<key>>: https://raw.githubusercontent.com/meisnate12/Plex-Meta-Manager-Images/master/franchise/<<key_name_encoded>>.jpg
optional: optional:
- name_<<key>>
- summary_<<key>> - summary_<<key>>
- name_mapping - name_mapping
- sort_title - sort_title
@ -39,6 +40,7 @@ templates:
- sonarr_tag - sonarr_tag
- item_sonarr_tag - item_sonarr_tag
- sonarr_monitor - sonarr_monitor
name: <<name_<<key>>>>
summary: <<summary_<<key>>>> summary: <<summary_<<key>>>>
minimum_items: <<minimum_items>> minimum_items: <<minimum_items>>
tmdb_show: <<value>> tmdb_show: <<value>>

@ -10,15 +10,11 @@ external_templates:
template_variables: template_variables:
collection_section: "050" collection_section: "050"
translations:
pmm: translations
collections: collections:
Network Collections: Network Collections:
template: template:
- name: separator - name: separator
separator: network separator: network
- name: translation
key_name: Network key_name: Network
translation_key: separator translation_key: separator
@ -28,7 +24,6 @@ dynamic_collections:
title_format: <<key_name>> title_format: <<key_name>>
template: template:
- smart_filter - smart_filter
- translation
- shared - shared
template_variables: template_variables:
search_term: search_term:

@ -5,12 +5,18 @@ templates:
sep_style: orig sep_style: orig
collection_section: "00" collection_section: "00"
url_poster_<<key>>: https://raw.githubusercontent.com/meisnate12/Plex-Meta-Manager-Images/master/separators/<<sep_style>>/<<separator>>.jpg url_poster_<<key>>: https://raw.githubusercontent.com/meisnate12/Plex-Meta-Manager-Images/master/separators/<<sep_style>>/<<separator>>.jpg
summary_<<key>>: <<summary_format>>
name_<<key>>: <<name_format>>
optional: optional:
- use_separator - use_separator
- collection_mode - collection_mode
- placeholder_tmdb_movie - placeholder_tmdb_movie
- placeholder_tvdb_show - placeholder_tvdb_show
- placeholder_imdb_id - placeholder_imdb_id
- summary_format
- name_format
- key_name
- translation_key
conditionals: conditionals:
use_blank: use_blank:
default: true default: true
@ -29,6 +35,10 @@ templates:
imdb_id: <<placeholder_imdb_id>> imdb_id: <<placeholder_imdb_id>>
blank_collection: <<use_blank>> blank_collection: <<use_blank>>
url_poster: <<url_poster_<<key>>>> url_poster: <<url_poster_<<key>>>>
translation_key: <<translation_key>>
key_name: <<key_name>>
summary: <<summary_<<key>>>>
name: <<name_<<key>>>>
shared: shared:
default: default:
@ -46,6 +56,8 @@ templates:
visible_home_<<key>>: <<visible_home>> visible_home_<<key>>: <<visible_home>>
visible_shared_<<key>>: <<visible_shared>> visible_shared_<<key>>: <<visible_shared>>
minimum_items_<<key>>: <<minimum_items>> minimum_items_<<key>>: <<minimum_items>>
summary_<<key>>: <<summary_format>>
name_<<key>>: <<name_format>>
optional: optional:
- use_<<key>> - use_<<key>>
- allowed_libraries - allowed_libraries
@ -60,9 +72,19 @@ templates:
- ignore_ids - ignore_ids
- ignore_imdb_ids - ignore_imdb_ids
- minimum_items - minimum_items
- summary_format
- name_format
- key_name
- translation_key
- limit
run_definition: run_definition:
- <<use_<<key>>>> - <<use_<<key>>>>
- <<allowed_libraries>> - <<allowed_libraries>>
translation_key: <<translation_key>>
key_name: <<key_name>>
summary: <<summary_<<key>>>>
name: <<name_<<key>>>>
limit: <<limit>>
ignore_ids: <<ignore_ids>> ignore_ids: <<ignore_ids>>
ignore_imdb_ids: <<ignore_imdb_ids>> ignore_imdb_ids: <<ignore_imdb_ids>>
trakt_list: <<trakt_list>> trakt_list: <<trakt_list>>
@ -214,13 +236,3 @@ templates:
optional: optional:
- use_year_collections - use_year_collections
run_definition: <<use_year_collections>> run_definition: <<use_year_collections>>
translation:
default:
summary_<<key>>: <<<<translation_key>>_summary>>
name_<<key>>: <<<<translation_key>>_name>>
optional:
- <<translation_key>>_summary
- <<translation_key>>_name
summary: <<summary_<<key>>>>
name: <<name_<<key>>>>

@ -44,7 +44,7 @@ ignored_details = [
"delete_not_scheduled", "tmdb_person", "build_collection", "collection_order", "builder_level", "overlay", "delete_not_scheduled", "tmdb_person", "build_collection", "collection_order", "builder_level", "overlay",
"validate_builders", "libraries", "sync_to_users", "exclude_users", "collection_name", "playlist_name", "name", "validate_builders", "libraries", "sync_to_users", "exclude_users", "collection_name", "playlist_name", "name",
"blank_collection", "allowed_library_types", "run_definition", "delete_playlist", "ignore_blank_results", "only_run_on_create", "blank_collection", "allowed_library_types", "run_definition", "delete_playlist", "ignore_blank_results", "only_run_on_create",
"delete_collections_named", "tmdb_person_offset", "append_label" "delete_collections_named", "tmdb_person_offset", "append_label", "key_name", "translation_key", "translation_prefix"
] ]
details = [ details = [
"ignore_ids", "ignore_imdb_ids", "server_preroll", "changes_webhooks", "collection_filtering", "collection_mode", "limit", "url_theme", "ignore_ids", "ignore_imdb_ids", "server_preroll", "changes_webhooks", "collection_filtering", "collection_mode", "limit", "url_theme",
@ -182,6 +182,7 @@ class CollectionBuilder:
self.data = data self.data = data
self.library = library self.library = library
self.libraries = [] self.libraries = []
self.summaries = {}
self.playlist = library is None self.playlist = library is None
self.overlay = overlay self.overlay = overlay
methods = {m.lower(): m for m in self.data} methods = {m.lower(): m for m in self.data}
@ -235,6 +236,101 @@ class CollectionBuilder:
logger.separator(f"Validating {self.mapping_name} Attributes", space=False, border=False) logger.separator(f"Validating {self.mapping_name} Attributes", space=False, border=False)
self.builder_language = self.metadata.language
if "language" in methods:
logger.debug("")
logger.debug("Validating Method: language")
if not self.data[methods["language"]]:
raise Failed(f"{self.Type} Error: language attribute is blank")
logger.debug(f"Value: {self.data[methods['language']]}")
if str(self.data[methods["language"]]).lower() not in self.config.GitHub.translation_keys:
logger.warning(f"Config Error: Language: {str(self.data[methods['language']]).lower()} Not Found using {self.builder_language}. Options: {', '.join(self.config.GitHub.translation_keys)}")
else:
self.builder_language = str(self.data[methods["language"]]).lower()
self.name = None
if "translation_key" in methods:
english = self.config.GitHub.translation_yaml("en")
translations = self.config.GitHub.translation_yaml(self.builder_language)
logger.debug("")
logger.debug("Validating Method: translation_key")
if not self.data[methods["translation_key"]]:
raise Failed(f"{self.Type} Error: translation_key attribute is blank")
logger.debug(f"Value: {self.data[methods['translation_key']]}")
translation_key = str(self.data[methods["translation_key"]])
if translation_key not in english["collections"]:
raise Failed(f"{self.Type} Error: translation_key: {translation_key} is invalid")
key_name = ""
if "key_name" in methods:
logger.debug("")
logger.debug("Validating Method: key_name")
if not self.data[methods["key_name"]]:
raise Failed(f"{self.Type} Error: key_name attribute is blank")
logger.debug(f"Value: {self.data[methods['key_name']]}")
key_name = str(self.data[methods["key_name"]])
if self.builder_language != "en":
key_name_key = None
for k, v in english["key_names"]:
if key_name == v:
key_name_key = k
break
if key_name_key and key_name_key in translations["key_names"]:
key_name = translations["key_names"][key_name_key]
t_limit = self.data[methods["limit"]] if "limit" in methods and self.data[methods["limit"]] else 0
lib_type = self.library.type.lower() if self.library else "item"
en_vars = {k: v[lib_type] for k, v in english["variables"].items() if lib_type in v and v[lib_type]}
t_vars = {k: v[lib_type] for k, v in translations["variables"].items() if lib_type in v and v[lib_type]}
for k, v in en_vars.items():
if k not in t_vars:
t_vars[k] = v
def apply_vars(input_str, var_set):
input_str = str(input_str)
for ik, iv in var_set.items():
if f"<<{ik}>>" in input_str:
input_str = input_str.replace(f"<<{ik}>>", iv)
if f"<<{ik}U>>" in input_str:
input_str = input_str.replace(f"<<{ik}U>>", str(iv).capitalize())
if "<<key_name>>" in input_str:
input_str = input_str.replace("<<key_name>>", key_name)
if "<<limit>>" in input_str:
input_str = input_str.replace("<<limit>>", t_limit)
return input_str
self.name = None
summary = None
english_name = apply_vars(english["collections"][translation_key]["name"], en_vars)
self.name = english_name
if translation_key in translations["collections"]:
logger.info(translations["collections"][translation_key])
if "name" in translations["collections"][translation_key]:
self.name = apply_vars(translations["collections"][translation_key]["name"], t_vars)
if "summary" in translations["collections"][translation_key]:
summary = apply_vars(translations["collections"][translation_key]["summary"], t_vars)
if not summary:
summary = apply_vars(english["collections"][translation_key]["summary"], en_vars)
if summary:
self.summaries["translation"] = summary
if "translation_prefix" in methods:
logger.debug("")
logger.debug("Validating Method: translation_prefix")
if not self.data[methods["translation_prefix"]]:
raise Failed(f"{self.Type} Error: translation_prefix attribute is blank")
logger.debug(f"Value: {self.data[methods['translation_prefix']]}")
self.name = f"{self.data[methods['translation_prefix']]}{self.name}"
english_name = f"{self.data[methods['translation_prefix']]}{english_name}"
if self.name != english_name:
if "delete_collections_named" not in methods:
self.data["delete_collections_named"] = english_name
methods["delete_collections_named"] = "delete_collections_named"
if not isinstance(self.data[methods["delete_collections_named"]], list):
self.data[methods["delete_collections_named"]] = [self.data[methods["delete_collections_named"]]]
if english_name not in self.data[methods["delete_collections_named"]]:
self.data[methods["delete_collections_named"]].append(english_name)
if "name" in methods: if "name" in methods:
logger.debug("") logger.debug("")
logger.debug("Validating Method: name") logger.debug("Validating Method: name")
@ -242,7 +338,8 @@ class CollectionBuilder:
raise Failed(f"{self.Type} Error: name attribute is blank") raise Failed(f"{self.Type} Error: name attribute is blank")
logger.debug(f"Value: {self.data[methods['name']]}") logger.debug(f"Value: {self.data[methods['name']]}")
self.name = str(self.data[methods["name"]]) self.name = str(self.data[methods["name"]])
else:
if not self.name:
self.name = self.mapping_name self.name = self.mapping_name
if self.playlist: if self.playlist:
@ -435,7 +532,6 @@ class CollectionBuilder:
self.remove_item_map = {} self.remove_item_map = {}
self.posters = {} self.posters = {}
self.backgrounds = {} self.backgrounds = {}
self.summaries = {}
self.schedule = "" self.schedule = ""
self.limit = 0 self.limit = 0
self.beginning_count = 0 self.beginning_count = 0
@ -2708,6 +2804,7 @@ class CollectionBuilder:
logger.separator(f"Updating Details of {self.name} {self.Type}", space=False, border=False) logger.separator(f"Updating Details of {self.name} {self.Type}", space=False, border=False)
logger.info("") logger.info("")
if "summary" in self.summaries: summary = ("summary", self.summaries["summary"]) if "summary" in self.summaries: summary = ("summary", self.summaries["summary"])
elif "translation" in self.summaries: summary = ("translation", self.summaries["translation"])
elif "tmdb_description" in self.summaries: summary = ("tmdb_description", self.summaries["tmdb_description"]) elif "tmdb_description" in self.summaries: summary = ("tmdb_description", self.summaries["tmdb_description"])
elif "tvdb_description" in self.summaries: summary = ("tvdb_description", self.summaries["tvdb_description"]) elif "tvdb_description" in self.summaries: summary = ("tvdb_description", self.summaries["tvdb_description"])
elif "letterboxd_description" in self.summaries: summary = ("letterboxd_description", self.summaries["letterboxd_description"]) elif "letterboxd_description" in self.summaries: summary = ("letterboxd_description", self.summaries["letterboxd_description"])
@ -2881,7 +2978,7 @@ class CollectionBuilder:
plex_search = {"sort_by": self.custom_sort} plex_search = {"sort_by": self.custom_sort}
if self.builder_level in ["season", "episode"]: if self.builder_level in ["season", "episode"]:
plex_search["type"] = f"{self.builder_level}s" plex_search["type"] = f"{self.builder_level}s"
plex_search["any"] = {f"{self.builder_level}_collection": self.name} plex_search["any"] = {f"{self.builder_level}_collection": self.name} # noqa
else: else:
plex_search["any"] = {"collection": self.name} plex_search["any"] = {"collection": self.name}
try: try:

@ -4,16 +4,20 @@ from modules.util import Failed
logger = util.logger logger = util.logger
raw_url = "https://raw.githubusercontent.com"
base_url = "https://api.github.com" base_url = "https://api.github.com"
pmm_base = f"{base_url}/repos/meisnate12/Plex-Meta-Manager" pmm_base = f"{base_url}/repos/meisnate12/Plex-Meta-Manager"
configs_raw_url = "https://raw.githubusercontent.com/meisnate12/Plex-Meta-Manager-Configs" configs_raw_url = f"{raw_url}/meisnate12/Plex-Meta-Manager-Configs"
class GitHub: class GitHub:
def __init__(self, config): def __init__(self, config):
self.config = config self.config = config
self.images_raw_url = "https://raw.githubusercontent.com/meisnate12/PMM-Image-Sets/master/" self.images_raw_url = f"{raw_url}/meisnate12/PMM-Image-Sets/master/"
self.translation_url = f"{raw_url}/meisnate12/PMM-Translations/master/defaults/"
self._configs_url = None self._configs_url = None
self._config_tags = [] self._config_tags = []
self._translation_keys = []
self._translations = {}
def get_top_tree(self, repo): def get_top_tree(self, repo):
if not str(repo).startswith("/"): if not str(repo).startswith("/"):
@ -68,3 +72,21 @@ class GitHub:
): ):
self._configs_url = f"{configs_raw_url}/v{self.config.version[1]}/" self._configs_url = f"{configs_raw_url}/v{self.config.version[1]}/"
return self._configs_url return self._configs_url
@property
def translation_keys(self):
if not self._translation_keys:
tree, repo = self.get_top_tree("meisnate12/PMM-Translations")
self._translation_keys = [tk[:-4] for tk in self.get_tree(tree["defaults"]["url"])]
return self._translation_keys
def translation_yaml(self, translation_key):
if translation_key not in self._translations:
url = f"{self.translation_url}{translation_key}.yml"
yaml = util.YAML(input_data=self.config.get(url).content).data
output = {"collections": {}, "key_name": {}, "variables": {}}
for k in output:
if k in yaml:
output[k] = yaml[k]
self._translations[translation_key] = output
return self._translations[translation_key]

@ -18,6 +18,7 @@ class Library(ABC):
self.Overlays = None self.Overlays = None
self.Notifiarr = None self.Notifiarr = None
self.collections = [] self.collections = []
self.collection_names = []
self.metadatas = [] self.metadatas = []
self.queues = {} self.queues = {}
self.image_styles = {} self.image_styles = {}

@ -70,6 +70,12 @@ class DataFile:
self.type = file_type self.type = file_type
self.path = path self.path = path
self.temp_vars = temp_vars self.temp_vars = temp_vars
self.language = "en"
if "language" in self.temp_vars and self.temp_vars["language"]:
if self.temp_vars["language"].lower() not in self.config.GitHub.translation_keys:
logger.warning(f"Config Error: Language: {self.temp_vars['language'].lower()} Not Found using en. Options: {', '.join(self.config.GitHub.translation_keys)}")
else:
self.language = self.temp_vars["language"].lower()
self.asset_directory = asset_directory self.asset_directory = asset_directory
self.data_type = "" self.data_type = ""
self.templates = {} self.templates = {}

@ -665,7 +665,7 @@ class Operations:
else: else:
if "PMM" not in labels: if "PMM" not in labels:
unmanaged_collections.append(col) unmanaged_collections.append(col)
if col.title not in self.library.collections: if col.title not in self.library.collection_names:
unconfigured_collections.append(col) unconfigured_collections.append(col)
if self.library.show_unmanaged and len(unmanaged_collections) > 0: if self.library.show_unmanaged and len(unmanaged_collections) > 0:

@ -668,9 +668,11 @@ def run_collection(config, library, metadata, requested_collections):
try: try:
builder = CollectionBuilder(config, metadata, mapping_name, collection_attrs, library=library, extra=output_str) builder = CollectionBuilder(config, metadata, mapping_name, collection_attrs, library=library, extra=output_str)
library.stats["names"].append(builder.name) library.stats["names"].append(builder.name)
if builder.build_collection:
library.collection_names.append(builder.name)
logger.info("") logger.info("")
logger.separator(f"Running {mapping_name} Collection", space=False, border=False) logger.separator(f"Running {builder.name} Collection", space=False, border=False)
if len(builder.schedule) > 0: if len(builder.schedule) > 0:
logger.info(builder.schedule) logger.info(builder.schedule)

Loading…
Cancel
Save