|
|
@ -132,9 +132,14 @@ class Overlays:
|
|
|
|
if properties[over_name].name.startswith("text"):
|
|
|
|
if properties[over_name].name.startswith("text"):
|
|
|
|
for cache_key, cache_value in self.cache.query_overlay_special_text(item.ratingKey).items():
|
|
|
|
for cache_key, cache_value in self.cache.query_overlay_special_text(item.ratingKey).items():
|
|
|
|
actual = plex.attribute_translation[cache_key] if cache_key in plex.attribute_translation else cache_key
|
|
|
|
actual = plex.attribute_translation[cache_key] if cache_key in plex.attribute_translation else cache_key
|
|
|
|
if not hasattr(item, actual):
|
|
|
|
if actual == "total_runtime":
|
|
|
|
continue
|
|
|
|
sub_items = item.episodes() if current_overlay.level in ["show", "season"] else item.tracks()
|
|
|
|
real_value = getattr(item, actual)
|
|
|
|
sub_items = [ep.duration for ep in sub_items if hasattr(ep, "duration") and ep.duration]
|
|
|
|
|
|
|
|
real_value = sum(sub_items)
|
|
|
|
|
|
|
|
else:
|
|
|
|
|
|
|
|
if not hasattr(item, actual):
|
|
|
|
|
|
|
|
continue
|
|
|
|
|
|
|
|
real_value = getattr(item, actual)
|
|
|
|
if cache_value is None or real_value is None:
|
|
|
|
if cache_value is None or real_value is None:
|
|
|
|
continue
|
|
|
|
continue
|
|
|
|
if cache_key in overlay.float_vars:
|
|
|
|
if cache_key in overlay.float_vars:
|
|
|
|