[74] updated all awards to use imdb_awards

pull/1797/head
meisnate12 11 months ago
parent d4ff067dfe
commit 2726b2f20a

@ -1 +1 @@
1.19.1-develop73 1.19.1-develop74

@ -23,15 +23,20 @@ collections:
translation_key: bafta_best translation_key: bafta_best
- name: arr - name: arr
- name: custom - name: custom
trakt_list: https://trakt.tv/users/maxwelldeux/lists/bafta-award-best-film imdb_award:
event_id: ev0000123
event_year: all
category_filter: best film
winning: true
dynamic_collections: dynamic_collections:
BAFTA Awards: BAFTA Awards:
type: number type: imdb_awards
sync: true sync: true
data: data:
starting: current_year-5 event_id: ev0000123
ending: current_year starting: latest-5
ending: latest
title_format: BAFTA <<key_name>> title_format: BAFTA <<key_name>>
template: template:
- use_year_collections - use_year_collections
@ -40,10 +45,6 @@ dynamic_collections:
- arr - arr
- custom - custom
template_variables: template_variables:
event_id:
default: ev0000123
event_year:
default: <<key>>
winning: winning:
default: true default: true
collection_order: collection_order:

@ -23,15 +23,20 @@ collections:
translation_key: cannes_best translation_key: cannes_best
- name: arr - name: arr
- name: custom - name: custom
letterboxd_list: https://letterboxd.com/brsan/list/cannes-palme-dor-winners/ imdb_award:
event_id: ev0000147
event_year: all
award_filter: palme d'or
winning: true
dynamic_collections: dynamic_collections:
Cannes Awards: Cannes Awards:
type: number type: imdb_awards
sync: true sync: true
data: data:
starting: current_year-5 event_id: ev0000147
ending: current_year starting: latest-5
ending: latest
title_format: Cannes <<key_name>> title_format: Cannes <<key_name>>
template: template:
- use_year_collections - use_year_collections
@ -40,10 +45,6 @@ dynamic_collections:
- arr - arr
- custom - custom
template_variables: template_variables:
event_id:
default: ev0000147
event_year:
default: <<key>>
winning: winning:
default: true default: true
collection_order: collection_order:

@ -13,11 +13,12 @@ external_templates:
dynamic_collections: dynamic_collections:
Critics Choice Awards: Critics Choice Awards:
type: number type: imdb_awards
sync: true sync: true
data: data:
starting: current_year-5 event_id: ev0000133
ending: current_year starting: latest-5
ending: latest
title_format: Critics Choice Awards <<key_name>> title_format: Critics Choice Awards <<key_name>>
template: template:
- use_year_collections - use_year_collections
@ -26,10 +27,6 @@ dynamic_collections:
- arr - arr
- custom - custom
template_variables: template_variables:
event_id:
default: ev0000133
event_year:
default: <<key>>
winning: winning:
default: true default: true
collection_order: collection_order:
@ -38,13 +35,5 @@ dynamic_collections:
default: award/choice/<<key>> default: award/choice/<<key>>
translation_key: translation_key:
default: choice_year default: choice_year
url:
default: critic-s
2019: critics
2018: critics
2017: critics
2016: critics
2015: critics
2014: critics
dynamic: dynamic:
default: true default: true

@ -12,11 +12,12 @@ external_templates:
dynamic_collections: dynamic_collections:
Emmy Awards: Emmy Awards:
type: number type: imdb_awards
sync: true sync: true
data: data:
starting: current_year-5 event_id: ev0000223
ending: current_year starting: latest-5
ending: latest
title_format: Emmys <<key_name>> title_format: Emmys <<key_name>>
template: template:
- use_year_collections - use_year_collections
@ -25,10 +26,6 @@ dynamic_collections:
- arr - arr
- custom - custom
template_variables: template_variables:
event_id:
default: ev0000223
event_year:
default: <<key>>
winning: winning:
default: true default: true
collection_order: collection_order:

