Added Tv Shows - Totally Unwatched menu entry

This commit is contained in:
hagaygo
2024-06-02 15:57:52 +03:00
parent c86112f2ac
commit e503ddb053
3 changed files with 16 additions and 3 deletions

View File

@@ -1151,4 +1151,8 @@ msgstr "Combine instead of replace (might cause slow-down)"
msgctxt "#30453"
msgid "Hide number of items to show on entry title"
msgstr "Hide number of items to show on entry title"
msgstr "Hide number of items to show on entry title"
msgctxt "#30454"
msgid " - Totally Unwatched"
msgstr " - Totally Unwatched"

View File

@@ -302,9 +302,10 @@ def process_directory(url, progress, params, use_cache_data=False):
detected_type = None
dir_items = []
OnlyTotallyUnwatchedTvShow = params.get("OnlyTotallyUnwatchedTvShow", None)
for item_details in item_list:
if OnlyTotallyUnwatchedTvShow == "1" and item_details.watched_episodes > 0:
continue
item_details.total_items = item_count
if progress is not None:

View File

@@ -738,6 +738,14 @@ def display_tvshow_type(menu_params, view):
url = sys.argv[0] + "?url=" + quote(path) + "&mode=GET_CONTENT&media_type=tvshows"
add_menu_directory_item(view_name + translate_string(30285), url)
# Totally unwatched tv shows
params = {}
params.update(base_params)
params["IsPlayed"] = False
path = get_jellyfin_url("/Users/{userid}/Items", params)
url = sys.argv[0] + "?url=" + quote(path) + "&mode=GET_CONTENT&media_type=tvshows&OnlyTotallyUnwatchedTvShow=1"
add_menu_directory_item(view_name + translate_string(30454), url)
# In progress episodes
params = {}
params.update(base_params)