Skip to content

Commit

Permalink
v.0.5.3p
Browse files Browse the repository at this point in the history
  • Loading branch information
Lunatixz committed Sep 12, 2024
1 parent 700018f commit da5d935
Show file tree
Hide file tree
Showing 9 changed files with 28 additions and 30 deletions.
4 changes: 2 additions & 2 deletions addons.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addons>
<addon id="plugin.video.pseudotv.live" version="0.5.3o" name="PseudoTV Live" provider-name="Lunatixz">
<addon id="plugin.video.pseudotv.live" version="0.5.3p" name="PseudoTV Live" provider-name="Lunatixz">
<requires>
<import addon="xbmc.python" version="3.0.1"/>
<import addon="pvr.iptvsimple" version="21.8.0"/>
Expand Down Expand Up @@ -76,7 +76,7 @@
<source>https://github.com/PseudoTV/PseudoTV_Live</source>
<forum>https://forum.kodi.tv/showthread.php?tid=355549</forum>
<disclaimer lang="en_GB">BETA PROJECT; SUBJECT TO BUGS</disclaimer>
<reuselanguageinvoker>false</reuselanguageinvoker>
<reuselanguageinvoker>true</reuselanguageinvoker>
<assets>
<icon>resources/images/icon.png</icon>
<fanart>resources/images/fanart.jpg</fanart>
Expand Down
2 changes: 1 addition & 1 deletion addons.xml.md5
Original file line number Diff line number Diff line change
@@ -1 +1 @@
672495a34f66a8ba4083f5bde9099a06
b325bfadd7fc57f4dd166bb0fb0ed3f2
4 changes: 2 additions & 2 deletions plugin.video.pseudotv.live/addon.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<addon id="plugin.video.pseudotv.live" version="0.5.3o" name="PseudoTV Live" provider-name="Lunatixz">
<addon id="plugin.video.pseudotv.live" version="0.5.3p" name="PseudoTV Live" provider-name="Lunatixz">
<requires>
<import addon="xbmc.python" version="3.0.1"/>
<import addon="pvr.iptvsimple" version="21.8.0"/>
Expand Down Expand Up @@ -75,7 +75,7 @@
<source>https://github.com/PseudoTV/PseudoTV_Live</source>
<forum>https://forum.kodi.tv/showthread.php?tid=355549</forum>
<disclaimer lang="en_GB">BETA PROJECT; SUBJECT TO BUGS</disclaimer>
<reuselanguageinvoker>false</reuselanguageinvoker>
<reuselanguageinvoker>true</reuselanguageinvoker>
<assets>
<icon>resources/images/icon.png</icon>
<fanart>resources/images/fanart.jpg</fanart>
Expand Down
19 changes: 5 additions & 14 deletions plugin.video.pseudotv.live/resources/lib/context_play.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,21 +25,12 @@ def run(sysARG, fitem: dict={}, nitem: dict={}):
params = {}
params['fitem'] = fitem
params['nitem'] = nitem
params["chid"] = fitem.get('citem',{}).get('id')
params['vid'] = (decodeString(params.get("vid",'') or None))
params['citem'] = combineDicts({'id':params["chid"]},fitem.get('citem',{}))
params['name'] = (unquoteString(params.get("name",'')) or BUILTIN.getInfoLabel('ChannelName'))
params['title'] = (unquoteString(params.get("title",'')) or BUILTIN.getInfoLabel('label'))
params['radio'] = (params.get("radio") or 'False').lower() == "true"
params['playcount'] = 0
params['now'] = int(params.get('now') or getUTCstamp())
params['duration'] = int(params.get('duration') or timeString2Seconds(BUILTIN.getInfoLabel('Duration(hh:mm:ss)')) or '0')
params['progress'] = (int(BUILTIN.getInfoLabel('Progress') or '0'),int(BUILTIN.getInfoLabel('PercentPlayed') or '0'))
params['chnumlabel'] = BUILTIN.getInfoLabel('ChannelNumberLabel')
params['chpath'] = BUILTIN.getInfoLabel('FileNameAndPath')
params['isLinear'] = True if mode == 'live' else False
params['vid'] = decodeString(params.get("vid",''))
params["chid"] = (params.get("chid") or fitem.get('citem',{}).get('id'))
params['title'] = (params.get('title') or BUILTIN.getInfoLabel('label'))
params['name'] = (unquoteString(params.get("name",'')) or BUILTIN.getInfoLabel('ChannelName'))
params['isPlaylist'] = bool(SETTINGS.getSettingInt('Playback_Method'))
log("Context_Play: run, Out params = %s"%(params))
log("Context_Play: run, params = %s"%(params))

if mode == 'play': threadit(Plugin(sysARG, sysInfo=params).playTV)(params["name"],params["chid"])
elif mode == 'playlist': threadit(Plugin(sysARG, sysInfo=params).playPlaylist)(params["name"],params["chid"])
Expand Down
2 changes: 1 addition & 1 deletion plugin.video.pseudotv.live/resources/lib/default.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ def run(sysARG, fitem: dict={}, nitem: dict={}):
params['fitem'] = fitem
params['nitem'] = nitem
params['vid'] = decodeString(params.get("vid",''))
params["chid"] = (params.get("chid") or fitem.get('citem',{}).get('id'))
params['title'] = (params.get('title') or BUILTIN.getInfoLabel('label'))
params['name'] = (unquoteString(params.get("name",'')) or BUILTIN.getInfoLabel('ChannelName'))
params["chid"] = params.get("chid")
params['isPlaylist'] = bool(SETTINGS.getSettingInt('Playback_Method'))
log("Default: run, params = %s"%(params))

