mirror of
https://github.com/meisnate12/Plex-Meta-Manager
synced 2024-11-26 14:30:25 +00:00
[91] fix titleSort
This commit is contained in:
parent
5b81efeed4
commit
ee5ad8b9b4
3 changed files with 4 additions and 8 deletions
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
||||||
1.15.1-develop90
|
1.15.1-develop91
|
||||||
|
|
|
@ -369,7 +369,6 @@ class MetadataFile(DataFile):
|
||||||
template_call[k] = v[key]
|
template_call[k] = v[key]
|
||||||
if key in titles:
|
if key in titles:
|
||||||
collection_title = titles[key]
|
collection_title = titles[key]
|
||||||
|
|
||||||
else:
|
else:
|
||||||
if key in keys:
|
if key in keys:
|
||||||
value = keys[key]
|
value = keys[key]
|
||||||
|
|
|
@ -434,13 +434,10 @@ def library_operations(config, library):
|
||||||
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}")
|
||||||
try:
|
try:
|
||||||
if not hasattr(item, "title") or not hasattr(item, "sortTitle"):
|
if not item.title and item.titleSort:
|
||||||
item.refresh()
|
library.edit_query(item, {"title.locked": 1, "title.value": item.titleSort})
|
||||||
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})
|
|
||||||
num_edited += 1
|
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:
|
except Failed as e:
|
||||||
logger.error(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")
|
||||||
|
|
Loading…
Reference in a new issue