diff --git a/addons.xml b/addons.xml index 92968009..059e2a42 100644 --- a/addons.xml +++ b/addons.xml @@ -1,6 +1,6 @@ - + diff --git a/addons.xml.md5 b/addons.xml.md5 index 9576cdd7..08f9f264 100644 --- a/addons.xml.md5 +++ b/addons.xml.md5 @@ -1 +1 @@ -2b9ecee131a2435c7c5bba3ec637729d \ No newline at end of file +aaeaccee130840fdeb3bc2bc232b5ac4 \ No newline at end of file diff --git a/plugin.video.pseudotv.live/addon.xml b/plugin.video.pseudotv.live/addon.xml index 293a3456..fa98e883 100644 --- a/plugin.video.pseudotv.live/addon.xml +++ b/plugin.video.pseudotv.live/addon.xml @@ -1,5 +1,5 @@ - + diff --git a/plugin.video.pseudotv.live/resources/lib/builder.py b/plugin.video.pseudotv.live/resources/lib/builder.py index e75ea5f5..1339d369 100644 --- a/plugin.video.pseudotv.live/resources/lib/builder.py +++ b/plugin.video.pseudotv.live/resources/lib/builder.py @@ -598,10 +598,11 @@ def is3D(self, item): def addChannelStation(self, citem): self.log('addChannelStation, id: %s'%(citem['id'])) - citem['url'] = PVR_URL.format(addon=ADDON_ID,name=quoteString(citem['name']),id=quoteString(citem['id']),radio=str(citem['radio'])) + citem['url'] = PVR_URL.format(addon=ADDON_ID,name=quoteString(citem['name']),channel=quoteString(citem['id']),radio=str(citem['radio'])) citem['logo'] = cleanImage(citem['logo']) citem['group'] = cleanGroups(citem, self.enableGrouping) - # if citem['catchup']: citem['catchup-source'] = SRC_URL.format(addon=ADDON_ID,name=quoteString(citem['name']),channel=quoteString(citem['id']),source='&id={catchup-id}&starttime={Y}-{m}-{d}-{H}-{M}-{S}') + if citem['catchup']: + citem['catchup-source'] = SRC_URL.format(addon=ADDON_ID,name=quoteString(citem['name']),channel=quoteString(citem['id']),source='&id={catchup-id}&starttime={Y}-{m}-{d}-{H}-{M}-{S}') self.m3u.addStation(citem) return self.xmltv.addChannel(citem) diff --git a/plugin.video.pseudotv.live/resources/lib/constants.py b/plugin.video.pseudotv.live/resources/lib/constants.py index 948527ea..9b826e02 100644 --- a/plugin.video.pseudotv.live/resources/lib/constants.py +++ b/plugin.video.pseudotv.live/resources/lib/constants.py @@ -98,7 +98,7 @@ ">": ">", "<": "<"} -PVR_URL = 'plugin://{addon}/?mode=play&name={name}&id={id}&radio={radio}.pvr' +PVR_URL = 'plugin://{addon}/?mode=play&name={name}&channel={channel}&radio={radio}.pvr' VOD_URL = 'plugin://{addon}/?mode=vod&name={name}&id={id}&channel={channel}.pvr' SRC_URL = 'plugin://{addon}/?mode=broadcast&name={name}&channel={channel}{source}.pvr' diff --git a/plugin.video.pseudotv.live/resources/lib/default.py b/plugin.video.pseudotv.live/resources/lib/default.py index 9345145c..d0b0a617 100644 --- a/plugin.video.pseudotv.live/resources/lib/default.py +++ b/plugin.video.pseudotv.live/resources/lib/default.py @@ -42,11 +42,10 @@ def run(sysARG): elif mode == 'vod': threadit(Plugin(sysARG).playVOD)(name,id) elif mode == 'broadcast': - print('broadcast',id,starttime) - # threadit(Plugin(sysARG).playVOD)(name,id) + threadit(Plugin(sysARG).playVOD)(name,id) elif mode == 'play': - if radio: threadit(Plugin(sysARG).playRadio)(name,id) - else: threadit(Plugin(sysARG).playChannel)(name,id,bool(SETTINGS.getSettingInt('Playback_Method'))) + if radio: threadit(Plugin(sysARG).playRadio)(name,channel) + else: threadit(Plugin(sysARG).playChannel)(name,channel,bool(SETTINGS.getSettingInt('Playback_Method'))) if __name__ == '__main__': run(sys.argv) diff --git a/plugin.video.pseudotv.live/resources/lib/m3u.py b/plugin.video.pseudotv.live/resources/lib/m3u.py index f2cb6688..35f4d074 100644 --- a/plugin.video.pseudotv.live/resources/lib/m3u.py +++ b/plugin.video.pseudotv.live/resources/lib/m3u.py @@ -204,8 +204,7 @@ def _save(self, file=M3UFLEPATH): opts = list(self.getMitem().keys()) mins = [opts.pop(opts.index(key)) for key in list(M3U_MIN.keys()) if key in opts] #min required m3u entries. - line = '#EXTINF:-1 tvg-chno="%s" tvg-id="%s" tvg-name="%s" tvg-logo="%s" group-title="%s" radio="%s" catchup="%s" %s,%s\n' - # line = '#EXTINF:-1 tvg-chno="%s" tvg-id="%s" tvg-name="%s" tvg-logo="%s" group-title="%s" radio="%s" catchup="%s" catchup-source="%s" %s,%s\n' + line = '#EXTINF:-1 tvg-chno="%s" tvg-id="%s" tvg-name="%s" tvg-logo="%s" group-title="%s" radio="%s" catchup="%s" catchup-source="%s" %s,%s\n' self.M3UDATA['stations'] = self.sortStations(self.M3UDATA.get('stations',[])) self.M3UDATA['recordings'] = self.sortStations(self.M3UDATA.get('recordings',[])) self.log('_save, saving %s stations and %s recordings to %s'%(len(self.M3UDATA['stations']),len(self.M3UDATA['recordings']),file)) @@ -230,7 +229,7 @@ def _save(self, file=M3UFLEPATH): ';'.join(station['group']), station['radio'], station['catchup'], - # station['catchup-source'], + station['catchup-source'], optional, station['label'])) diff --git a/plugin.video.pseudotv.live/resources/lib/plugin.py b/plugin.video.pseudotv.live/resources/lib/plugin.py index 71d02294..cd79bc74 100644 --- a/plugin.video.pseudotv.live/resources/lib/plugin.py +++ b/plugin.video.pseudotv.live/resources/lib/plugin.py @@ -61,8 +61,7 @@ def _checkLastPlayed(self, nowitem): diff = True olditem = loadJSON(PROPERTIES.getEXTProperty('%s.lastNOWITEM'%(ADDON_ID))) if ((nowitem.get('channeluid',random.random()) == olditem.get('channeluid',random.random())) & - (nowitem.get('broadcastid',random.random()) == olditem.get('broadcastid',random.random())) & - (nowitem.get('progress',random.random()) == olditem.get('progress',random.random()))): diff = False + (nowitem.get('broadcastid',random.random()) == olditem.get('broadcastid',random.random()))): diff = False self.log('_checkLastPlayed, diff = %s'%(diff)) return diff @@ -265,7 +264,6 @@ def playRadio(self, name, id, isPlaylist=True): self.channelPlaylist.add(lz.getPath(),lz,idx) self.log('playRadio, Playlist size = %s'%(self.channelPlaylist.size())) - PROPERTIES.clearEXTProperty('%s.lastNOWITEM'%(ADDON_ID)) PROPERTIES.clearEXTProperty('%s.pendingPVRITEM.%s'%(ADDON_ID,pvritem.get('channelid','-1'))) if not isPlaylistRandom(): self.channelPlaylist.shuffle() if PLAYER.isPlayingVideo(): PLAYER.stop() @@ -321,7 +319,6 @@ def contextPlay(self, writer={}, isPlaylist=False): for idx,lz in enumerate(listitems): self.channelPlaylist.add(lz.getPath(),lz,idx) - PROPERTIES.clearEXTProperty('%s.lastNOWITEM'%(ADDON_ID)) PROPERTIES.clearEXTProperty('%s.pendingPVRITEM.%s'%(ADDON_ID,pvritem.get('channelid','-1'))) self.log('contextPlay, Playlist size = %s'%(self.channelPlaylist.size())) if isPlaylistRandom(): self.channelPlaylist.unshuffle() diff --git a/plugin.video.pseudotv.live/resources/lib/service.py b/plugin.video.pseudotv.live/resources/lib/service.py index 91749237..2e4eff1e 100644 --- a/plugin.video.pseudotv.live/resources/lib/service.py +++ b/plugin.video.pseudotv.live/resources/lib/service.py @@ -173,6 +173,7 @@ def _onStop(self): self.log('_onStop') self.toggleBackground(False) self.runActions(RULES_ACTION_PLAYER_STOP, self.pvritem.get('citem',{}), inherited=self) + PROPERTIES.clearEXTProperty('%s.lastNOWITEM'%(ADDON_ID)) if self.pvritem.get('isPlaylist',False): xbmc.PlayList(xbmc.PLAYLIST_VIDEO).clear() diff --git a/zips/plugin.video.pseudotv.live/plugin.video.pseudotv.live-0.4.5a.zip b/zips/plugin.video.pseudotv.live/plugin.video.pseudotv.live-0.4.5a.zip new file mode 100644 index 00000000..bf661eec Binary files /dev/null and b/zips/plugin.video.pseudotv.live/plugin.video.pseudotv.live-0.4.5a.zip differ