[48] reload subfilter items

This commit is contained in:
meisnate12 2022-04-29 09:36:07 -04:00
parent 87ab93076f
commit 1af60977c7
4 changed files with 12 additions and 9 deletions

View file

@ -1 +1 @@
1.16.5-develop47
1.16.5-develop48

View file

@ -169,7 +169,6 @@ class CollectionBuilder:
self.libraries = []
self.playlist = library is None
self.overlay = overlay
self.asset_directory = metadata.asset_directory if metadata.asset_directory else self.library.asset_directory
methods = {m.lower(): m for m in self.data}
if self.playlist:
self.type = "playlist"
@ -329,6 +328,8 @@ class CollectionBuilder:
else:
self.libraries.append(self.library)
self.asset_directory = metadata.asset_directory if metadata.asset_directory else self.library.asset_directory
self.language = self.library.Plex.language
self.details = {
"show_filtered": self.library.show_filtered,

View file

@ -282,13 +282,14 @@ class Overlays:
return self.config.TMDb.get_movie(self.library.movie_rating_key_map[item.ratingKey]).poster_url
elif isinstance(item, (Show, Season, Episode)):
check_key = item.ratingKey if isinstance(item, Show) else item.show().ratingKey
tmdb_id = self.config.Convert.tvdb_to_tmdb(self.library.show_rating_key_map[check_key])
if isinstance(item, Show) and item.ratingKey in self.library.show_rating_key_map:
return self.config.TMDb.get_show(tmdb_id).poster_url
elif isinstance(item, Season):
return self.config.TMDb.get_season(tmdb_id, item.seasonNumber).poster_url
elif isinstance(item, Episode):
return self.config.TMDb.get_episode(tmdb_id, item.seasonNumber, item.episodeNumber).still_url
if check_key in self.library.show_rating_key_map:
tmdb_id = self.config.Convert.tvdb_to_tmdb(self.library.show_rating_key_map[check_key])
if isinstance(item, Show) and item.ratingKey in self.library.show_rating_key_map:
return self.config.TMDb.get_show(tmdb_id).poster_url
elif isinstance(item, Season):
return self.config.TMDb.get_season(tmdb_id, item.seasonNumber).poster_url
elif isinstance(item, Episode):
return self.config.TMDb.get_episode(tmdb_id, item.seasonNumber, item.episodeNumber).still_url
except Failed as e:
logger.error(e)

View file

@ -1101,6 +1101,7 @@ class Plex(Library):
return True
def check_filter(self, item, filter_attr, modifier, filter_final, filter_data, current_time):
self.reload(item)
filter_actual = attribute_translation[filter_attr] if filter_attr in attribute_translation else filter_attr
if isinstance(item, Movie):
item_type = "movie"