[36] level fix for sort

pull/811/head
meisnate12 3 years ago
parent 4772df82ae
commit 8dc4988255

@ -1 +1 @@
1.16.2-develop35 1.16.2-develop36

@ -2563,8 +2563,13 @@ class CollectionBuilder:
if self.custom_sort is True: if self.custom_sort is True:
items = self.added_items items = self.added_items
else: else:
collection_type = f"{self.collection_level}_collection" if self.collection_level in ["season", "episode"] else "collection" plex_search = {"sort_by": self.custom_sort}
search_data = self.build_filter("plex_search", {"sort_by": self.custom_sort, "any": {collection_type: self.name}}) if self.collection_level in ["season", "episode"]:
plex_search["type"] = f"{self.collection_level}s"
plex_search["any"] = {f"{self.collection_level}_collection": self.name}
else:
plex_search["any"] = {"collection": self.name}
search_data = self.build_filter("plex_search", plex_search)
items = self.library.get_filter_items(search_data[2]) items = self.library.get_filter_items(search_data[2])
previous = None previous = None
for item in items: for item in items:

Loading…
Cancel
Save