Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
fd95443
[plugin.video.iprima.cz] 0.4.4
wombat01 Oct 16, 2019
121a493
[plugin.video.iprima.cz] 0.4.5
wombat01 Oct 26, 2019
0571b23
[plugin.video.iprima.cz] 0.4.6
wombat01 Oct 27, 2019
89c8c8e
Merge branch 'master' into master
wombat01 Nov 2, 2019
49458d7
Delete changelog.txt
wombat01 Jan 24, 2020
df7f774
Delete PrimaPlay.pyo
wombat01 Jan 24, 2020
ad24e68
Delete PrimaPlay_integrationtest.py
wombat01 Jan 24, 2020
986e521
Delete test_filters.html
wombat01 Jan 24, 2020
8d94b21
Delete test_moje_play.html
wombat01 Jan 24, 2020
0da04fe
Delete test_prostreno_epizody.html
wombat01 Jan 24, 2020
7b7142f
Delete test_playlist.m3u8
wombat01 Jan 24, 2020
350813c
Delete test_search_page.html
wombat01 Jan 24, 2020
1762af2
Delete test_video_page.html
wombat01 Jan 24, 2020
1ac329d
Delete test_video_page-2.html
wombat01 Jan 24, 2020
e40ee96
Delete test_remove_all_filters.html
wombat01 Jan 24, 2020
2a939c3
Delete test_prostreno.html
wombat01 Jan 24, 2020
7736f4a
Delete test_player_init.js
wombat01 Jan 24, 2020
ce9cd44
Delete test_player_init-2.js
wombat01 Jan 24, 2020
ad1a0fc
Delete test_homepage.html
wombat01 Jan 24, 2020
92e2b04
Delete test_homepage_logged.html
wombat01 Jan 24, 2020
0adccce
Delete test_ajax_response_p.data
wombat01 Jan 24, 2020
85f97de
Delete test_ajax_response.data
wombat01 Jan 24, 2020
ecbe7b0
Delete __init__.pyo
wombat01 Jan 24, 2020
3124e56
Delete PrimaPlay_unittest.py
wombat01 Jan 24, 2020
e2a0bd9
Delete .travis.yml
wombat01 Jan 24, 2020
e3cbed0
Delete .gitignore
wombat01 Jan 24, 2020
feea0e7
Delete default.py
wombat01 Jan 24, 2020
d1cea31
[plugin.video.iprima.cz] 0.4.7
wombat01 Jan 24, 2020
40d043c
[plugin.video.iprima.cz] 0.4.8
wombat01 Jan 25, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 0 additions & 57 deletions .gitignore

This file was deleted.

8 changes: 0 additions & 8 deletions .travis.yml

This file was deleted.

44 changes: 20 additions & 24 deletions default.py → addon.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import urllib
from urlparse import parse_qs

_addon_ = xbmcaddon.Addon('plugin.video.primaplay')
_addon_ = xbmcaddon.Addon('plugin.video.iprima.cz')
_scriptname_ = _addon_.getAddonInfo('name')
_version_ = _addon_.getAddonInfo('version')

Expand Down Expand Up @@ -43,13 +43,12 @@ def _toString(text):
_icon_ = xbmc.translatePath(os.path.join(_addon_.getAddonInfo('path'), 'icon.png'))
_handle_ = int(sys.argv[1])
_baseurl_ = sys.argv[0]
_hd_enabled = False;
_hd_enabled = False
if (_addon_.getSetting('hd_enabled') == 'true'): _hd_enabled = True
_play_parser = PrimaPlay.Parser(hd_enabled=_hd_enabled)
_play_account = None
if (_addon_.getSetting('account_enabled') == 'true'):
_play_account = PrimaPlay.Account( _addon_.getSetting('account_email'), _addon_.getSetting('account_password'), _play_parser )

#_play_account = None
#if (_addon_.getSetting('account_enabled') == 'true'):
#_play_account = PrimaPlay.Account( _addon_.getSetting('account_email'), _addon_.getSetting('account_password'), _play_parser )
xbmcplugin.setContent(_handle_, 'tvshows')

def main_menu(pageurl, list_only = False):
Expand Down Expand Up @@ -141,12 +140,13 @@ def add_account_menu():

def add_show(video_list):
url = '#'
thumbnail = None
thumbnail=''
if video_list.link:
url = get_menu_link( action = 'SHOW-NAV', linkurl = video_list.link )
if video_list.thumbnail:
thumbnail = video_list.thumbnail
li = list_item(video_list.title, thumbnail)
xbmcplugin.addSortMethod( handle = _handle_, sortMethod=xbmcplugin.SORT_METHOD_LABEL )
xbmcplugin.addDirectoryItem(handle=_handle_, url=url, listitem=li, isFolder=True)

def add_title(video_list):
Expand All @@ -162,7 +162,6 @@ def add_item_list(item_list):
li = list_item(item.title, item.image_url, item.description, item.broadcast_date, item.year)
url = item.link
if item.isFolder: url = get_menu_link( action = 'PAGE', linkurl = item.link )

xbmcplugin.addDirectoryItem(handle=_handle_, url=url, listitem=li, isFolder=item.isFolder)