@ -23,13 +23,25 @@ collections:
translation_key: golden_picture translation_key: golden_picture
- name: arr - name: arr
- name: custom - name: custom
collection_order: release.desc
delete_collections_named: delete_collections_named:
- Golden Globe Best Motion Pictures - Golden Globe Best Motion Pictures
tmdb_list: imdb_award:
- 8191011 # Drama event_id: ev0000292
- 8191022 # Musical or Comedy event_year: all
- 8235497 # Animation category_filter:
- best motion picture - animated
- best motion picture - comedy
- best motion picture - comedy or musical
- best motion picture - drama
- best motion picture - foreign language
- best motion picture - musical
- best motion picture - musical or comedy
- best motion picture - non-english language
- best motion picture, animated
- best motion picture, drama
- best motion picture, musical or comedy
- best motion picture, non-english language
winning: true
Golden Globes Best Director Winners: Golden Globes Best Director Winners:
variables: variables:
@ -43,14 +55,23 @@ collections:
- name: arr - name: arr
- name: custom - name: custom
tmdb_list: 8235502 tmdb_list: 8235502
imdb_award:
event_id: ev0000292
event_year: all
category_filter:
- best director
- best director - motion picture
- best director, motion picture
winning: true
dynamic_collections: dynamic_collections:
Golden Globes Awards: Golden Globes Awards:
type: number type: imdb_awards
sync: true sync: true
data: data:
starting: current_year-5 event_id: ev0000292
ending: current_year starting: latest-5
ending: latest
title_format: Golden Globe <<key_name>> title_format: Golden Globe <<key_name>>
template: template:
- use_year_collections - use_year_collections
@ -59,10 +80,6 @@ dynamic_collections:
- arr - arr
- custom - custom
template_variables: template_variables:
event_id:
default: ev0000292
event_year:
default: <<key>>
winning: winning:
default: true default: true
collection_order: collection_order:

@ -22,8 +22,13 @@ collections:
translation_key: oscars_picture translation_key: oscars_picture
- name: arr - name: arr
- name: custom - name: custom
imdb_search: imdb_award:
event.winning: oscar_picture event_id: ev0000003
event_year: all
category_filter:
- best picture
- best motion picture of the year
winning: true
Oscars Best Director Winners: Oscars Best Director Winners:
variables: variables:
@ -36,16 +41,23 @@ collections:
translation_key: oscars_director translation_key: oscars_director
- name: arr - name: arr
- name: custom - name: custom
imdb_search: imdb_award:
event.winning: oscar_director event_id: ev0000003
event_year: all
category_filter:
- best director
- best director, comedy picture
- best director, dramatic picture
winning: true
dynamic_collections: dynamic_collections:
Oscars Winners Awards: Oscars Winners Awards:
type: number type: imdb_awards
sync: true sync: true
data: data:
starting: current_year-6 event_id: ev0000003
ending: current_year-1 starting: latest-5
ending: latest
title_format: Oscars Winners <<key_name>> title_format: Oscars Winners <<key_name>>
template: template:
- use_year_collections - use_year_collections
@ -54,10 +66,6 @@ dynamic_collections:
- arr - arr
- custom - custom
template_variables: template_variables:
event_id:
default: ev0000003
event_year:
default: <<key>>
winning: winning:
default: true default: true
collection_order: collection_order:

@ -22,7 +22,11 @@ collections:
translation_key: berlinale_best translation_key: berlinale_best
- name: arr - name: arr
- name: custom - name: custom
trakt_list: https://trakt.tv/users/maxwelldeux/lists/berlin-international-film-festival-golden-bears imdb_award:
event_id: ev0000091
event_year: all
category_filter: best film
winning: true
César Best Film Winners: César Best Film Winners:
variables: variables:
@ -34,7 +38,11 @@ collections:
translation_key: cesar_best translation_key: cesar_best
- name: arr - name: arr
- name: custom - name: custom
trakt_list: https://trakt.tv/users/maxwelldeux/lists/cesar-award-best-french-film imdb_award:
event_id: ev0000157
event_year: all
category_filter: best film (meilleur film)
winning: true
Razzies Golden Raspberry Winners: Razzies Golden Raspberry Winners:
variables: variables:
@ -46,7 +54,11 @@ collections:
translation_key: razzie_worst translation_key: razzie_worst
- name: arr - name: arr
- name: custom - name: custom
trakt_list: https://trakt.tv/users/hdlists/lists/razzie-awards-worst-picture-winners imdb_award:
event_id: ev0000558
event_year: all
category_filter: worst picture
winning: true
Venice Golden Lions: Venice Golden Lions:
variables: variables:
@ -58,4 +70,8 @@ collections:
translation_key: venice_best translation_key: venice_best
- name: arr - name: arr
- name: custom - name: custom
trakt_list: https://trakt.tv/users/maxwelldeux/lists/venice-film-festival-golden-lion imdb_award:
event_id: ev0000681
event_year: all
award_filter: golden lion
winning: true

