Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Showing "Browse subgenres" folder coming from "Previous page" #1661

Merged
merged 1 commit into from
Dec 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,8 @@ def build_video_listing(video_list, menu_data, sub_genre_id=None, pathitems=None
for videoid_value, video
in video_list.videos.items()]
# If genre_id exists add possibility to browse LoCo sub-genres
if sub_genre_id and sub_genre_id != 'None':
# With checking if 'previous_start' is existing, we know that it is the first page
if sub_genre_id and sub_genre_id != 'None' and 'previous_start' not in video_list.perpetual_range_selector:
# Create dynamic sub-menu info in MAIN_MENU_ITEMS
menu_id = f'subgenre_{sub_genre_id}'
sub_menu_data = menu_data.copy()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def add_items_previous_next_page(directory_items, pathitems, perpetual_range_sel
if pathitems and perpetual_range_selector:
if 'previous_start' in perpetual_range_selector:
params = {'perpetual_range_start': perpetual_range_selector.get('previous_start'),
'sub_genre_id': sub_genre_id if perpetual_range_selector.get('previous_start') == 0 else None}
'sub_genre_id': sub_genre_id}
if path_params:
params.update(path_params)
previous_page_item = ListItemW(label=common.get_local_string(30148))
Expand All @@ -33,7 +33,8 @@ def add_items_previous_next_page(directory_items, pathitems, perpetual_range_sel
previous_page_item,
True))
if 'next_start' in perpetual_range_selector:
params = {'perpetual_range_start': perpetual_range_selector.get('next_start')}
params = {'perpetual_range_start': perpetual_range_selector.get('next_start'),
'sub_genre_id': sub_genre_id}
if path_params:
params.update(path_params)
next_page_item = ListItemW(label=common.get_local_string(30147))
Expand Down
Loading