Skip to content

Commit

Permalink
[91] fix titleSort
Browse files Browse the repository at this point in the history
  • Loading branch information
meisnate12 committed Mar 4, 2022
1 parent 5b81efe commit ee5ad8b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 8 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.15.1-develop90
1.15.1-develop91
1 change: 0 additions & 1 deletion modules/meta.py
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,6 @@ def _check_dict(check_dict):
template_call[k] = v[key]
if key in titles:
collection_title = titles[key]

else:
if key in keys:
value = keys[key]
Expand Down
9 changes: 3 additions & 6 deletions plex_meta_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -434,13 +434,10 @@ def library_operations(config, library):
for i, item in enumerate(tracks, 1):
logger.ghost(f"Processing Track: {i}/{len(tracks)} {item.title}")
try:
if not hasattr(item, "title") or not hasattr(item, "sortTitle"):
item.refresh()
raise Failed(f"Track attributes not found refreshing metadata for {item.ratingKey}")
if not item.title and item.sortTitle:
library.edit_query(item, {"title.locked": 1, "title.value": item.sortTitle})
if not item.title and item.titleSort:
library.edit_query(item, {"title.locked": 1, "title.value": item.titleSort})
num_edited += 1
logger.info(f"Track: {item.sortTitle} was updated with sort title")
logger.info(f"Track: {item.titleSort} 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")
Expand Down

0 comments on commit ee5ad8b

Please sign in to comment.