@ -13,11 +13,12 @@ external_templates:
dynamic_collections: dynamic_collections:
Independent Spirit Awards Awards: Independent Spirit Awards Awards:
type: number type: imdb_awards
sync: true sync: true
data: data:
starting: current_year-5 event_id: ev0000349
ending: current_year starting: latest-5
ending: latest
title_format: Independent Spirit Awards <<key_name>> title_format: Independent Spirit Awards <<key_name>>
template: template:
- use_year_collections - use_year_collections
@ -26,10 +27,6 @@ dynamic_collections:
- arr - arr
- custom - custom
template_variables: template_variables:
event_id:
default: ev0000349
event_year:
default: <<key>>
winning: winning:
default: true default: true
collection_order: collection_order:

@ -23,15 +23,20 @@ collections:
translation_key: sundance_best translation_key: sundance_best
- name: arr - name: arr
- name: custom - name: custom
trakt_list_details: https://trakt.tv/users/maxwelldeux/lists/sundance-film-festival-grand-jury-prize imdb_award:
event_id: ev0000631
event_year: all
award_filter: grand jury prize
winning: true
dynamic_collections: dynamic_collections:
Sundance Film Festival: Sundance Film Festival:
type: number type: imdb_awards
sync: true sync: true
data: data:
starting: current_year-5 event_id: ev0000631
ending: current_year starting: latest-5
ending: latest
title_format: Sundance Film Festival <<key_name>> title_format: Sundance Film Festival <<key_name>>
template: template:
- use_year_collections - use_year_collections
@ -40,10 +45,6 @@ dynamic_collections:
- arr - arr
- custom - custom
template_variables: template_variables:
event_id:
default: ev0000631
event_year:
default: <<key>>
winning: winning:
default: true default: true
collection_order: collection_order:

@ -153,7 +153,7 @@ templates:
- winning - winning
imdb_award: imdb_award:
event_id: <<event_id>> event_id: <<event_id>>
event_year: <<event_year>> event_year: <<key>>
award_filter: <<award_filter>> award_filter: <<award_filter>>
category_filter: <<category_filter>> category_filter: <<category_filter>>
winning: <<winning>> winning: <<winning>>

