Skip to content

Commit 63acde8

Browse files
committed
Handle new main menu items
1 parent 820f84b commit 63acde8

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

lib/srgssr.py

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -234,16 +234,17 @@ def build_main_menu(self, identifiers=[]):
234234
}, {
235235
# Topics
236236
'identifier': 'Topics',
237-
'name': 'Topics', # TODO: Language
237+
'name': self.plugin_language(30058),
238238
'mode': 13,
239-
'displayItem': True, # TODO: read from settings
239+
'displayItem': False, # TODO: not (yet) supported
240240
'icon': self.icon,
241241
}, {
242-
# Most clicked shows
242+
# Most searched TV shows
243243
'identifier': 'Most_Searched_TV_Shows',
244-
'name': 'Most searched TV shows', # TODO: Language
244+
'name': self.plugin_language(30059),
245245
'mode': 14,
246-
'displayItem': True, # TODO
246+
'displayItem': self.get_boolean_setting(
247+
'Most_Searched_TV_Shows'),
247248
'icon': self.icon,
248249
}, {
249250
# Shows by date
@@ -298,7 +299,7 @@ def build_folder_menu(self, folders):
298299
'displayItem', 'icon', 'purl' (a dictionary to build the plugin url).
299300
"""
300301
for item in folders:
301-
if item.get('displayItem') is not False:
302+
if item.get('displayItem'):
302303
list_item = xbmcgui.ListItem(label=item['name'])
303304
list_item.setProperty('IsPlayable', 'false')
304305
list_item.setArt({
@@ -420,9 +421,11 @@ def build_favourite_shows_menu(self):
420421
self.log('build_favourite_shows_menu')
421422
self.build_all_shows_menu(favids=self.read_favourite_show_ids())
422423

424+
# TODO: docstring
423425
def build_topics_menu(self):
424426
self.build_menu_apiv3('topics', None) # TODO: mode?
425427

428+
# TODO: docstring
426429
def build_most_searched_shows_menu(self):
427430
self.build_menu_apiv3(
428431
'search/most-searched-tv-shows', None) # TODO: mode?
@@ -475,8 +478,7 @@ def extract_id_list(self, url, editor_picks=False):
475478
id_regex, readable_string_response)]
476479
return id_list
477480

478-
def build_episode_menu(
479-
self, video_id, include_segments=True,
481+
def build_episode_menu(self, video_id, include_segments=True,
480482
segment_option=False, audio=False):
481483
"""
482484
Builds a list entry for a episode by a given video id.

0 commit comments

Comments
 (0)