diff options
author | Tzafrir Cohen <tzafrir@cohens.org.il> | 2017-11-23 00:35:48 +0200 |
---|---|---|
committer | Tzafrir Cohen <tzafrir@cohens.org.il> | 2017-11-23 00:35:48 +0200 |
commit | ca2fb44f9b6d3080a5fdc8e40f10d10a1612764a (patch) | |
tree | 6e903f0b829b6eff76140d276521d0aa830a8230 | |
parent | 3adea057ad8b2ae403d13e19a7bd5730413dac98 (diff) |
Add support for net-shows
It turns out those are basically the same as youtube-played shows
-rw-r--r-- | default.py | 13 |
1 files changed, 8 insertions, 5 deletions
@@ -93,9 +93,9 @@ def get_show_title(base_url, path): return title -def tvshows_menu(page): +def video_top_menu(page, name): """ Display a menu of all the TV shows """ - tvshows_url = KAN_URL + '/video/programs.aspx' + tvshows_url = KAN_URL + "/video/{}.aspx".format(name) main_page = read_url(tvshows_url) parsed = BeautifulSoup(main_page, "html.parser") anchors = parsed.find_all('a', @@ -141,11 +141,14 @@ def show_menu(page): def main_page(page): - url = page.build_url({'mode': 'shows', 'name': 'tv-shows'}) + url = page.build_url({'mode': 'shows', 'name': 'programs'}) li = xbmcgui.ListItem(u'תוכניות טלוויזיה') page.add_directory_item(url=url, listitem=li, isFolder=True) - page.placeholder_item('net-shows', u'תוכניות רשת') + url = page.build_url({'mode': 'shows', 'name': 'digital'}) + li = xbmcgui.ListItem(u'תוכניות רשת') + page.add_directory_item(url=url, listitem=li, isFolder=True) + page.placeholder_item('new-items', u'קטעים חדשים') page.end_directory() @@ -162,7 +165,7 @@ def main(): if page.mode is None: main_page(page) elif mode == 'shows': - tvshows_menu(page) + video_top_menu(page, page.args['name'][0]) elif mode == 'show': show_menu(page) elif mode == 'placeholder': |