def add_next_link(next_link):
Expand All @@ -178,16 +177,16 @@ def play_video(link):
product_id = _play_parser.get_productID(link)

video = _play_parser.get_video(product_id)
if video.link is None:
if video is None:
raise Exception('Video není dostupné')
return

video_item = xbmcgui.ListItem(video.title)
video_item.setInfo('video', {'Title': video.title})

video_item = xbmcgui.ListItem(path=video.link)
video_item.setProperty('inputstreamaddon', 'inputstream.adaptive')
video_item.setProperty('inputstream.adaptive.manifest_type', 'hls')
video_item.setInfo(type='video', infoLabels={'Title': video.title})
video_item.setThumbnailImage(video.image_url)

player = xbmc.Player()
player.play(video.link, video_item)
xbmcplugin.setResolvedUrl(handle=_handle_, succeeded=True, listitem=video_item)

def list_item(label, thumbnail = None, description = None, broadcast_date = None, year = None):
li = xbmcgui.ListItem(label)
Expand All @@ -199,6 +198,7 @@ def list_item(label, thumbnail = None, description = None, broadcast_date = None
}
if thumbnail:
li.setThumbnailImage(thumbnail)
li.setProperty("IsPlayable", "true")
li.setArt({'poster': thumbnail, 'fanart': thumbnail})
li.setInfo("video", liVideo)
return li
Expand Down Expand Up @@ -236,31 +236,27 @@ def assign_params(params):
try:
if action == "FILTER-REMOVE":
remove_filter(linkurl)
xbmcplugin.endOfDirectory(_handle_, updateListing=True)
if action == "FILTER-MANAGE":
manage_filter(linkurl, int(filterid))
xbmcplugin.endOfDirectory(_handle_, updateListing=True)
elif action == "PAGE-NEXT":
xbmcplugin.setContent(_handle_, 'episodes')
next_menu(linkurl)
xbmcplugin.endOfDirectory(_handle_, updateListing=True)
elif action == "SEARCH":
search()
xbmcplugin.endOfDirectory(_handle_)
elif action == "ACCOUNT":
account()
xbmcplugin.endOfDirectory(_handle_)
elif action == "SHOW-NAV":
xbmcplugin.setContent(_handle_, 'episodes')
show_navigation(linkurl)
xbmcplugin.endOfDirectory(_handle_)
elif action == "PAGE":
xbmcplugin.setContent(_handle_, 'episodes')
main_menu(linkurl, list_only=True)
xbmcplugin.endOfDirectory(_handle_)
elif action == "PLAY":
play_video(linkurl)
else:
ts = int(time.time())
shows_menu("https://prima.iprima.cz/iprima-api/ListWithFilter/Series/Content?ts="+ str(ts) +"&filter=all&featured_queue_name=iprima:hp-featured-series")
xbmcplugin.endOfDirectory(_handle_)
shows_menu("https://prima.iprima.cz/iprima-api/ListWithFilter/Series/Content?ts="+ str(ts) +"&featured_queue_name=iprima%3Aprima-featured-series&large_size_items_cnt=3")
xbmcplugin.endOfDirectory(_handle_)
except Exception as ex:
exc_type, exc_value, exc_traceback = sys.exc_info()
_exception_log(exc_type, exc_value, exc_traceback)
Expand Down
20 changes: 15 additions & 5 deletions addon.xml
Original file line number Diff line number Diff line change
@@ -1,17 +1,27 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="plugin.video.primaplay" name="iPrima" version="0.4.3" provider-name="Ladislav Dokulil, Roman Smolka">
<addon id="plugin.video.iprima.cz" name="iPrima" version="0.4.8" provider-name="Ladislav Dokulil, Roman Smolka, wombat">
<requires>
<import addon="xbmc.python" version="2.1.0"/>
<import addon="script.module.youtube.dl" version="14.810.0"/>
</requires>
<extension point="xbmc.python.pluginsource" library="default.py">
<extension point="xbmc.python.pluginsource" library="addon.py">
<provides>video</provides>
</extension>
<extension point="xbmc.addon.metadata">
<summary>iPrima</summary>
<description>Plugin to play videos from iPrima archive</description>
<description lang="cs">Plugin nabízí přístup do archivu iPrima.</description>
<description>Celé seriály, pořady, filmy, dokumenty, včetně exkluzivních záběrů a bonusů zdarma on-line. Je na co se dívat na iprima.cz.</description>
<description lang="cs">Celé seriály, pořady, filmy, dokumenty, včetně exkluzivních záběrů a bonusů zdarma on-line. Je na co se dívat na iprima.cz.</description>
<platform>all</platform>
<source>https://github.com/alladdin/plugin.video.primaplay</source>
<news>
v0.4.8 (25.01.2020)
- Zrychleno načítání úvodní stránky pořadů (ostatní kanály)
- Abecední řazení při rychlém rolování

v0.4.7 (24.01.2020)
- Zrychleno načítání úvodní stránky pořadů
- Zrychleno načítání videa
- Přechod na InputStream Adaptive (HLS)
- Zrušení závislosti na YTB
</news>
</extension>
</addon>
71 changes: 0 additions & 71 deletions changelog.txt

This file was deleted.

Binary file modified icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading