mirror of
https://github.com/meisnate12/Plex-Meta-Manager
synced 2024-11-10 06:54:21 +00:00
[66] fix asset_depth
This commit is contained in:
parent
54c7581bf8
commit
7b32bdcb86
4 changed files with 12 additions and 10 deletions
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
|||
1.16.5-develop65
|
||||
1.16.5-develop66
|
||||
|
|
|
@ -881,7 +881,7 @@ class Plex(Library):
|
|||
if asset_directory is None:
|
||||
asset_directory = self.asset_directory
|
||||
|
||||
is_top_level = isinstance(item, (Movie, Artist, Show, Collection, Playlist))
|
||||
is_top_level = isinstance(item, (Movie, Artist, Show, Collection, Playlist, str))
|
||||
if isinstance(item, Album):
|
||||
prefix = f"{item.title} Album {item.title}'s "
|
||||
file_name = item.title
|
||||
|
@ -892,7 +892,7 @@ class Plex(Library):
|
|||
prefix = f"{item.title} {item.seasonEpisode.upper()}'s "
|
||||
file_name = item.seasonEpisode.upper()
|
||||
else:
|
||||
prefix = f"{item.title if is_top_level else item}'s "
|
||||
prefix = f"{item if isinstance(item, str) else item.title}'s "
|
||||
file_name = "poster"
|
||||
|
||||
if not item_asset_directory:
|
||||
|
@ -922,6 +922,7 @@ class Plex(Library):
|
|||
matches = util.glob_filter(os.path.join(new_path, folder_name))
|
||||
if len(matches) > 0:
|
||||
item_asset_directory = os.path.abspath(matches[0])
|
||||
break
|
||||
else:
|
||||
matches = util.glob_filter(os.path.join(ad, f"{file_name}.*"))
|
||||
if len(matches) > 0:
|
||||
|
|
|
@ -159,7 +159,7 @@ class Webhooks:
|
|||
if "error" in json:
|
||||
title = f":warning: Plex Meta Manager Encountered {'a Critical' if json['critical'] else 'an'} Error"
|
||||
rows.append([])
|
||||
rows.append([(json["notes"], )])
|
||||
rows.append([(json["error"], )])
|
||||
else:
|
||||
if json["deleted"]:
|
||||
title = f":heavy_minus_sign: A {text} has Been Deleted!"
|
||||
|
@ -249,7 +249,7 @@ class Webhooks:
|
|||
rows.append(row1)
|
||||
if "error" in json:
|
||||
title = f"{'Critical ' if json['critical'] else ''}Error"
|
||||
rows.append([("Error Message", json["notes"])])
|
||||
rows.append([("Error Message", json["error"])])
|
||||
else:
|
||||
if json["deleted"]:
|
||||
title = f"{text} Deleted"
|
||||
|
|
|
@ -402,10 +402,10 @@ def update_libraries(config):
|
|||
|
||||
def print_status( status):
|
||||
logger.info(f"{'Title':^{longest}} | + | = | - | Run Time | {'Status'}")
|
||||
breaker = f"{logger.separating_character * longest}|{logger.separating_character * 5}|{logger.separating_character * 5}|{logger.separating_character * 5}|"
|
||||
breaker = f"{logger.separating_character * longest}|{logger.separating_character * 7}|{logger.separating_character * 7}|{logger.separating_character * 7}|{logger.separating_character * 10}|"
|
||||
logger.separator(breaker, space=False, border=False, side_space=False, left=True)
|
||||
for name, data in status.items():
|
||||
logger.info(f"{name:<{longest}} | {data['added']:^3} | {data['unchanged']:^3} | {data['removed']:^3} | {data['run_time']:>8} | {data['status']}")
|
||||
logger.info(f"{name:<{longest}} | {data['added']:>5} | {data['unchanged']:>5} | {data['removed']:>5} | {data['run_time']:>8} | {data['status']}")
|
||||
if data["errors"]:
|
||||
for error in data["errors"]:
|
||||
logger.info(error)
|
||||
|
@ -416,9 +416,10 @@ def update_libraries(config):
|
|||
logger.info("")
|
||||
logger.separator(f"{library.name} Summary", space=False, border=False)
|
||||
logger.info("")
|
||||
logger.info(f"{'Title':<27} | Run Time")
|
||||
logger.info(f"{'Title':<27} | Run Time |")
|
||||
logger.separator(f"{logger.separating_character * 27}|{logger.separating_character * 10}|", space=False, border=False, side_space=False, left=True)
|
||||
for text, value in library_status[library.name].items():
|
||||
logger.info(f"{text:<27} | {value:>8}")
|
||||
logger.info(f"{text:<27} | {value:>8} |")
|
||||
logger.info("")
|
||||
print_status(library.status)
|
||||
if playlist_status:
|
||||
|
|
Loading…
Reference in a new issue