[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
- name: arr
- 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:
BAFTA Awards:
type: number
type: imdb_awards
sync: true
data:
starting: current_year-5
ending: current_year
event_id: ev0000123
starting: latest-5
ending: latest
title_format: BAFTA <<key_name>>
template:
- use_year_collections
@ -40,10 +45,6 @@ dynamic_collections:
- arr
- custom
template_variables:
event_id:
default: ev0000123
event_year:
default: <<key>>
winning:
default: true
collection_order:

@ -23,15 +23,20 @@ collections:
translation_key: cannes_best
- name: arr
- 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:
Cannes Awards:
type: number
type: imdb_awards
sync: true
data:
starting: current_year-5
ending: current_year
event_id: ev0000147
starting: latest-5
ending: latest
title_format: Cannes <<key_name>>
template:
- use_year_collections
@ -40,10 +45,6 @@ dynamic_collections:
- arr
- custom
template_variables:
event_id:
default: ev0000147
event_year:
default: <<key>>
winning:
default: true
collection_order:

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

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

@ -23,13 +23,25 @@ collections:
translation_key: golden_picture
- name: arr
- name: custom
collection_order: release.desc
delete_collections_named:
- Golden Globe Best Motion Pictures
tmdb_list:
- 8191011 # Drama
- 8191022 # Musical or Comedy
- 8235497 # Animation
imdb_award:
event_id: ev0000292
event_year: all
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:
variables:
@ -43,14 +55,23 @@ collections:
- name: arr
- name: custom
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:
Golden Globes Awards:
type: number
type: imdb_awards
sync: true
data:
starting: current_year-5
ending: current_year
event_id: ev0000292
starting: latest-5
ending: latest
title_format: Golden Globe <<key_name>>
template:
- use_year_collections
@ -59,10 +80,6 @@ dynamic_collections:
- arr
- custom
template_variables:
event_id:
default: ev0000292
event_year:
default: <<key>>
winning:
default: true
collection_order:

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

@ -22,7 +22,11 @@ collections:
translation_key: berlinale_best
- name: arr
- 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:
variables:
@ -34,7 +38,11 @@ collections:
translation_key: cesar_best
- name: arr
- 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:
variables:
@ -46,7 +54,11 @@ collections:
translation_key: razzie_worst
- name: arr
- 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:
variables:
@ -58,4 +70,8 @@ collections:
translation_key: venice_best
- name: arr
- 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:
Independent Spirit Awards Awards:
type: number
type: imdb_awards
sync: true
data:
starting: current_year-5
ending: current_year
event_id: ev0000349
starting: latest-5
ending: latest
title_format: Independent Spirit Awards <<key_name>>
template:
- use_year_collections
@ -26,10 +27,6 @@ dynamic_collections:
- arr
- custom
template_variables:
event_id:
default: ev0000349
event_year:
default: <<key>>
winning:
default: true
collection_order:

@ -23,15 +23,20 @@ collections:
translation_key: sundance_best
- name: arr
- 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:
Sundance Film Festival:
type: number
type: imdb_awards
sync: true
data:
starting: current_year-5
ending: current_year
event_id: ev0000631
starting: latest-5
ending: latest
title_format: Sundance Film Festival <<key_name>>
template:
- use_year_collections
@ -40,10 +45,6 @@ dynamic_collections:
- arr
- custom
template_variables:
event_id:
default: ev0000631
event_year:
default: <<key>>
winning:
default: true
collection_order:

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

@ -143,7 +143,7 @@ smart_url_invalid = ["filters", "run_again", "sync_mode", "show_filtered", "show
custom_sort_builders = [
"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",
"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",
"trakt_trending", "trakt_popular", "trakt_boxoffice", "trakt_collected_daily", "trakt_collected_weekly",
"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
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])}]")
current_year = datetime.now().year
_, year_options = self.config.IMDb.get_event_years(event_id)
min_year = None
max_year = None
for option in year_options:
year = int(option.split("-")[0] if "-" in option else option)
if min_year is None or year < min_year:
min_year = year
if max_year is None or year > max_year:
max_year = year
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("-")
_, event_years = 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)]
def get_position(attr, pos_add=0):
if attr not in award_methods:
return 0 if attr == "starting" else len(year_options)
position_value = str(dynamic_data[award_methods[attr]])
if not position_value:
raise Failed(f"Config Error: {map_name} data {attr} attribute is blank")
if position_value.startswith(("first", "latest")):
int_values = position_value.split("+" if position_value.startswith("first") else "-")
try:
starting = current_year - (0 if len(year_values) == 1 else int(year_values[1].strip()))
except ValueError:
raise Failed(f"Config Error: {map_name} data starting attribute modifier invalid '{year_values[1]}'")
if len(int_values) == 1:
return 0 if position_value.startswith("first") else len(year_options)
else:
try:
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()))
return int(int_values[1].strip()) * (-1 if position_value.startswith("latest") else 1)
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:
ending = util.parse("Config", "ending", dynamic_data, parent=f"{map_name} data", methods=award_methods, datatype="int", default=0, minimum=1)
if not ending:
ending = current_year - 5
if starting > ending:
raise Failed(f"Config Error: {map_name} data ending must be greater than starting")
_, year_options = self.config.IMDb.get_event_years(event_id)
for option in year_options:
raise Failed(f"Config Error: {map_name} data {attr} attribute invalid: {position_value}")
found_options = year_options[get_position("starting"):get_position("ending")]
if not found_options:
raise Failed(f"Config Error: {map_name} data starting/ending range found no valid events")
for option in event_years:
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
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":
if "data" not in methods:
raise Failed(f"Config Error: {map_name} data attribute not found")

Loading…
Cancel
Save