[159] update how translations work

This commit is contained in:
meisnate12 2023-03-30 15:51:04 -04:00
parent fcd2e94a9e
commit 7e25b6c5f7
57 changed files with 241 additions and 314 deletions

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -5,23 +5,43 @@
# https://metamanager.wiki/en/latest/defaults/both/collectionless.html #
##############################################################################
translations:
pmm: translations
templates:
collectionless:
default:
exclude_prefix:
- "!"
- "~"
summary_collectionless: <<collectionless_summary>>
name_collectionless: <<collectionless_name>>
sort_title: ~_Collectionless
collection_order: alpha
url_poster: https://raw.githubusercontent.com/meisnate12/Plex-Meta-Manager-Images/master/collectionless.jpg
optional:
- collection_mode
- 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>>
collection_order: <<collection_order>>
sort_title: <<sort_title>>

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -5,12 +5,18 @@ templates:
sep_style: orig
collection_section: "00"
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:
- use_separator
- collection_mode
- placeholder_tmdb_movie
- placeholder_tvdb_show
- placeholder_imdb_id
- summary_format
- name_format
- key_name
- translation_key
conditionals:
use_blank:
default: true
@ -29,6 +35,10 @@ templates:
imdb_id: <<placeholder_imdb_id>>
blank_collection: <<use_blank>>
url_poster: <<url_poster_<<key>>>>
translation_key: <<translation_key>>
key_name: <<key_name>>
summary: <<summary_<<key>>>>
name: <<name_<<key>>>>
shared:
default:
@ -46,6 +56,8 @@ templates:
visible_home_<<key>>: <<visible_home>>
visible_shared_<<key>>: <<visible_shared>>
minimum_items_<<key>>: <<minimum_items>>
summary_<<key>>: <<summary_format>>
name_<<key>>: <<name_format>>
optional:
- use_<<key>>
- allowed_libraries
@ -60,9 +72,19 @@ templates:
- ignore_ids
- ignore_imdb_ids
- minimum_items
- summary_format
- name_format
- key_name
- translation_key
- limit
run_definition:
- <<use_<<key>>>>
- <<allowed_libraries>>
translation_key: <<translation_key>>
key_name: <<key_name>>
summary: <<summary_<<key>>>>
name: <<name_<<key>>>>
limit: <<limit>>
ignore_ids: <<ignore_ids>>
ignore_imdb_ids: <<ignore_imdb_ids>>
trakt_list: <<trakt_list>>
@ -214,13 +236,3 @@ templates:
optional:
- 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>>>>

View file

@ -44,7 +44,7 @@ ignored_details = [
"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",
"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 = [
"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.library = library
self.libraries = []
self.summaries = {}
self.playlist = library is None
self.overlay = overlay
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)
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:
logger.debug("")
logger.debug("Validating Method: name")
@ -242,7 +338,8 @@ class CollectionBuilder:
raise Failed(f"{self.Type} Error: name attribute is blank")
logger.debug(f"Value: {self.data[methods['name']]}")
self.name = str(self.data[methods["name"]])
else:
if not self.name:
self.name = self.mapping_name
if self.playlist:
@ -435,7 +532,6 @@ class CollectionBuilder:
self.remove_item_map = {}
self.posters = {}
self.backgrounds = {}
self.summaries = {}
self.schedule = ""
self.limit = 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.info("")
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 "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"])
@ -2881,7 +2978,7 @@ class CollectionBuilder:
plex_search = {"sort_by": self.custom_sort}
if self.builder_level in ["season", "episode"]:
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:
plex_search["any"] = {"collection": self.name}
try:

View file

@ -4,16 +4,20 @@ from modules.util import Failed
logger = util.logger
raw_url = "https://raw.githubusercontent.com"
base_url = "https://api.github.com"
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:
def __init__(self, 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._config_tags = []
self._translation_keys = []
self._translations = {}
def get_top_tree(self, repo):
if not str(repo).startswith("/"):
@ -68,3 +72,21 @@ class GitHub:
):
self._configs_url = f"{configs_raw_url}/v{self.config.version[1]}/"
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]

View file

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

View file

@ -70,6 +70,12 @@ class DataFile:
self.type = file_type
self.path = path
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.data_type = ""
self.templates = {}

View file

@ -665,7 +665,7 @@ class Operations:
else:
if "PMM" not in labels:
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)
if self.library.show_unmanaged and len(unmanaged_collections) > 0:

View file

@ -668,9 +668,11 @@ def run_collection(config, library, metadata, requested_collections):
try:
builder = CollectionBuilder(config, metadata, mapping_name, collection_attrs, library=library, extra=output_str)
library.stats["names"].append(builder.name)
if builder.build_collection:
library.collection_names.append(builder.name)
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:
logger.info(builder.schedule)