Expand Down
6 changes: 3 additions & 3 deletions plugin.video.pseudotv.live/resources/lib/globals.py
Original file line number Diff line number Diff line change
Expand Up @@ -311,9 +311,9 @@ def togglePVR(state=True, reverse=False, wait=15):
BUILTIN.getInfoBool('IsPlayingRadio','Pvr') |
BUILTIN.getInfoBool('IsPlayingRecording','Pvr') |
BUILTIN.getInfoBool('IsActive(FullscreenLiveTV)','Window') |
BUILTIN.getInfoBool('IsActive(fullscreenradio)','Window') |
BUILTIN.getInfoBool('IsActive(tvchannels)','Window') |
BUILTIN.getInfoBool('IsActive(tvguide)','Window'))
BUILTIN.getInfoBool('IsActive(fullscreenradio)','Window'))# |
#BUILTIN.getInfoBool('IsActive(tvchannels)','Window') |
#BUILTIN.getInfoBool('IsActive(tvguide)','Window'))
if not conditions:
isEnabled = BUILTIN.getInfoBool('AddonIsEnabled(%s)'%(PVR_CLIENT_ID),'System')
if (state and isEnabled) or (not state and not isEnabled): return
Expand Down
2 changes: 1 addition & 1 deletion plugin.video.pseudotv.live/resources/lib/jsonrpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,7 @@ def _matchJSON():#requires 'pvr://' json whitelisting.
self.log('getCallback: _matchJSON, id = %s, found file = %s'%(sysInfo.get('chid'),item.get('file')))
return item.get('file')

if sysInfo.get('mode').lower() == 'live' and sysInfo.get('chpath'): callback = sysInfo.get('chpath')
if sysInfo.get('mode','').lower() == 'live' and sysInfo.get('chpath'): callback = sysInfo.get('chpath')
else: callback = _matchJSON()
self.log('getCallback: returning callback = %s'%(callback))
return callback
Expand Down
19 changes: 13 additions & 6 deletions plugin.video.pseudotv.live/resources/lib/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,10 @@ def __init__(self, sysARG=sys.argv, sysInfo={}):
if self.sysInfo.get('start') == -1:
self.sysInfo['start'] = self.sysInfo['fitem'].get('start')
self.sysInfo['stop'] = self.sysInfo['fitem'].get('stop')


self.sysInfo['duration'] = int(sysInfo.get('duration') or self.jsonRPC.getRuntime(self.sysInfo['fitem']) or timeString2Seconds(BUILTIN.getInfoLabel('Duration(hh:mm:ss)')) or '0')
self.sysInfo['duration'] = float(sysInfo.get('duration') or self.jsonRPC.getRuntime(self.sysInfo['fitem']) or timeString2Seconds(BUILTIN.getInfoLabel('Duration(hh:mm:ss)')) or '0')
else:
self.sysInfo['duration'] = int(sysInfo.get('duration','-1'))
self.sysInfo['duration'] = float((sysInfo.get('duration') or '-1'))

try:
self.sysInfo['seek'] = int(sysInfo.get('seek') or (abs(self.sysInfo['start'] - self.sysInfo['now']) if self.sysInfo['start'] > 0 else -1))
Expand Down Expand Up @@ -269,11 +268,19 @@ def playVOD(self, title: str, vid: str): #-> catchup-id
with self.preparingPlayback():
if self.sysInfo.get('fitem'): #-> live playback from UI incl. listitem
liz = LISTITEMS.buildItemListItem(self.sysInfo.get('fitem'))
else:
self.sysInfo["seek"] = -1
self.sysInfo["progresspercentage"] = -1
else: #-> recordings, non UI callbacks.
liz = xbmcgui.ListItem(title,path=vid)
liz.setProperty("IsPlayable","true")
self.sysInfo["seek"] = -1
self.sysInfo["progresspercentage"] = -1
if (self.sysInfo.get('seek',0) > self.seekTOL) and (self.sysInfo.get('progresspercentage') > 0 and self.sysInfo.get('progresspercentage') < 100 ):
self.log('playVOD, vid = %s, seek = %s'%(vid, self.sysInfo['seek']))
liz.setProperty('startoffset', str(self.sysInfo['seek'])) #secs
infoTag = ListItemInfoTag(liz,'video')
infoTag.set_resume_point({'ResumeTime':self.sysInfo['seek'],'TotalTime':(self.sysInfo['duration'] * 60)})
else:
self.sysInfo["seek"] = -1
self.sysInfo["progresspercentage"] = -1
liz.setProperty('sysInfo',encodeString(dumpJSON(self.sysInfo)))
self.resolveURL(True, liz)

Expand Down
Binary file not shown.

0 comments on commit da5d935

Please sign in to comment.