|
|
@ -170,11 +170,12 @@ custom_sort_builders = [
|
|
|
|
"mal_all", "mal_airing", "mal_upcoming", "mal_tv", "mal_movie", "mal_ova", "mal_special",
|
|
|
|
"mal_all", "mal_airing", "mal_upcoming", "mal_tv", "mal_movie", "mal_ova", "mal_special",
|
|
|
|
"mal_popular", "mal_favorite", "mal_suggested", "mal_userlist", "mal_season", "mal_genre", "mal_studio"
|
|
|
|
"mal_popular", "mal_favorite", "mal_suggested", "mal_userlist", "mal_season", "mal_genre", "mal_studio"
|
|
|
|
]
|
|
|
|
]
|
|
|
|
|
|
|
|
episode_parts_only = ["plex_pilots"]
|
|
|
|
parts_collection_valid = [
|
|
|
|
parts_collection_valid = [
|
|
|
|
"plex_all", "plex_search", "trakt_list", "trakt_list_details", "collection_mode", "label", "visible_library", "changes_webhooks"
|
|
|
|
"plex_all", "plex_search", "trakt_list", "trakt_list_details", "collection_mode", "label", "visible_library",
|
|
|
|
"visible_home", "visible_shared", "show_missing", "save_missing", "missing_only_released", "server_preroll",
|
|
|
|
"visible_home", "visible_shared", "show_missing", "save_missing", "missing_only_released", "server_preroll", "changes_webhooks",
|
|
|
|
"item_lock_background", "item_lock_poster", "item_lock_title", "item_refresh", "item_refresh_delay", "imdb_list"
|
|
|
|
"item_lock_background", "item_lock_poster", "item_lock_title", "item_refresh", "item_refresh_delay", "imdb_list"
|
|
|
|
] + summary_details + poster_details + background_details + string_details
|
|
|
|
] + episode_parts_only + summary_details + poster_details + background_details + string_details
|
|
|
|
playlist_attributes = [
|
|
|
|
playlist_attributes = [
|
|
|
|
"filters", "name_mapping", "show_filtered", "show_missing", "save_missing",
|
|
|
|
"filters", "name_mapping", "show_filtered", "show_missing", "save_missing",
|
|
|
|
"missing_only_released", "only_filter_missing", "delete_below_minimum", "ignore_ids", "ignore_imdb_ids",
|
|
|
|
"missing_only_released", "only_filter_missing", "delete_below_minimum", "ignore_ids", "ignore_imdb_ids",
|
|
|
@ -505,6 +506,8 @@ class CollectionBuilder:
|
|
|
|
raise Failed(f"{self.Type} Error: {method_final} attribute only allowed for album collections")
|
|
|
|
raise Failed(f"{self.Type} Error: {method_final} attribute only allowed for album collections")
|
|
|
|
elif not self.library.is_music and method_name in music_only_builders:
|
|
|
|
elif not self.library.is_music and method_name in music_only_builders:
|
|
|
|
raise Failed(f"{self.Type} Error: {method_final} attribute only allowed for music libraries")
|
|
|
|
raise Failed(f"{self.Type} Error: {method_final} attribute only allowed for music libraries")
|
|
|
|
|
|
|
|
elif self.collection_level != "episode" and method_name in episode_parts_only:
|
|
|
|
|
|
|
|
raise Failed(f"{self.Type} Error: {method_final} attribute only allowed with Collection Level: episode")
|
|
|
|
elif self.parts_collection and method_name not in parts_collection_valid:
|
|
|
|
elif self.parts_collection and method_name not in parts_collection_valid:
|
|
|
|
raise Failed(f"{self.Type} Error: {method_final} attribute not allowed with Collection Level: {self.collection_level.capitalize()}")
|
|
|
|
raise Failed(f"{self.Type} Error: {method_final} attribute not allowed with Collection Level: {self.collection_level.capitalize()}")
|
|
|
|
elif self.smart and method_name in smart_invalid:
|
|
|
|
elif self.smart and method_name in smart_invalid:
|
|
|
@ -1057,7 +1060,7 @@ class CollectionBuilder:
|
|
|
|
}))
|
|
|
|
}))
|
|
|
|
|
|
|
|
|
|
|
|
def _plex(self, method_name, method_data):
|
|
|
|
def _plex(self, method_name, method_data):
|
|
|
|
if method_name == "plex_all":
|
|
|
|
if method_name in ["plex_all", "plex_pilots"]:
|
|
|
|
self.builders.append((method_name, self.collection_level))
|
|
|
|
self.builders.append((method_name, self.collection_level))
|
|
|
|
elif method_name in ["plex_search", "plex_collectionless"]:
|
|
|
|
elif method_name in ["plex_search", "plex_collectionless"]:
|
|
|
|
for dict_data, dict_methods in self._parse(method_name, method_data, datatype="dictlist"):
|
|
|
|
for dict_data, dict_methods in self._parse(method_name, method_data, datatype="dictlist"):
|
|
|
@ -2091,12 +2094,13 @@ class CollectionBuilder:
|
|
|
|
path = path[:-1] if path.endswith(('/', '\\')) else path
|
|
|
|
path = path[:-1] if path.endswith(('/', '\\')) else path
|
|
|
|
tvdb_paths.append((self.library.show_rating_key_map[item.ratingKey], path))
|
|
|
|
tvdb_paths.append((self.library.show_rating_key_map[item.ratingKey], path))
|
|
|
|
advance_edits = {}
|
|
|
|
advance_edits = {}
|
|
|
|
prefs = [p.id for p in item.preferences()]
|
|
|
|
if hasattr(item, "preferences"):
|
|
|
|
for method_name, method_data in self.item_details.items():
|
|
|
|
prefs = [p.id for p in item.preferences()]
|
|
|
|
if method_name in plex.item_advance_keys:
|
|
|
|
for method_name, method_data in self.item_details.items():
|
|
|
|
key, options = plex.item_advance_keys[method_name]
|
|
|
|
if method_name in plex.item_advance_keys:
|
|
|
|
if key in prefs and getattr(item, key) != options[method_data]:
|
|
|
|
key, options = plex.item_advance_keys[method_name]
|
|
|
|
advance_edits[key] = options[method_data]
|
|
|
|
if key in prefs and getattr(item, key) != options[method_data]:
|
|
|
|
|
|
|
|
advance_edits[key] = options[method_data]
|
|
|
|
self.library.edit_item(item, item.title, self.collection_level.capitalize(), advance_edits, advanced=True)
|
|
|
|
self.library.edit_item(item, item.title, self.collection_level.capitalize(), advance_edits, advanced=True)
|
|
|
|
|
|
|
|
|
|
|
|
if "item_tmdb_season_titles" in self.item_details and item.ratingKey in self.library.show_rating_key_map:
|
|
|
|
if "item_tmdb_season_titles" in self.item_details and item.ratingKey in self.library.show_rating_key_map:
|
|
|
|