@ -143,7 +143,7 @@ smart_url_invalid = ["filters", "run_again", "sync_mode", "show_filtered", "show
custom_sort_builders = [ custom_sort_builders = [
"plex_search", "plex_watchlist", "plex_pilots", "tmdb_list", "tmdb_popular", "tmdb_now_playing", "tmdb_top_rated", "plex_search", "plex_watchlist", "plex_pilots", "tmdb_list", "tmdb_popular", "tmdb_now_playing", "tmdb_top_rated",
"tmdb_trending_daily", "tmdb_trending_weekly", "tmdb_discover", "reciperr_list", "trakt_chart", "trakt_userlist", "tmdb_trending_daily", "tmdb_trending_weekly", "tmdb_discover", "reciperr_list", "trakt_chart", "trakt_userlist",
"tvdb_list", "imdb_chart", "imdb_list", "imdb_search", "imdb_watchlist", "stevenlu_popular", "anidb_popular", "tvdb_list", "imdb_chart", "imdb_list", "imdb_award", "imdb_search", "imdb_watchlist", "stevenlu_popular", "anidb_popular",
"tmdb_upcoming", "tmdb_airing_today", "tmdb_on_the_air", "trakt_list", "trakt_watchlist", "trakt_collection", "tmdb_upcoming", "tmdb_airing_today", "tmdb_on_the_air", "trakt_list", "trakt_watchlist", "trakt_collection",
"trakt_trending", "trakt_popular", "trakt_boxoffice", "trakt_collected_daily", "trakt_collected_weekly", "trakt_trending", "trakt_popular", "trakt_boxoffice", "trakt_collected_daily", "trakt_collected_weekly",
"trakt_collected_monthly", "trakt_collected_yearly", "trakt_collected_all", "trakt_recommendations", "trakt_collected_monthly", "trakt_collected_yearly", "trakt_collected_all", "trakt_recommendations",

@ -999,59 +999,38 @@ class MetadataFile(DataFile):
extra_template_vars["event_id"] = event_id extra_template_vars["event_id"] = event_id
if event_id not in self.config.IMDb.events_validation: if event_id not in self.config.IMDb.events_validation:
raise Failed(f"Config Error: {map_name} data only specific Event IDs work with imdb_awards. Event Options: [{', '.join([k for k in self.config.IMDb.events_validation])}]") raise Failed(f"Config Error: {map_name} data only specific Event IDs work with imdb_awards. Event Options: [{', '.join([k for k in self.config.IMDb.events_validation])}]")
current_year = datetime.now().year _, event_years = self.config.IMDb.get_event_years(event_id)
_, year_options = self.config.IMDb.get_event_years(event_id) year_options = [event_years[len(event_years) - i] for i in range(1, len(event_years) + 1)]
min_year = None
max_year = None def get_position(attr, pos_add=0):
for option in year_options: if attr not in award_methods:
year = int(option.split("-")[0] if "-" in option else option) return 0 if attr == "starting" else len(year_options)
if min_year is None or year < min_year: position_value = str(dynamic_data[award_methods[attr]])
min_year = year if not position_value:
if max_year is None or year > max_year: raise Failed(f"Config Error: {map_name} data {attr} attribute is blank")
max_year = year if position_value.startswith(("first", "latest")):
int_values = position_value.split("+" if position_value.startswith("first") else "-")
if "starting" in award_methods:
starting_value = str(dynamic_data[award_methods["starting"]])
if not starting_value:
raise Failed(f"Config Error: {map_name} data starting attribute is blank")
if starting_value.startswith("first"):
year_values = starting_value.split("+")
starting = None
#and str(dynamic_data[award_methods["starting"]]).startswith("current"):
year_values = str(dynamic_data[award_methods["starting"]]).split("-")
try: try:
starting = current_year - (0 if len(year_values) == 1 else int(year_values[1].strip())) if len(int_values) == 1:
except ValueError: return 0 if position_value.startswith("first") else len(year_options)
raise Failed(f"Config Error: {map_name} data starting attribute modifier invalid '{year_values[1]}'")
else: else:
try: return int(int_values[1].strip()) * (-1 if position_value.startswith("latest") else 1)
starting = util.parse("Config", "starting", dynamic_data, parent=f"{map_name} data", methods=award_methods, datatype="int", minimum=min_year)
except Failed:
raise Failed(f"Config Error: {map_name} data starting attribute invalid '{year_values[1]}'")
if not starting:
starting = current_year
if "ending" in award_methods and str(dynamic_data[award_methods["ending"]]).startswith("current_year"):
year_values = str(dynamic_data[award_methods["ending"]]).split("-")
try:
ending = current_year - (0 if len(year_values) == 1 else int(year_values[1].strip()))
except ValueError: except ValueError:
raise Failed(f"Config Error: {map_name} data ending attribute modifier invalid '{year_values[1]}'") raise Failed(f"Config Error: {map_name} data {attr} attribute modifier invalid '{int_values[1]}'")
elif position_value in year_options:
return year_options.index(position_value) + pos_add
else: else:
ending = util.parse("Config", "ending", dynamic_data, parent=f"{map_name} data", methods=award_methods, datatype="int", default=0, minimum=1) raise Failed(f"Config Error: {map_name} data {attr} attribute invalid: {position_value}")
if not ending:
ending = current_year - 5 found_options = year_options[get_position("starting"):get_position("ending")]
if starting > ending:
raise Failed(f"Config Error: {map_name} data ending must be greater than starting") if not found_options:
_, year_options = self.config.IMDb.get_event_years(event_id) raise Failed(f"Config Error: {map_name} data starting/ending range found no valid events")
for option in year_options: for option in event_years:
all_keys[option] = option all_keys[option] = option
if option not in exclude and starting <= int(option.split("-")[0] if "-" in option else option) <= ending: if option not in exclude and option in found_options:
auto_list[option] = option auto_list[option] = option
default_template = {"imdb_award": {"event_id": "<event_id>>", "event_year": "<<value>>", "winning": True}} default_template = {"imdb_award": {"event_id": "<<event_id>>", "event_year": "<<value>>", "winning": True}}
elif auto_type == "number": elif auto_type == "number":
if "data" not in methods: if "data" not in methods:
raise Failed(f"Config Error: {map_name} data attribute not found") raise Failed(f"Config Error: {map_name} data attribute not found")

Loading…
Cancel
Save