Skip to content

Commit

Permalink
fix: Showing "Browse subgenres" folder coming from "Previous page"
Browse files Browse the repository at this point in the history
  • Loading branch information
Falke-Design committed Dec 29, 2023
1 parent fd5f40f commit 20f4643
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
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

0 comments on commit 20f4643

Please sign in to comment.