mirror of
https://github.com/meisnate12/Plex-Meta-Manager
synced 2024-11-10 06:54:21 +00:00
[6] fixed awards dynamic collections range
This commit is contained in:
parent
971c9ba2f8
commit
5501764f16
23 changed files with 29 additions and 27 deletions
|
@ -10,5 +10,6 @@ Updated lxml requirement to 5.1.0
|
||||||
# Bug Fixes
|
# Bug Fixes
|
||||||
Fixed the Rate Limit on MDbList calls
|
Fixed the Rate Limit on MDbList calls
|
||||||
Fixed collection fields being locked during batch edits when they shouldn't be
|
Fixed collection fields being locked during batch edits when they shouldn't be
|
||||||
|
Fixed awards dynamic collections where `latest` wasn't pulling the correct values
|
||||||
|
|
||||||
Various other Minor Fixes
|
Various other Minor Fixes
|
||||||
|
|
|
@ -46,7 +46,7 @@ Here are some examples of the things you can achieve using Plex Meta Manager!
|
||||||
|
|
||||||
![Movie Collection Preview](https://metamanager.wiki/en/latest/images/movie-collection-preview.png)
|
![Movie Collection Preview](https://metamanager.wiki/en/latest/images/movie-collection-preview.png)
|
||||||
|
|
||||||
**Example Show Overlays using the [Plex Meta Manager Defaults](https://metamanager.wiki/en/latest/defaults/overalys)** (click to enlarge):
|
**Example Show Overlays using the [Plex Meta Manager Defaults](https://metamanager.wiki/en/latest/defaults/overlays)** (click to enlarge):
|
||||||
|
|
||||||
![Show Library Preview](https://metamanager.wiki/en/latest/images/show-library-preview.png)
|
![Show Library Preview](https://metamanager.wiki/en/latest/images/show-library-preview.png)
|
||||||
|
|
||||||
|
|
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
||||||
1.20.0-develop5
|
1.20.0-develop6
|
||||||
|
|
|
@ -34,7 +34,7 @@ dynamic_collections:
|
||||||
sync: true
|
sync: true
|
||||||
data:
|
data:
|
||||||
event_id: ev0000123
|
event_id: ev0000123
|
||||||
starting: latest-5
|
starting: latest-4
|
||||||
ending: latest
|
ending: latest
|
||||||
title_format: BAFTA <<key_name>>
|
title_format: BAFTA <<key_name>>
|
||||||
template:
|
template:
|
||||||
|
|
|
@ -34,7 +34,7 @@ dynamic_collections:
|
||||||
sync: true
|
sync: true
|
||||||
data:
|
data:
|
||||||
event_id: ev0000091
|
event_id: ev0000091
|
||||||
starting: latest-5
|
starting: latest-4
|
||||||
ending: latest
|
ending: latest
|
||||||
title_format: Berlinale <<key_name>>
|
title_format: Berlinale <<key_name>>
|
||||||
template:
|
template:
|
||||||
|
|
|
@ -34,7 +34,7 @@ dynamic_collections:
|
||||||
sync: true
|
sync: true
|
||||||
data:
|
data:
|
||||||
event_id: ev0000147
|
event_id: ev0000147
|
||||||
starting: latest-5
|
starting: latest-4
|
||||||
ending: latest
|
ending: latest
|
||||||
title_format: Cannes <<key_name>>
|
title_format: Cannes <<key_name>>
|
||||||
template:
|
template:
|
||||||
|
|
|
@ -35,7 +35,7 @@ dynamic_collections:
|
||||||
sync: true
|
sync: true
|
||||||
data:
|
data:
|
||||||
event_id: ev0000157
|
event_id: ev0000157
|
||||||
starting: latest-5
|
starting: latest-4
|
||||||
ending: latest
|
ending: latest
|
||||||
title_format: Cesar <<key_name>>
|
title_format: Cesar <<key_name>>
|
||||||
template:
|
template:
|
||||||
|
|
|
@ -34,7 +34,7 @@ dynamic_collections:
|
||||||
sync: true
|
sync: true
|
||||||
data:
|
data:
|
||||||
event_id: ev0000133
|
event_id: ev0000133
|
||||||
starting: latest-5
|
starting: latest-4
|
||||||
ending: latest
|
ending: latest
|
||||||
title_format: Critics Choice Awards <<key_name>>
|
title_format: Critics Choice Awards <<key_name>>
|
||||||
template:
|
template:
|
||||||
|
|
|
@ -58,7 +58,7 @@ dynamic_collections:
|
||||||
sync: true
|
sync: true
|
||||||
data:
|
data:
|
||||||
event_id: ev0000223
|
event_id: ev0000223
|
||||||
starting: latest-5
|
starting: latest-4
|
||||||
ending: latest
|
ending: latest
|
||||||
title_format: Emmys <<key_name>>
|
title_format: Emmys <<key_name>>
|
||||||
template:
|
template:
|
||||||
|
|
|
@ -68,7 +68,7 @@ dynamic_collections:
|
||||||
sync: true
|
sync: true
|
||||||
data:
|
data:
|
||||||
event_id: ev0000292
|
event_id: ev0000292
|
||||||
starting: latest-5
|
starting: latest-4
|
||||||
ending: latest
|
ending: latest
|
||||||
title_format: Golden Globe <<key_name>>
|
title_format: Golden Globe <<key_name>>
|
||||||
template:
|
template:
|
||||||
|
|
|
@ -33,7 +33,7 @@ dynamic_collections:
|
||||||
sync: true
|
sync: true
|
||||||
data:
|
data:
|
||||||
event_id: ev0000468
|
event_id: ev0000468
|
||||||
starting: latest-5
|
starting: latest-4
|
||||||
ending: latest
|
ending: latest
|
||||||
title_format: National Film Registry <<key_name>>
|
title_format: National Film Registry <<key_name>>
|
||||||
template:
|
template:
|
||||||
|
|
|
@ -59,7 +59,7 @@ dynamic_collections:
|
||||||
sync: true
|
sync: true
|
||||||
data:
|
data:
|
||||||
event_id: ev0000003
|
event_id: ev0000003
|
||||||
starting: latest-5
|
starting: latest-4
|
||||||
ending: latest
|
ending: latest
|
||||||
title_format: Oscars Winners <<key_name>>
|
title_format: Oscars Winners <<key_name>>
|
||||||
template:
|
template:
|
||||||
|
|
|
@ -42,7 +42,7 @@ dynamic_collections:
|
||||||
sync: true
|
sync: true
|
||||||
data:
|
data:
|
||||||
event_id: ev0000530
|
event_id: ev0000530
|
||||||
starting: latest-5
|
starting: latest-4
|
||||||
ending: latest
|
ending: latest
|
||||||
title_format: People's Choice Awards <<key_name>>
|
title_format: People's Choice Awards <<key_name>>
|
||||||
template:
|
template:
|
||||||
|
|
|
@ -34,7 +34,7 @@ dynamic_collections:
|
||||||
sync: true
|
sync: true
|
||||||
data:
|
data:
|
||||||
event_id: ev0000558
|
event_id: ev0000558
|
||||||
starting: latest-5
|
starting: latest-4
|
||||||
ending: latest
|
ending: latest
|
||||||
title_format: Razzie <<key_name>>
|
title_format: Razzie <<key_name>>
|
||||||
template:
|
template:
|
||||||
|
|
|
@ -39,7 +39,7 @@ dynamic_collections:
|
||||||
sync: true
|
sync: true
|
||||||
data:
|
data:
|
||||||
event_id: ev0000598
|
event_id: ev0000598
|
||||||
starting: latest-5
|
starting: latest-4
|
||||||
ending: latest
|
ending: latest
|
||||||
title_format: Screen Actors Guild <<key_name>>
|
title_format: Screen Actors Guild <<key_name>>
|
||||||
template:
|
template:
|
||||||
|
|
|
@ -34,7 +34,7 @@ dynamic_collections:
|
||||||
sync: true
|
sync: true
|
||||||
data:
|
data:
|
||||||
event_id: ev0000349
|
event_id: ev0000349
|
||||||
starting: latest-5
|
starting: latest-4
|
||||||
ending: latest
|
ending: latest
|
||||||
title_format: Independent Spirit Awards <<key_name>>
|
title_format: Independent Spirit Awards <<key_name>>
|
||||||
template:
|
template:
|
||||||
|
|
|
@ -34,7 +34,7 @@ dynamic_collections:
|
||||||
sync: true
|
sync: true
|
||||||
data:
|
data:
|
||||||
event_id: ev0000631
|
event_id: ev0000631
|
||||||
starting: latest-5
|
starting: latest-4
|
||||||
ending: latest
|
ending: latest
|
||||||
title_format: Sundance Film Festival <<key_name>>
|
title_format: Sundance Film Festival <<key_name>>
|
||||||
template:
|
template:
|
||||||
|
|
|
@ -41,7 +41,7 @@ dynamic_collections:
|
||||||
sync: true
|
sync: true
|
||||||
data:
|
data:
|
||||||
event_id: ev0000659
|
event_id: ev0000659
|
||||||
starting: latest-5
|
starting: latest-4
|
||||||
ending: latest
|
ending: latest
|
||||||
title_format: Toronto International Film Festival <<key_name>>
|
title_format: Toronto International Film Festival <<key_name>>
|
||||||
template:
|
template:
|
||||||
|
|
|
@ -42,7 +42,7 @@ dynamic_collections:
|
||||||
sync: true
|
sync: true
|
||||||
data:
|
data:
|
||||||
event_id: ev0000681
|
event_id: ev0000681
|
||||||
starting: latest-5
|
starting: latest-4
|
||||||
ending: latest
|
ending: latest
|
||||||
title_format: Venice <<key_name>>
|
title_format: Venice <<key_name>>
|
||||||
template:
|
template:
|
||||||
|
|
|
@ -84,7 +84,7 @@ dynamic_collections:
|
||||||
# check1
|
# check1
|
||||||
trakt_url:
|
trakt_url:
|
||||||
mcu: https://trakt.tv/users/donxy/lists/marvel-cinematic-universe
|
mcu: https://trakt.tv/users/donxy/lists/marvel-cinematic-universe
|
||||||
trek: https://trakt.tv/users/wdvhucb/lists/star-trek
|
trek: https://trakt.tv/users/dgw/lists/star-trek-canon
|
||||||
middle: https://trakt.tv/users/oya-kesh/lists/middle-earth
|
middle: https://trakt.tv/users/oya-kesh/lists/middle-earth
|
||||||
# check2
|
# check2
|
||||||
mdblist_url:
|
mdblist_url:
|
||||||
|
|
|
@ -1000,27 +1000,28 @@ class MetadataFile(DataFile):
|
||||||
_, event_years = self.config.IMDb.get_event_years(event_id)
|
_, 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)]
|
year_options = [event_years[len(event_years) - i] for i in range(1, len(event_years) + 1)]
|
||||||
|
|
||||||
def get_position(attr, pos_add=0):
|
def get_position(attr):
|
||||||
if attr not in award_methods:
|
if attr not in award_methods:
|
||||||
return 0 if attr == "starting" else len(year_options)
|
return 0 if attr == "starting" else len(year_options)
|
||||||
position_value = str(dynamic_data[award_methods[attr]])
|
position_value = str(dynamic_data[award_methods[attr]])
|
||||||
if not position_value:
|
if not position_value:
|
||||||
raise Failed(f"Config Error: {map_name} data {attr} attribute is blank")
|
raise Failed(f"Config Error: {map_name} data {attr} attribute is blank")
|
||||||
if position_value.startswith(("first", "latest", "current_year")):
|
if position_value.startswith(("first", "latest", "current_year")):
|
||||||
int_values = position_value.split("+" if position_value.startswith("first") else "-")
|
is_first = position_value.startswith("first")
|
||||||
|
int_values = position_value.split("+" if is_first else "-")
|
||||||
try:
|
try:
|
||||||
if len(int_values) == 1:
|
if len(int_values) == 1:
|
||||||
return 0 if position_value.startswith("first") else len(year_options)
|
return 1 if is_first else len(year_options)
|
||||||
else:
|
else:
|
||||||
return int(int_values[1].strip()) * (1 if position_value.startswith("first") else -1)
|
return (int(int_values[1].strip()) + (1 if is_first else 0)) * (1 if is_first else -1)
|
||||||
except ValueError:
|
except ValueError:
|
||||||
raise Failed(f"Config Error: {map_name} data {attr} attribute modifier invalid '{int_values[1]}'")
|
raise Failed(f"Config Error: {map_name} data {attr} attribute modifier invalid '{int_values[1]}'")
|
||||||
elif position_value in year_options:
|
elif position_value in year_options:
|
||||||
return year_options.index(position_value) + pos_add
|
return year_options.index(position_value) + 1
|
||||||
else:
|
else:
|
||||||
raise Failed(f"Config Error: {map_name} data {attr} attribute invalid: {position_value}")
|
raise Failed(f"Config Error: {map_name} data {attr} attribute invalid: {position_value}")
|
||||||
|
|
||||||
found_options = year_options[get_position("starting"):get_position("ending")]
|
found_options = year_options[get_position("starting") - 1:get_position("ending")]
|
||||||
|
|
||||||
if not found_options:
|
if not found_options:
|
||||||
raise Failed(f"Config Error: {map_name} data starting/ending range found no valid events")
|
raise Failed(f"Config Error: {map_name} data starting/ending range found no valid events")
|
||||||
|
|
|
@ -55,7 +55,7 @@ class TVDbObj:
|
||||||
try:
|
try:
|
||||||
data = self._tvdb.get_request(item_url)
|
data = self._tvdb.get_request(item_url)
|
||||||
except Failed:
|
except Failed:
|
||||||
raise Failed(f"TVDb Error: {'Movie' if is_movie else 'Series'} not found at {item_url}")
|
raise Failed(f"TVDb Error: No {'Movie' if is_movie else 'Series'} found for TVDb ID: {tvdb_id} at {item_url}")
|
||||||
|
|
||||||
def parse_page(xpath, is_list=False):
|
def parse_page(xpath, is_list=False):
|
||||||
parse_results = data.xpath(xpath)
|
parse_results = data.xpath(xpath)
|
||||||
|
|
|
@ -394,7 +394,7 @@ def run_config(config, stats):
|
||||||
|
|
||||||
playlist_status = {}
|
playlist_status = {}
|
||||||
playlist_stats = {}
|
playlist_stats = {}
|
||||||
if (config.playlist_files or config.general["playlist_report"]) and not run_args["overlays-only"] and not run_args["operations-only"] and not run_args["collections-only"] and not config.requested_files:
|
if (config.playlist_files or config.general["playlist_report"]) and not run_args["overlays-only"] and not run_args["metadata-only"] and not run_args["operations-only"] and not run_args["collections-only"] and not config.requested_files:
|
||||||
#logger.add_playlists_handler()
|
#logger.add_playlists_handler()
|
||||||
if config.playlist_files:
|
if config.playlist_files:
|
||||||
playlist_status, playlist_stats = run_playlists(config)
|
playlist_status, playlist_stats = run_playlists(config)
|
||||||
|
|
Loading…
Reference in a new issue