Skip to content

Commit

Permalink
Keep static order in main/live menu (#80)
Browse files Browse the repository at this point in the history
* Ensure the order of main/live menu is static

* Set the default sort method to unsorted
  • Loading branch information
dagwieers authored Mar 21, 2019
1 parent 5738c88 commit 22d43e4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
2 changes: 2 additions & 0 deletions plugin.video.vrt.nu/resources/lib/kodiwrappers/kodiwrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ def show_listing(self, list_items, sort=None):
kodi_sorts = {sortmethod.ALPHABET: xbmcplugin.SORT_METHOD_LABEL_IGNORE_THE}
kodi_sortmethod = kodi_sorts.get(sort)
xbmcplugin.addSortMethod(self._handle, kodi_sortmethod)
else:
xbmcplugin.addSortMethod(self._handle, xbmcplugin.SORT_METHOD_NONE)

xbmcplugin.setContent(int(self._handle), "episodes")
xbmcplugin.endOfDirectory(self._handle)
Expand Down
12 changes: 6 additions & 6 deletions plugin.video.vrt.nu/resources/lib/vrtplayer/vrtplayer.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def __init__(self, kodi_wrapper, stream_service, api_helper):
self._stream_service = stream_service

def show_main_menu_items(self):
menu_items = {
menu_items = [
helperobjects.TitleItem(self._kodi_wrapper.get_localized_string(32080),
dict(action=actions.LISTING_AZ_TVSHOWS), False,
'DefaultMovieTitle.png',
Expand All @@ -42,8 +42,8 @@ def show_main_menu_items(self):
dict(action=actions.LISTING_EPISODES, video_url='recent'), False,
'DefaultYear.png',
dict(plot=self._kodi_wrapper.get_localized_string(32087))),
}
self._kodi_wrapper.show_listing(menu_items, sortmethod.ALPHABET)
]
self._kodi_wrapper.show_listing(menu_items)

def show_tvshow_menu_items(self, path):
menu_items = self._api_helper.get_tvshow_items(path)
Expand All @@ -60,7 +60,7 @@ def play(self, video):
self._kodi_wrapper.play(stream)

def show_livestream_items(self):
livestream_items = {
livestream_items = [
helperobjects.TitleItem(self._kodi_wrapper.get_localized_string(32101),
{'action': actions.PLAY, 'video_url': self._EEN_LIVESTREAM},
True, self._api_helper.get_live_screenshot('een'),
Expand All @@ -73,8 +73,8 @@ def show_livestream_items(self):
{'action': actions.PLAY, 'video_url': self._KETNET_LIVESTREAM},
True, self._api_helper.get_live_screenshot('ketnet'),
dict(plot=self._kodi_wrapper.get_localized_string(32103))),
}
self._kodi_wrapper.show_listing(livestream_items, sortmethod.ALPHABET)
]
self._kodi_wrapper.show_listing(livestream_items)

def show_episodes(self, path):
title_items, sort = self._api_helper.get_episode_items(path)
Expand Down

0 comments on commit 22d43e4

Please sign in to comment.