diff --git a/addons.xml b/addons.xml index cde21ce4..d8b585b4 100644 --- a/addons.xml +++ b/addons.xml @@ -1,6 +1,6 @@ - + diff --git a/addons.xml.md5 b/addons.xml.md5 index 1ef4ba00..89de162b 100644 --- a/addons.xml.md5 +++ b/addons.xml.md5 @@ -1 +1 @@ -5850d5b8f2a3cca0af0d37dd4161b2b1 \ No newline at end of file +df72e7a2a11f0b983b65edc5c8f79ca6 \ No newline at end of file diff --git a/plugin.video.pseudotv.live/addon.xml b/plugin.video.pseudotv.live/addon.xml index 01586536..8d088367 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/channelbug.py b/plugin.video.pseudotv.live/resources/lib/channelbug.py index 21516758..64250646 100644 --- a/plugin.video.pseudotv.live/resources/lib/channelbug.py +++ b/plugin.video.pseudotv.live/resources/lib/channelbug.py @@ -26,16 +26,17 @@ class ChannelBug(xbmcgui.WindowXML): lastActionTime = time.time() def __init__(self, *args, **kwargs): - self.log('__init__') - self.window = xbmcgui.Window(12005) - self.window_h, self.window_w = (self.window.getHeight() , self.window.getWidth()) - - try: self.userPOSX, self.userPOSY = literal_eval(SETTINGS.getSetting("Channel_Bug_Position_XY")) - except: self.userPOSX, self.userPOSY = (abs(int(self.window_w // 8) - self.window_w) - 128, abs(int(self.window_h // 16) - self.window_h) - 128) - self.posx, self.posy = self.userPOSX, self.userPOSY - - if BUILTIN.getInfoBool('Playing','Player'): - BUILTIN.executebuiltin('ActivateWindow(fullscreenvideo)') + xbmcgui.WindowXML.__init__(self, *args, **kwargs) + with BUILTIN.busy_dialog(): + self.window = xbmcgui.Window(12005) + self.window_h, self.window_w = (self.window.getHeight() , self.window.getWidth()) + + try: self.userPOSX, self.userPOSY = literal_eval(SETTINGS.getSetting("Channel_Bug_Position_XY")) + except: self.userPOSX, self.userPOSY = (abs(int(self.window_w // 8) - self.window_w) - 128, abs(int(self.window_h // 16) - self.window_h) - 128) + self.posx, self.posy = self.userPOSX, self.userPOSY + + if BUILTIN.getInfoBool('Playing','Player'): + BUILTIN.executebuiltin('ActivateWindow(fullscreenvideo)') self.doModal() diff --git a/plugin.video.pseudotv.live/resources/lib/context_create.py b/plugin.video.pseudotv.live/resources/lib/context_create.py index fb80d87c..10d8f8d9 100644 --- a/plugin.video.pseudotv.live/resources/lib/context_create.py +++ b/plugin.video.pseudotv.live/resources/lib/context_create.py @@ -31,9 +31,9 @@ def __init__(self, sysARG: dict={}, listitem: xbmcgui.ListItem=xbmcgui.ListItem( def add(self): if not self.listitem.getPath(): return DIALOG.notificationDialog(LANGUAGE(32030)) elif DIALOG.yesnoDialog('Would you like to add:\n[B]%s[/B]\nto the first available %s channel?'%(self.listitem.getLabel(),ADDON_NAME)): - if not PROPERTIES.isRunning('MANAGER_RUNNING'): - with PROPERTIES.setRunning('MANAGER_RUNNING'), BUILTIN.busy_dialog(), PROPERTIES.interruptActivity(): - manager = Manager(MANAGER_XML, ADDON_PATH, "default", start=False) + if not PROPERTIES.isRunning('Create.add'): + with PROPERTIES.setRunning('Create.add'), BUILTIN.busy_dialog(), PROPERTIES.interruptActivity(): + manager = Manager(MANAGER_XML, ADDON_PATH, "default", start=False, channel=-1) channelData = manager.newChannel channelData['type'] = 'Custom' channelData['favorite'] = True @@ -54,8 +54,8 @@ def add(self): def open(self): - if not PROPERTIES.isRunning('MANAGER_RUNNING'): - with PROPERTIES.setRunning('MANAGER_RUNNING'), BUILTIN.busy_dialog(), PROPERTIES.interruptActivity(): + if not PROPERTIES.isRunning('Create.open'): + with PROPERTIES.setRunning('Create.open'), BUILTIN.busy_dialog(), PROPERTIES.interruptActivity(): manager = Manager(MANAGER_XML, ADDON_PATH, "default", channel=self.fitem.get('citem',{}).get('number',1)) del manager diff --git a/plugin.video.pseudotv.live/resources/lib/context_record.py b/plugin.video.pseudotv.live/resources/lib/context_record.py index 8eeb2e31..ade03c01 100644 --- a/plugin.video.pseudotv.live/resources/lib/context_record.py +++ b/plugin.video.pseudotv.live/resources/lib/context_record.py @@ -31,42 +31,42 @@ def __init__(self, sysARG: dict={}, listitem: xbmcgui.ListItem=xbmcgui.ListItem( def add(self): - now = timeString2Seconds(BUILTIN.getInfoLabel('Time(hh:mm:ss)','System')) - start = timeString2Seconds(BUILTIN.getInfoLabel('StartTime').split(' ')[0] +':00') - stop = timeString2Seconds(BUILTIN.getInfoLabel('EndTime').split(' ')[0] +':00') - if (now > start and now < stop): - opt ='Incl. Resume' - seek = (now - start) - OVERLAY_DELAY #add rollback buffer - msg = '%s or %s'%(LANGUAGE(30119),LANGUAGE(30152)) - else: - opt = '' - seek = 0 - msg = LANGUAGE(30119) - retval = DIALOG.yesnoDialog('Would you like to add:\n[B]%s[/B]\nto %s recordings?'%(self.fitem['label'],msg),customlabel=opt) - if retval or int(retval) > 0: - with BUILTIN.busy_dialog(), PROPERTIES.interruptActivity(): - m3u = M3U() - xmltv = XMLTVS() - ritem = m3u.getRecordItem(self.fitem,{'1':0,'2':seek}[str(int(retval))]) - if (m3u.addRecording(ritem), xmltv.addRecording(ritem,self.fitem)): - DIALOG.notificationWait('%s\n%s'%(ritem['label'],LANGUAGE(30116))) - PROPERTIES.setEpochTimer('chkPVRRefresh') - del m3u - del xmltv - - + if not PROPERTIES.isRunning('Record.add'): + with PROPERTIES.setRunning('Record.add'): + now = timeString2Seconds(BUILTIN.getInfoLabel('Time(hh:mm:ss)','System')) + start = timeString2Seconds(BUILTIN.getInfoLabel('StartTime').split(' ')[0] +':00') + stop = timeString2Seconds(BUILTIN.getInfoLabel('EndTime').split(' ')[0] +':00') + if (now > start and now < stop): + opt ='Incl. Resume' + seek = (now - start) - OVERLAY_DELAY #add rollback buffer + msg = '%s or %s'%(LANGUAGE(30119),LANGUAGE(30152)) + else: + opt = '' + seek = 0 + msg = LANGUAGE(30119) + retval = DIALOG.yesnoDialog('Would you like to add:\n[B]%s[/B]\nto %s recordings?'%(self.fitem['label'],msg),customlabel=opt) + if retval or int(retval) > 0: + with BUILTIN.busy_dialog(), PROPERTIES.interruptActivity(): + m3u = M3U() + ritem = m3u.getRecordItem(self.fitem,{'1':0,'2':seek}[str(int(retval))]) + if (m3u.addRecording(ritem), XMLTVS().addRecording(ritem,self.fitem)): + DIALOG.notificationWait('%s\n%s'%(ritem['label'],LANGUAGE(30116))) + PROPERTIES.setEpochTimer('chkPVRRefresh') + del m3u + else: DIALOG.notificationDialog(LANGUAGE(32000)) + + def remove(self): - if DIALOG.yesnoDialog('Would you like to remove:\n[B]%s[/B]\nfrom recordings?'%(self.fitem['label'])): - with BUILTIN.busy_dialog(), PROPERTIES.interruptActivity(): - m3u = M3U() - xmltv = XMLTVS() - ritem = (self.fitem.get('citem') or {"name":self.fitem['label'],"path":self.listitem.getPath()}) - if (m3u.delRecording(ritem), xmltv.delRecording(ritem)): - DIALOG.notificationWait('%s\n%s'%(ritem['name'],LANGUAGE(30118))) - PROPERTIES.setEpochTimer('chkPVRRefresh') - del m3u - del xmltv - + if not PROPERTIES.isRunning('Record.remove'): + with PROPERTIES.setRunning('Record.remove'): + if DIALOG.yesnoDialog('Would you like to remove:\n[B]%s[/B]\nfrom recordings?'%(self.fitem['label'])): + with BUILTIN.busy_dialog(), PROPERTIES.interruptActivity(): + ritem = (self.fitem.get('citem') or {"name":self.fitem['label'],"path":self.listitem.getPath()}) + if (M3U().delRecording(ritem), XMLTVS().delRecording(ritem)): + DIALOG.notificationWait('%s\n%s'%(ritem['name'],LANGUAGE(30118))) + PROPERTIES.setEpochTimer('chkPVRRefresh') + else: DIALOG.notificationDialog(LANGUAGE(32000)) + if __name__ == '__main__': try: param = sys.argv[1] diff --git a/plugin.video.pseudotv.live/resources/lib/cqueue.py b/plugin.video.pseudotv.live/resources/lib/cqueue.py index a161de88..3b95d8fa 100644 --- a/plugin.video.pseudotv.live/resources/lib/cqueue.py +++ b/plugin.video.pseudotv.live/resources/lib/cqueue.py @@ -114,7 +114,8 @@ def __pop(self): break elif self.service._suspend(): self.log("__pop, _suspend == True") - continue + if self.service._interrupt(OVERLAY_DELAY): break + else: continue else: if not self.head and not self.priority: self.log("__pop, The queue is empty!") diff --git a/plugin.video.pseudotv.live/resources/lib/manager.py b/plugin.video.pseudotv.live/resources/lib/manager.py index 092640e1..53c88468 100644 --- a/plugin.video.pseudotv.live/resources/lib/manager.py +++ b/plugin.video.pseudotv.live/resources/lib/manager.py @@ -315,9 +315,9 @@ def __buildItem(key): 'radio' : LANGUAGE(32084), 'favorite': LANGUAGE(32083)} - listItems = poolit(__buildItem)(list(self.newChannel.keys())) - self.itemList.addItems(listItems) - self.itemList.selectItem([idx for idx, liz in enumerate(listItems) if liz.getProperty('key')== focuskey][0]) + listitems = poolit(__buildItem)(list(self.newChannel.keys())) + self.itemList.addItems(listitems) + self.itemList.selectItem([idx for idx, liz in enumerate(listitems) if liz.getProperty('key')== focuskey][0]) self.setFocus(self.itemList) diff --git a/plugin.video.pseudotv.live/resources/lib/utilities.py b/plugin.video.pseudotv.live/resources/lib/utilities.py index dc2aba2d..bc4d3a45 100644 --- a/plugin.video.pseudotv.live/resources/lib/utilities.py +++ b/plugin.video.pseudotv.live/resources/lib/utilities.py @@ -171,20 +171,21 @@ def openFile(fle): def openChannelManager(self, chnum: int=1): self.log('openChannelManager, chnum = %s'%(chnum)) - if not PROPERTIES.isRunning('MANAGER_RUNNING'): - with PROPERTIES.setRunning('MANAGER_RUNNING'), PROPERTIES.interruptActivity(): - from manager import Manager + if not PROPERTIES.isRunning('OVERLAY_MANAGER'): + with PROPERTIES.setRunning('OVERLAY_MANAGER'), PROPERTIES.interruptActivity(): + with BUILTIN.busy_dialog(): from manager import Manager chmanager = Manager(MANAGER_XML, ADDON_PATH, "default", channel=chnum) del chmanager - + def openChannelBug(self): self.log('openChannelBug') if not PROPERTIES.isRunning('OVERLAY_CHANNELBUG_RUNNING'): - from channelbug import ChannelBug - channelbug = ChannelBug(CHANNELBUG_XML, ADDON_PATH, "default") - SETTINGS.setSetting("Channel_Bug_Position_XY",(PROPERTIES.getProperty("Channel_Bug_Position_XY") or "Auto")) - del channelbug + with PROPERTIES.setRunning('OVERLAY_CHANNELBUG_RUNNING'), PROPERTIES.suspendActivity(): + with BUILTIN.busy_dialog(): from channelbug import ChannelBug + channelbug = ChannelBug(CHANNELBUG_XML, ADDON_PATH, "default") + SETTINGS.setSetting("Channel_Bug_Position_XY",(PROPERTIES.getProperty("Channel_Bug_Position_XY") or "Auto")) + del channelbug def _togglePVR(self): diff --git a/plugin.video.pseudotv.live/resources/skins/default/1080i/plugin.video.pseudotv.live.background.xml b/plugin.video.pseudotv.live/resources/skins/default/1080i/plugin.video.pseudotv.live.background.xml index 94488aa9..f099e146 100644 --- a/plugin.video.pseudotv.live/resources/skins/default/1080i/plugin.video.pseudotv.live.background.xml +++ b/plugin.video.pseudotv.live/resources/skins/default/1080i/plugin.video.pseudotv.live.background.xml @@ -1,8 +1,8 @@ 0x00000000 - SetProperty(plugin.video.pseudotv.live.OVERLAY_BACKGROUND,true,10000) - SetProperty(plugin.video.pseudotv.live.OVERLAY_BACKGROUND,false,10000) + SetProperty(plugin.video.pseudotv.live.Running.OVERLAY_BACKGROUND,true,10000) + SetProperty(plugin.video.pseudotv.live.Running.OVERLAY_BACKGROUND,false,10000) diff --git a/plugin.video.pseudotv.live/resources/skins/default/1080i/plugin.video.pseudotv.live.channelbug.xml b/plugin.video.pseudotv.live/resources/skins/default/1080i/plugin.video.pseudotv.live.channelbug.xml index e1baddfb..f1ee356b 100644 --- a/plugin.video.pseudotv.live/resources/skins/default/1080i/plugin.video.pseudotv.live.channelbug.xml +++ b/plugin.video.pseudotv.live/resources/skins/default/1080i/plugin.video.pseudotv.live.channelbug.xml @@ -1,8 +1,8 @@ 0x00000000 - SetProperty(plugin.video.pseudotv.live.OVERLAY_CHANNELBUG_RUNNING,true,10000) - SetProperty(plugin.video.pseudotv.live.OVERLAY_CHANNELBUG_RUNNING,false,10000) + SetProperty(plugin.video.pseudotv.live.Running.OVERLAY_CHANNELBUG_RUNNING,true,10000) + SetProperty(plugin.video.pseudotv.live.Running.OVERLAY_CHANNELBUG_RUNNING,false,10000) diff --git a/plugin.video.pseudotv.live/resources/skins/default/1080i/plugin.video.pseudotv.live.manager.xml b/plugin.video.pseudotv.live/resources/skins/default/1080i/plugin.video.pseudotv.live.manager.xml index a8d3300b..6d2c64fa 100644 --- a/plugin.video.pseudotv.live/resources/skins/default/1080i/plugin.video.pseudotv.live.manager.xml +++ b/plugin.video.pseudotv.live/resources/skins/default/1080i/plugin.video.pseudotv.live.manager.xml @@ -1,8 +1,8 @@ 0x00000000 - SetProperty(plugin.video.pseudotv.live.OVERLAY_MANAGER,true,10000) - SetProperty(plugin.video.pseudotv.live.OVERLAY_MANAGER,false,10000) + SetProperty(plugin.video.pseudotv.live.Running.OVERLAY_MANAGER,true,10000) + SetProperty(plugin.video.pseudotv.live.Running.OVERLAY_MANAGER,false,10000) diff --git a/plugin.video.pseudotv.live/resources/skins/default/1080i/plugin.video.pseudotv.live.restart.xml b/plugin.video.pseudotv.live/resources/skins/default/1080i/plugin.video.pseudotv.live.restart.xml index 6e11540d..ab42f4bd 100644 --- a/plugin.video.pseudotv.live/resources/skins/default/1080i/plugin.video.pseudotv.live.restart.xml +++ b/plugin.video.pseudotv.live/resources/skins/default/1080i/plugin.video.pseudotv.live.restart.xml @@ -1,8 +1,8 @@ 40001 - SetProperty(plugin.video.pseudotv.live.OVERLAY_REPLAY,true,10000) - SetProperty(plugin.video.pseudotv.live.OVERLAY_REPLAY,false,10000) + SetProperty(plugin.video.pseudotv.live.Running.OVERLAY_REPLAY,true,10000) + SetProperty(plugin.video.pseudotv.live.Running.OVERLAY_REPLAY,false,10000) 0 diff --git a/zips/plugin.video.pseudotv.live/plugin.video.pseudotv.live-0.5.5h.zip b/zips/plugin.video.pseudotv.live/plugin.video.pseudotv.live-0.5.5h.zip new file mode 100644 index 00000000..5da1cf60 Binary files /dev/null and b/zips/plugin.video.pseudotv.live/plugin.video.pseudotv.live-0.5.5h.zip differ