Skip to content

Commit

Permalink
Merge pull request #339 from hagaygo/totally-unwatched-tv-shows-menu-…
Browse files Browse the repository at this point in the history
…option

New Tv Shows menu entry , Totally unwatched Tv Shows entries
  • Loading branch information
mcarlton00 authored Oct 26, 2024
2 parents 29151d8 + e503ddb commit ce0fc82
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
6 changes: 5 additions & 1 deletion resources/language/resource.language.en_gb/strings.po
Original file line number Diff line number Diff line change
Expand Up @@ -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"
5 changes: 3 additions & 2 deletions resources/lib/dir_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
8 changes: 8 additions & 0 deletions resources/lib/menu_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit ce0fc82

Please sign in to comment.