Skip to content

Commit

Permalink
Improve menu listings using icons and description
Browse files Browse the repository at this point in the history
  • Loading branch information
dagwieers committed Mar 20, 2019
1 parent dde108b commit 25acd8a
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,18 +63,38 @@ msgctxt "#32054"
msgid "Woops something went wrong, check the log for more details"
msgstr "Woops something went wrong, check the log for more details"

msgctxt "#32091"
msgctxt "#32080"
msgid "A-Z"
msgstr "A-Z"

msgctxt "#32092"
msgctxt "#32081"
msgid "Alphabetically sorted list of TV programs"
msgstr "Alphabetically sorted list of TV programs"

msgctxt "#32082"
msgid "Categories"
msgstr "Categories"

msgctxt "#32093"
msgctxt "#32083"
msgid "TV programs listed by category"
msgstr "TV programs listed by category"

msgctxt "#32084"
msgid "Live TV"
msgstr "Live TV"

msgctxt "#32085"
msgid "Watch TV channels live (using Internet streaming)"
msgstr "Watch TV channels live (using Internet streaming)"

msgctxt "#32086"
msgid "Most recent"
msgstr "Most recent"

msgctxt "#32087"
msgid "Recently published episodes of TV programs"
msgstr "Recently published episodes of TV programs"

msgctxt "#32094"
msgid "Season"
msgstr "Season"
Expand All @@ -83,10 +103,6 @@ msgctxt "#32095"
msgid "Episode"
msgstr "Episode"

msgctxt "#32100"
msgid "Live TV"
msgstr "Live TV"

msgctxt "#32101"
msgid "Eén"
msgstr "Eén"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,18 +64,38 @@ msgctxt "#32054"
msgid "Woops something went wrong, check the log for more details"
msgstr "Oeps, er ging iets mis, check de log voor meer informatie"

msgctxt "#32091"
msgctxt "#32080"
msgid "A-Z"
msgstr "A-Z"

msgctxt "#32092"
msgctxt "#32081"
msgid "Alphabetically sorted list of TV programs"
msgstr "Alphabetische lijst van TV programma's"

msgctxt "#32082"
msgid "Categories"
msgstr "Categorieën"

msgctxt "#32093"
msgctxt "#32083"
msgid "TV programs listed by category"
msgstr "TV programma's per categorie"

msgctxt "#32084"
msgid "Live TV"
msgstr "Live TV"

msgctxt "#32085"
msgid "Watch TV channels live (using Internet streaming)"
msgstr "Bekijk TV kanalen live (via Internet)"

msgctxt "#32086"
msgid "Most recent"
msgstr "Meest recent"

msgctxt "#32087"
msgid "Recently published episodes of TV programs"
msgstr "Recent gepubliceerde afleveringen van TV programs"

msgctxt "#32094"
msgid "Season"
msgstr "Seizoen"
Expand All @@ -84,10 +104,6 @@ msgctxt "#32095"
msgid "Episode"
msgstr "Aflevering"

msgctxt "#32100"
msgid "Live tv"
msgstr "Live tv"

msgctxt "#32101"
msgid "Eén"
msgstr "Eén"
Expand Down
34 changes: 22 additions & 12 deletions plugin.video.vrt.nu/resources/lib/vrtplayer/vrtplayer.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,22 @@ def __init__(self, kodi_wrapper, stream_service, api_helper):

def show_main_menu_items(self):
menu_items = {
helperobjects.TitleItem(self._kodi_wrapper.get_localized_string(32091),
{'action': actions.LISTING_AZ_TVSHOWS}, False, None),
helperobjects.TitleItem(self._kodi_wrapper.get_localized_string(32092),
{'action': actions.LISTING_CATEGORIES}, False, None),
helperobjects.TitleItem(self._kodi_wrapper.get_localized_string(32100),
{'action': actions.LISTING_LIVE}, False, None),
helperobjects.TitleItem(self._kodi_wrapper.get_localized_string(32093),
{'action': actions.LISTING_EPISODES, 'video_url': 'recent'}, False, None)
helperobjects.TitleItem(self._kodi_wrapper.get_localized_string(32080),
dict(action=actions.LISTING_AZ_TVSHOWS), False,
'DefaultMovieTitle.png',
dict(plot=self._kodi_wrapper.get_localized_string(32081))),
helperobjects.TitleItem(self._kodi_wrapper.get_localized_string(32082),
dict(action=actions.LISTING_CATEGORIES), False,
'DefaultGenre.png',
dict(plot=self._kodi_wrapper.get_localized_string(32083))),
helperobjects.TitleItem(self._kodi_wrapper.get_localized_string(32084),
dict(action=actions.LISTING_LIVE), False,
'DefaultAddonPVRClient.png',
dict(plot=self._kodi_wrapper.get_localized_string(32085))),
helperobjects.TitleItem(self._kodi_wrapper.get_localized_string(32086),
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)

Expand All @@ -55,13 +63,16 @@ def show_livestream_items(self):
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')),
True, self._api_helper.get_live_screenshot('een'),
dict(plot=self._kodi_wrapper.get_localized_string(32101))),
helperobjects.TitleItem(self._kodi_wrapper.get_localized_string(32102),
{'action': actions.PLAY, 'video_url': self._CANVAS_LIVESTREAM_},
True, self._api_helper.get_live_screenshot('canvas')),
True, self._api_helper.get_live_screenshot('canvas'),
dict(plot=self._kodi_wrapper.get_localized_string(32102))),
helperobjects.TitleItem(self._kodi_wrapper.get_localized_string(32103),
{'action': actions.PLAY, 'video_url': self._KETNET_LIVESTREAM},
True, self._api_helper.get_live_screenshot('ketnet'))
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)

Expand All @@ -77,7 +88,6 @@ def __get_category_menu_items(self, url, soupstrainer_parser_selector, routing_a
for tile in soup.find_all(class_='nui-tile title'):
category = tile['href'].split('/')[-2]
thumbnail, title = self.__get_category_thumbnail_and_title(tile)
video_dictionary = None
if video_dictionary_action is not None:
video_dictionary = video_dictionary_action(tile)

Expand Down

0 comments on commit 25acd8a

Please sign in to comment.