|
|
|
@ -95,6 +95,7 @@ all_filters = [
|
|
|
|
|
"release", "release.not", "release.before", "release.after", "release.regex", "history",
|
|
|
|
|
"added", "added.not", "added.before", "added.after", "added.regex",
|
|
|
|
|
"last_played", "last_played.not", "last_played.before", "last_played.after", "last_played.regex",
|
|
|
|
|
"first_episode_aired", "first_episode_aired.not", "first_episode_aired.before", "first_episode_aired.after", "first_episode_aired.regex",
|
|
|
|
|
"last_episode_aired", "last_episode_aired.not", "last_episode_aired.before", "last_episode_aired.after", "last_episode_aired.regex",
|
|
|
|
|
"title", "title.not", "title.begins", "title.ends", "title.regex",
|
|
|
|
|
"plays.gt", "plays.gte", "plays.lt", "plays.lte",
|
|
|
|
@ -122,7 +123,7 @@ movie_only_filters = [
|
|
|
|
|
"resolution", "resolution.not",
|
|
|
|
|
"writer", "writer.not"
|
|
|
|
|
]
|
|
|
|
|
show_only_filters = ["last_episode_aired", "network"]
|
|
|
|
|
show_only_filters = ["first_episode_aired", "last_episode_aired", "network"]
|
|
|
|
|
smart_invalid = ["collection_order"]
|
|
|
|
|
smart_url_invalid = ["filters", "run_again", "sync_mode", "show_filtered", "show_missing", "save_missing", "smart_label"] + radarr_details + sonarr_details
|
|
|
|
|
custom_sort_builders = [
|
|
|
|
@ -1075,9 +1076,11 @@ class CollectionBuilder:
|
|
|
|
|
if (modifier == ".not" and item.original_language in filter_data) \
|
|
|
|
|
or (modifier == "" and item.original_language not in filter_data):
|
|
|
|
|
return False
|
|
|
|
|
elif filter_attr in ["last_episode_aired"]:
|
|
|
|
|
elif filter_attr in ["first_episode_aired", "last_episode_aired"]:
|
|
|
|
|
tmdb_date = None
|
|
|
|
|
if filter_attr == "last_episode_aired":
|
|
|
|
|
if filter_attr == "first_episode_aired":
|
|
|
|
|
tmdb_date = item.first_air_date
|
|
|
|
|
elif filter_attr == "last_episode_aired":
|
|
|
|
|
tmdb_date = item.last_air_date
|
|
|
|
|
if not util.date_filter(tmdb_date, modifier, filter_data, filter_final, self.current_time):
|
|
|
|
|
return False
|
|
|
|
@ -1388,7 +1391,7 @@ class CollectionBuilder:
|
|
|
|
|
for filter_method, filter_data in self.filters:
|
|
|
|
|
filter_attr, modifier, filter_final = self._split(filter_method)
|
|
|
|
|
filter_actual = filter_translation[filter_attr] if filter_attr in filter_translation else filter_attr
|
|
|
|
|
if filter_attr in ["tmdb_vote_count", "original_language", "last_episode_aired"]:
|
|
|
|
|
if filter_attr in ["tmdb_vote_count", "original_language", "first_episode_aired", "last_episode_aired"]:
|
|
|
|
|
if current.ratingKey not in self.library.movie_rating_key_map and current.ratingKey not in self.library.show_rating_key_map:
|
|
|
|
|
logger.warning(f"Filter Error: No {'TMDb' if self.library.is_movie else 'TVDb'} ID found for {current.title}")
|
|
|
|
|
return False
|
|
|
|
@ -1402,7 +1405,7 @@ class CollectionBuilder:
|
|
|
|
|
return False
|
|
|
|
|
if not self.check_tmdb_filter(t_id, current.ratingKey in self.library.movie_rating_key_map):
|
|
|
|
|
return False
|
|
|
|
|
if filter_attr in ["release", "added", "last_played"]:
|
|
|
|
|
elif filter_attr in ["release", "added", "last_played"]:
|
|
|
|
|
if not util.date_filter(getattr(current, filter_actual), modifier, filter_data, filter_final, self.current_time):
|
|
|
|
|
return False
|
|
|
|
|
elif filter_attr == "audio_track_title":
|
|
|
|
|