mirror of
https://github.com/meisnate12/Plex-Meta-Manager
synced 2024-11-26 14:30:25 +00:00
[88] #744 catch the error as well
This commit is contained in:
parent
b6b01c4547
commit
1e344ae3fe
2 changed files with 11 additions and 7 deletions
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
||||||
1.15.1-develop87
|
1.15.1-develop88
|
||||||
|
|
|
@ -433,12 +433,16 @@ def library_operations(config, library):
|
||||||
num_edited = 0
|
num_edited = 0
|
||||||
for i, item in enumerate(tracks, 1):
|
for i, item in enumerate(tracks, 1):
|
||||||
logger.ghost(f"Processing Track: {i}/{len(tracks)} {item.title}")
|
logger.ghost(f"Processing Track: {i}/{len(tracks)} {item.title}")
|
||||||
if not hasattr(item, "title") or not hasattr(item, "titleSort"):
|
try:
|
||||||
item.refresh()
|
if not hasattr(item, "title") or not hasattr(item, "titleSort"):
|
||||||
elif not item.title and item.sortTitle:
|
item.refresh()
|
||||||
library.edit_query(item, {"title.locked": 1, "title.value": item.sortTitle})
|
raise Failed(f"Track attributes not found refreshing metadata for {item.ratingKey}")
|
||||||
num_edited += 1
|
if not item.title and item.sortTitle:
|
||||||
logger.info(f"Track: {item.sortTitle} was updated with sort title")
|
library.edit_query(item, {"title.locked": 1, "title.value": item.sortTitle})
|
||||||
|
num_edited += 1
|
||||||
|
logger.info(f"Track: {item.sortTitle} was updated with sort title")
|
||||||
|
except Failed as e:
|
||||||
|
logger.error(e)
|
||||||
logger.info(f"{len(tracks)} Tracks Processed; {num_edited} Blank Track Titles Updated")
|
logger.info(f"{len(tracks)} Tracks Processed; {num_edited} Blank Track Titles Updated")
|
||||||
|
|
||||||
tmdb_collections = {}
|
tmdb_collections = {}
|
||||||
|
|
Loading…
Reference in a new issue