mirror of
https://github.com/meisnate12/Plex-Meta-Manager
synced 2024-11-10 06:54:21 +00:00
[62] small fixes
This commit is contained in:
parent
47a664c63b
commit
c8910efc7d
8 changed files with 44 additions and 42 deletions
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
|||
1.19.1-develop61
|
||||
1.19.1-develop62
|
||||
|
|
|
@ -20,6 +20,7 @@ templates:
|
|||
tmdb_collection_<<key>>: <<tmdb_collection>>
|
||||
tmdb_movie_<<key>>: <<tmdb_movie>>
|
||||
imdb_list_<<key>>: <<imdb_list>>
|
||||
imdb_search_<<key>>: <<imdb_search>>
|
||||
trakt_list_<<key>>: <<trakt_list>>
|
||||
mdblist_list_<<key>>: <<mdblist_list>>
|
||||
summary_<<key>>: <<summary_format>>
|
||||
|
@ -32,6 +33,7 @@ templates:
|
|||
- tmdb_movie
|
||||
- limit
|
||||
- imdb_list
|
||||
- imdb_search
|
||||
- trakt_list
|
||||
- mdblist_list
|
||||
- summary_format
|
||||
|
@ -50,6 +52,7 @@ templates:
|
|||
tmdb_collection: <<tmdb_collection_<<key>>>>
|
||||
tmdb_movie: <<tmdb_movie_<<key>>>>
|
||||
imdb_list: <<imdb_list_<<key>>>>
|
||||
imdb_search: <<imdb_search_<<key>>>>
|
||||
trakt_list: <<trakt_list_<<key>>>>
|
||||
mdblist_list: <<mdblist_list_<<key>>>>
|
||||
cache_builders: 1
|
||||
|
@ -164,10 +167,10 @@ dynamic_collections:
|
|||
- https://www.imdb.com/list/ls000835734/
|
||||
- https://www.imdb.com/list/ls091597850/
|
||||
christmas: https://www.imdb.com/list/ls000096828/
|
||||
imdb_search:
|
||||
women:
|
||||
- https://www.imdb.com/search/keyword/?keywords=women-in-film&ref_=fn_kw_kw_9
|
||||
- https://www.imdb.com/search/keyword/?keywords=women%27s-rights&ref_=fn_kw_kw_2
|
||||
- https://www.imdb.com/search/keyword/?keywords=women%27s-suffrage&ref_=fn_kw_kw_13
|
||||
- keyword.any: women in film, womens rights, womens suffrage
|
||||
limit: 500
|
||||
tmdb_collection:
|
||||
halloween:
|
||||
- 185103 # Hotel Transylvania
|
||||
|
|
|
@ -66,7 +66,7 @@ templates:
|
|||
- key: dtsx
|
||||
value: '(?i)\bdts[ ._-]?x\b'
|
||||
- key: plus_atmos
|
||||
value: '(?i)^(?=.*\b(dd[p+]|dolby[ ._-]digital[ ._-]plus|e[ ._-]?ac3\b))(?=.*\batmos(\b|\d))'
|
||||
value: '(?i)^(?=.*\b(dd[p+])|(dolby[ ._-]digital[ ._-]plus)|(e[ ._-]?ac3)\b)(?=.*\batmos(\b|\d))'
|
||||
- key: dolby_atmos
|
||||
value: '(?i)\batmos(\b|\d)'
|
||||
- key: truehd
|
||||
|
|
|
@ -1124,7 +1124,7 @@ class CollectionBuilder:
|
|||
if self.obj:
|
||||
if check_url != self.library.smart_filter(self.obj):
|
||||
self.library.update_smart_collection(self.obj, check_url)
|
||||
logger.info(f"Detail: Smart Collection updated to {check_url}")
|
||||
logger.info(f"Metadata: Smart Collection updated to {check_url}")
|
||||
self.beginning_count = len(self.library.fetchItems(check_url)) if check_url else 0
|
||||
if self.obj:
|
||||
self.exists = True
|
||||
|
@ -1485,6 +1485,7 @@ class CollectionBuilder:
|
|||
else:
|
||||
raise Failed(f"{self.Type} Error: imdb_id {value} must begin with tt")
|
||||
elif method_name == "imdb_list":
|
||||
logger.warning(f"{self.Type} Warning: imdb_list has been deprecated, and at some point may no longer work. Please switch to using imdb_search.")
|
||||
for imdb_dict in self.config.IMDb.validate_imdb_lists(self.Type, method_data, self.language):
|
||||
self.builders.append((method_name, imdb_dict))
|
||||
elif method_name == "imdb_chart":
|
||||
|
@ -1507,7 +1508,7 @@ class CollectionBuilder:
|
|||
year_options = self.config.IMDb.get_event_years(event_id)
|
||||
if not year_options:
|
||||
raise Failed(f"{self.Type} Error: imdb_award event_id attribute: No event found at {imdb.base_url}/event/{event_id}")
|
||||
event_year = util.parse(self.Type, "event_year", dict_data, parent=method_name, methods=dict_methods, options=year_options)
|
||||
event_year = str(util.parse(self.Type, "event_year", dict_data, parent=method_name, methods=dict_methods, options=year_options))
|
||||
try:
|
||||
award_filters = util.parse(self.Type, "award_filter", dict_data, parent=method_name, methods=dict_methods, datatype="lowerlist")
|
||||
except Failed:
|
||||
|
@ -1616,9 +1617,7 @@ class CollectionBuilder:
|
|||
countries.append(str(country))
|
||||
if countries:
|
||||
new_dictionary[lower_method] = countries
|
||||
elif search_attr == "keyword":
|
||||
new_dictionary[lower_method] = util.parse(self.Type, search_method, search_data, datatype="strlist", parent=method_name)
|
||||
elif search_attr == "language":
|
||||
elif search_attr in ["keyword", "language"]:
|
||||
new_dictionary[lower_method] = util.parse(self.Type, search_method, search_data, datatype="lowerlist", parent=method_name)
|
||||
elif search_attr == "cast":
|
||||
casts = []
|
||||
|
@ -2981,7 +2980,7 @@ class CollectionBuilder:
|
|||
|
||||
def update_item_details(self):
|
||||
logger.info("")
|
||||
logger.separator(f"Updating Details of the Items in {self.name} {self.Type}", space=False, border=False)
|
||||
logger.separator(f"Updating Metadata of the Items in {self.name} {self.Type}", space=False, border=False)
|
||||
logger.info("")
|
||||
|
||||
add_tags = self.item_details["item_label"] if "item_label" in self.item_details else None
|
||||
|
@ -3036,11 +3035,11 @@ class CollectionBuilder:
|
|||
if key in prefs and getattr(item, key) != options[method_data]:
|
||||
advance_edits[key] = options[method_data]
|
||||
if advance_edits:
|
||||
logger.debug(f"Details Update: {advance_edits}")
|
||||
logger.debug(f"Metadata Update: {advance_edits}")
|
||||
if self.library.edit_advance(item, advance_edits):
|
||||
logger.info(f"{item.title} Advanced Details Update Successful")
|
||||
logger.info(f"{item.title} Advanced Metadata Update Successful")
|
||||
else:
|
||||
logger.error(f"{item.title} Advanced Details Update Failed")
|
||||
logger.error(f"{item.title} Advanced Metadata Update Failed")
|
||||
|
||||
if "item_tmdb_season_titles" in self.item_details and item.ratingKey in self.library.show_rating_key_map:
|
||||
try:
|
||||
|
@ -3114,7 +3113,7 @@ class CollectionBuilder:
|
|||
def update_details(self):
|
||||
updated_details = []
|
||||
logger.info("")
|
||||
logger.separator(f"Updating Details of {self.name} {self.Type}", space=False, border=False)
|
||||
logger.separator(f"Updating Metadata 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"])
|
||||
|
@ -3148,10 +3147,10 @@ class CollectionBuilder:
|
|||
try:
|
||||
self.obj.edit(summary=str(summary[1]))
|
||||
logger.info(f"Summary ({summary[0]}) | {summary[1]:<25}")
|
||||
logger.info("Details: have been updated")
|
||||
logger.info("Metadata: Update Completed")
|
||||
updated_details.append("Metadata")
|
||||
except NotFound:
|
||||
logger.error("Details: Failed to Update Please delete the collection and run again")
|
||||
logger.error("Metadata: Failed to Update Please delete the collection and run again")
|
||||
logger.info("")
|
||||
else:
|
||||
self.library._reload(self.obj)
|
||||
|
@ -3194,10 +3193,10 @@ class CollectionBuilder:
|
|||
if len(batch_display) > 25:
|
||||
try:
|
||||
#self.obj.saveEdits()
|
||||
logger.info("Details: have been updated")
|
||||
logger.info("Metadata: Update Completed")
|
||||
updated_details.append("Metadata")
|
||||
except NotFound:
|
||||
logger.error("Details: Failed to Update Please delete the collection and run again")
|
||||
logger.error("Metadata: Failed to Update Please delete the collection and run again")
|
||||
logger.info("")
|
||||
|
||||
advance_update = False
|
||||
|
|
|
@ -109,8 +109,8 @@ class IMDb:
|
|||
else:
|
||||
imdb_url = imdb_dict[dict_methods["url"]].strip()
|
||||
if not imdb_url.startswith(tuple([v for k, v in urls.items()])):
|
||||
fails = "\n".join([f"{v} (For {k.replace('_', ' ').title()})" for k, v in urls.items()])
|
||||
raise Failed(f"IMDb Error: {imdb_url} must begin with either:{fails}")
|
||||
fails = "\n ".join([f"{v} (For {k.replace('_', ' ').title()})" for k, v in urls.items()])
|
||||
raise Failed(f"IMDb Error: {imdb_url} must begin with either:\n {fails}")
|
||||
self._total(imdb_url, language)
|
||||
list_count = None
|
||||
if "limit" in dict_methods:
|
||||
|
|
|
@ -208,12 +208,12 @@ class Library(ABC):
|
|||
item.removeLabel("Overlay")
|
||||
self._upload_image(item, poster)
|
||||
poster_uploaded = True
|
||||
logger.info(f"Detail: {poster.attribute} updated {poster.message}")
|
||||
logger.info(f"Metadata: {poster.attribute} updated {poster.message}")
|
||||
elif self.show_asset_not_needed:
|
||||
logger.info(f"Detail: {poster.prefix}poster update not needed")
|
||||
logger.info(f"Metadata: {poster.prefix}poster update not needed")
|
||||
except Failed:
|
||||
logger.stacktrace()
|
||||
logger.error(f"Detail: {poster.attribute} failed to update {poster.message}")
|
||||
logger.error(f"Metadata: {poster.attribute} failed to update {poster.message}")
|
||||
|
||||
background_uploaded = False
|
||||
if background is not None:
|
||||
|
@ -224,12 +224,12 @@ class Library(ABC):
|
|||
if not image_compare or str(background.compare) != str(image_compare):
|
||||
self._upload_image(item, background)
|
||||
background_uploaded = True
|
||||
logger.info(f"Detail: {background.attribute} updated {background.message}")
|
||||
logger.info(f"Metadata: {background.attribute} updated {background.message}")
|
||||
elif self.show_asset_not_needed:
|
||||
logger.info(f"Detail: {background.prefix}background update not needed")
|
||||
logger.info(f"Metadata: {background.prefix}background update not needed")
|
||||
except Failed:
|
||||
logger.stacktrace()
|
||||
logger.error(f"Detail: {background.attribute} failed to update {background.message}")
|
||||
logger.error(f"Metadata: {background.attribute} failed to update {background.message}")
|
||||
if self.config.Cache:
|
||||
if poster_uploaded:
|
||||
self.config.Cache.update_image_map(item.ratingKey, self.image_table_name, "", poster.compare if poster else "")
|
||||
|
|
|
@ -1680,7 +1680,7 @@ class MetadataFile(DataFile):
|
|||
current_item.editTitle(final_value)
|
||||
else:
|
||||
current_item.editField(key, final_value)
|
||||
logger.info(f"Detail: {name} updated to {final_value}")
|
||||
logger.info(f"Metadata: {name} updated to {final_value}")
|
||||
updated = True
|
||||
except Failed as ee:
|
||||
logger.error(ee)
|
||||
|
@ -1692,9 +1692,9 @@ class MetadataFile(DataFile):
|
|||
if updated:
|
||||
try:
|
||||
#current_item.saveEdits()
|
||||
logger.info(f"{description} Details Update Successful")
|
||||
logger.info(f"{description} Metadata Update Successful")
|
||||
except BadRequest:
|
||||
logger.error(f"{description} Details Update Failed")
|
||||
logger.error(f"{description} Metadata Update Failed")
|
||||
|
||||
tmdb_item = None
|
||||
tmdb_is_movie = None
|
||||
|
@ -1776,15 +1776,15 @@ class MetadataFile(DataFile):
|
|||
logger.error(f"{self.type_str} Error: {meta[methods[advance_edit]]} {advance_edit} attribute invalid")
|
||||
elif ad_key in prefs and getattr(item, ad_key) != options[method_data]:
|
||||
advance_edits[ad_key] = options[method_data]
|
||||
logger.info(f"Detail: {advance_edit} updated to {method_data}")
|
||||
logger.info(f"Metadata: {advance_edit} updated to {method_data}")
|
||||
else:
|
||||
logger.error(f"{self.type_str} Error: {advance_edit} attribute is blank")
|
||||
if advance_edits:
|
||||
if self.library.edit_advance(item, advance_edits):
|
||||
updated = True
|
||||
logger.info(f"{mapping_name} Advanced Details Update Successful")
|
||||
logger.info(f"{mapping_name} Advanced Metadata Update Successful")
|
||||
else:
|
||||
logger.error(f"{mapping_name} Advanced Details Update Failed")
|
||||
logger.error(f"{mapping_name} Advanced Metadata Update Failed")
|
||||
|
||||
style_data = None
|
||||
if "style_data" in methods:
|
||||
|
@ -1794,7 +1794,7 @@ class MetadataFile(DataFile):
|
|||
asset_location, folder_name, ups = self.library.item_images(item, meta, methods, initial=True, asset_directory=self.asset_directory + self.library.asset_directory if self.asset_directory else None, style_data=style_data)
|
||||
if ups:
|
||||
updated = True
|
||||
logger.info(f"{self.library.type}: {mapping_name} Details Update {'Complete' if updated else 'Not Needed'}")
|
||||
logger.info(f"{self.library.type}: {mapping_name} Metadata Update {'Complete' if updated else 'Not Needed'}")
|
||||
|
||||
update_seasons = self.update_seasons
|
||||
if "update_seasons" in methods and self.library.is_show:
|
||||
|
@ -1861,7 +1861,7 @@ class MetadataFile(DataFile):
|
|||
folder_name=folder_name, style_data=season_style_data)
|
||||
if ups:
|
||||
updated = True
|
||||
logger.info(f"Season {season_id} of {mapping_name} Details Update {'Complete' if updated else 'Not Needed'}")
|
||||
logger.info(f"Season {season_id} of {mapping_name} Metadata Update {'Complete' if updated else 'Not Needed'}")
|
||||
|
||||
if "episodes" in season_methods and update_episodes and self.library.is_show:
|
||||
if not season_dict[season_methods["episodes"]]:
|
||||
|
@ -1912,7 +1912,7 @@ class MetadataFile(DataFile):
|
|||
style_data=episode_style_data)
|
||||
if ups:
|
||||
updated = True
|
||||
logger.info(f"Episode {episode_id} in Season {season_id} of {mapping_name} Details Update {'Complete' if updated else 'Not Needed'}")
|
||||
logger.info(f"Episode {episode_id} in Season {season_id} of {mapping_name} Metadata Update {'Complete' if updated else 'Not Needed'}")
|
||||
|
||||
if "episodes" in methods and update_episodes and self.library.is_show:
|
||||
if not meta[methods["episodes"]]:
|
||||
|
@ -1955,7 +1955,7 @@ class MetadataFile(DataFile):
|
|||
image_name=episode.seasonEpisode.upper(), folder_name=folder_name)
|
||||
if ups:
|
||||
updated = True
|
||||
logger.info(f"Episode S{season_id}E{episode_id} of {mapping_name} Details Update {'Complete' if updated else 'Not Needed'}")
|
||||
logger.info(f"Episode S{season_id}E{episode_id} of {mapping_name} Metadata Update {'Complete' if updated else 'Not Needed'}")
|
||||
|
||||
if "albums" in methods and self.library.is_music:
|
||||
if not meta[methods["albums"]]:
|
||||
|
@ -1996,7 +1996,7 @@ class MetadataFile(DataFile):
|
|||
title=f"{item.title} Album {album.title}", image_name=album.title, folder_name=folder_name)
|
||||
if ups:
|
||||
updated = True
|
||||
logger.info(f"Album: {title} of {mapping_name} Details Update {'Complete' if updated else 'Not Needed'}")
|
||||
logger.info(f"Album: {title} of {mapping_name} Metadata Update {'Complete' if updated else 'Not Needed'}")
|
||||
|
||||
if "tracks" in album_methods:
|
||||
if not album_dict[album_methods["tracks"]]:
|
||||
|
@ -2035,7 +2035,7 @@ class MetadataFile(DataFile):
|
|||
if not title:
|
||||
title = track.title
|
||||
finish_edit(track, f"Track: {title}")
|
||||
logger.info(f"Track: {track_num} on Album: {title} of {mapping_name} Details Update {'Complete' if updated else 'Not Needed'}")
|
||||
logger.info(f"Track: {track_num} on Album: {title} of {mapping_name} Metadata Update {'Complete' if updated else 'Not Needed'}")
|
||||
|
||||
if "f1_season" in methods and self.library.is_show:
|
||||
f1_season = None
|
||||
|
@ -2090,7 +2090,7 @@ class MetadataFile(DataFile):
|
|||
image_name=f"Season{'0' if season.seasonNumber < 10 else ''}{season.seasonNumber}", folder_name=folder_name)
|
||||
if ups:
|
||||
updated = True
|
||||
logger.info(f"Race {season.seasonNumber} of F1 Season {f1_season}: Details Update {'Complete' if updated else 'Not Needed'}")
|
||||
logger.info(f"Race {season.seasonNumber} of F1 Season {f1_season}: Metadata Update {'Complete' if updated else 'Not Needed'}")
|
||||
for episode in season.episodes():
|
||||
if len(episode.locations) > 0:
|
||||
ep_title, session_date = race.session_info(episode.locations[0], sprint_weekend)
|
||||
|
@ -2102,7 +2102,7 @@ class MetadataFile(DataFile):
|
|||
image_name=episode.seasonEpisode.upper(), folder_name=folder_name)
|
||||
if ups:
|
||||
updated = True
|
||||
logger.info(f"Session {episode.title}: Details Update {'Complete' if updated else 'Not Needed'}")
|
||||
logger.info(f"Session {episode.title}: Metadata Update {'Complete' if updated else 'Not Needed'}")
|
||||
else:
|
||||
logger.warning(f"Ergast Error: No Round: {season.seasonNumber} for Season {f1_season}")
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ lxml==4.9.4
|
|||
num2words==0.5.13
|
||||
pathvalidate==3.2.0
|
||||
pillow==10.1.0
|
||||
PlexAPI==4.15.6
|
||||
PlexAPI==4.15.7
|
||||
psutil==5.9.7
|
||||
python-dotenv==1.0.0
|
||||
requests==2.31.0
|
||||
|
|
Loading…
Reference in a new issue