From b6b01c4547f086b8021601b7237c8e925a89c755 Mon Sep 17 00:00:00 2001 From: meisnate12 Date: Thu, 3 Mar 2022 10:04:40 -0500 Subject: [PATCH] [87] #744 refresh items that dont have titleSort --- VERSION | 2 +- plex_meta_manager.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/VERSION b/VERSION index 1da7e851..da080adb 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.15.1-develop86 +1.15.1-develop87 diff --git a/plex_meta_manager.py b/plex_meta_manager.py index 99079a7b..3bc68fc9 100644 --- a/plex_meta_manager.py +++ b/plex_meta_manager.py @@ -433,7 +433,9 @@ def library_operations(config, library): num_edited = 0 for i, item in enumerate(tracks, 1): logger.ghost(f"Processing Track: {i}/{len(tracks)} {item.title}") - if not item.title and item.sortTitle: + if not hasattr(item, "title") or not hasattr(item, "titleSort"): + item.refresh() + elif not item.title and item.sortTitle: 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")