diff --git a/addons.xml b/addons.xml index 7e41013e..d8e0912e 100644 --- a/addons.xml +++ b/addons.xml @@ -1,6 +1,6 @@ - + diff --git a/addons.xml.md5 b/addons.xml.md5 index a414751e..c7b0b111 100644 --- a/addons.xml.md5 +++ b/addons.xml.md5 @@ -1 +1 @@ -498bc5e1a7e68216b30483ce441b293e \ No newline at end of file +b063aa46b8e01734a1b950ace056d19b \ No newline at end of file diff --git a/plugin.video.pseudotv.live/addon.xml b/plugin.video.pseudotv.live/addon.xml index 63c7d199..cffe3f27 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/language/resource.language.en_gb/strings.po b/plugin.video.pseudotv.live/resources/language/resource.language.en_gb/strings.po index a7a3b787..73462029 100644 --- a/plugin.video.pseudotv.live/resources/language/resource.language.en_gb/strings.po +++ b/plugin.video.pseudotv.live/resources/language/resource.language.en_gb/strings.po @@ -242,7 +242,7 @@ msgid "Include 3D Media." msgstr "" msgctxt "#30056" -msgid "Insert Fillers" +msgid "Include Fillers" msgstr "" msgctxt "#30057" @@ -1229,6 +1229,10 @@ msgctxt "#32164" msgid "Can not locate broadcast!" msgstr "" +msgctxt "#32165" +msgid "No Changes Applied! +msgstr "" + # Help - strings 33000 thru 33999 reserved for common strings used in add-ons diff --git a/plugin.video.pseudotv.live/resources/lib/globals.py b/plugin.video.pseudotv.live/resources/lib/globals.py index 9af44d6c..69b84308 100644 --- a/plugin.video.pseudotv.live/resources/lib/globals.py +++ b/plugin.video.pseudotv.live/resources/lib/globals.py @@ -496,8 +496,7 @@ def setFirstrun(state=True): return PROPERTIES.setPropertyBool('hasFirstrun',state) def isClient(): - client = PROPERTIES.getEXTProperty('%s.isClient'%(ADDON_ID)) == "true" - return (client | bool(SETTINGS.getSettingInt('Client_Mode'))) + return PROPERTIES.getEXTProperty('%s.isClient'%(ADDON_ID)) == "true" def setClient(state=False,silent=True): PROPERTIES.setEXTProperty('%s.isClient'%(ADDON_ID),str(state).lower()) diff --git a/plugin.video.pseudotv.live/resources/lib/kodi.py b/plugin.video.pseudotv.live/resources/lib/kodi.py index b18df15b..c90525d2 100644 --- a/plugin.video.pseudotv.live/resources/lib/kodi.py +++ b/plugin.video.pseudotv.live/resources/lib/kodi.py @@ -64,11 +64,10 @@ def closeBusyDialog(): @contextmanager def busy_dialog(): - if not isBusyDialog(): - Builtin().executebuiltin('ActivateWindow(busydialognocancel)') - try: yield - finally: - Builtin().executebuiltin('Dialog.Close(busydialognocancel)') + if not isBusyDialog(): Builtin().executebuiltin('ActivateWindow(busydialognocancel)') + try: yield + finally: + Builtin().executebuiltin('Dialog.Close(busydialognocancel)') @contextmanager def sudo_dialog(msg): @@ -280,8 +279,6 @@ def setPropertySetting(self, key, value): def setPVRPath(self, userFolder): self.log('setPVRPath, userFolder = %s'%(userFolder)) #set local pvr folder self.setSetting('User_Folder' ,userFolder) - self.setSetting('Network_Folder',userFolder) - CLIENT_MODE = SETTINGS.getSettingInt('Client_Mode') newSettings = {'m3uPathType' :'%s'%('1' if CLIENT_MODE == 1 else '0'), 'm3uPath' :os.path.join(userFolder,M3UFLE), @@ -412,7 +409,7 @@ def setPVRInstance(self, id): def getCurrentSettings(self): self.log('getCurrentSettings') - settings = ['User_Folder','Network_Folder','UDP_PORT','TCP_PORT','Client_Mode','Remote_URL','Disable_Cache'] + settings = ['User_Folder','UDP_PORT','TCP_PORT','Client_Mode','Remote_URL','Disable_Cache'] for setting in settings: yield (setting,self.getSetting(setting)) diff --git a/plugin.video.pseudotv.live/resources/lib/service.py b/plugin.video.pseudotv.live/resources/lib/service.py index 68814286..0a6c3c92 100644 --- a/plugin.video.pseudotv.live/resources/lib/service.py +++ b/plugin.video.pseudotv.live/resources/lib/service.py @@ -233,13 +233,17 @@ def getIdle(self): return idleState, idleTime + def chkRemaining(self): + if self.myService.player.isPlaying() and self.myService.player.getTimeRemaining() < 2: + self.myService.player.toggleBackground(True) + + def chkIdle(self): self.isIdle, self.idleTime = self.getIdle() - if self.myService.player.isPseudoTV: - if self.sleepTime > 0 and (self.idleTime > (self.sleepTime * 10800)): #3hr increments - if self.triggerSleep(): return False - if self.isIdle: self.toggleOverlay(True) - else: self.toggleOverlay(False) + if self.sleepTime > 0 and (self.idleTime > (self.sleepTime * 10800)): #3hr increments + if self.triggerSleep(): return False + if self.isIdle: self.toggleOverlay(True) + else: self.toggleOverlay(False) return self.isIdle @@ -351,9 +355,11 @@ def _playing(self) -> bool: def _run(self): - with setRunning('_run'): - self.monitor.chkIdle() - + if self.player.isPseudoTV: + with setRunning('_run'): + self.monitor.chkIdle() + self.monitor.chkRemaining() + def _tasks(self): with setRunning('_tasks'): @@ -378,7 +384,7 @@ def start(self): if self._interrupt(wait=2): break elif self._suspend(): continue else: - if not isRunning('_run'): self._run() + if not isRunning('_run'): self._run() if not isRunning('_tasks'): self._tasks() self.stop() diff --git a/plugin.video.pseudotv.live/resources/lib/tasks.py b/plugin.video.pseudotv.live/resources/lib/tasks.py index 8be522f8..2d50d8dd 100644 --- a/plugin.video.pseudotv.live/resources/lib/tasks.py +++ b/plugin.video.pseudotv.live/resources/lib/tasks.py @@ -94,23 +94,23 @@ def chkQueTimer(self): self._que(self._chkQueTimer) - def _chkQueTimer(self): + def _chkQueTimer(self, client = isClient()): self.log('chkQueTimer') - if self.chkUpdateTime('chkHTTP',runEvery=900): - self._que(self.chkHTTP) - if self.chkUpdateTime('chkFiles',runEvery=600): + if self.chkUpdateTime('chkFiles',runEvery=600) and not client: self._que(self.chkFiles) - if self.chkUpdateTime('chkPVRSettings',runEvery=(MAX_GUIDEDAYS*3600)): - self._que(self.chkPVRSettings) - if self.chkUpdateTime('chkRecommended',runEvery=900): + if self.chkUpdateTime('chkRecommended',runEvery=900) and not client: self._que(self.chkRecommended) if self.chkUpdateTime('chkLibrary',runEvery=(MAX_GUIDEDAYS*3600)): self._que(self.chkLibrary) - if self.chkUpdateTime('chkChannels',runEvery=(MAX_GUIDEDAYS*3600)): + if self.chkUpdateTime('chkChannels',runEvery=(MAX_GUIDEDAYS*3600)) and not client: self._que(self.chkChannels) + if self.chkUpdateTime('chkPVRSettings',runEvery=(MAX_GUIDEDAYS*3600)) and not client: + self._que(self.chkPVRSettings) + if self.chkUpdateTime('chkHTTP',runEvery=900) and not client: + self._que(self.chkHTTP) if self.chkUpdateTime('chkJSONQUE',runEvery=600): self._que(self.chkJSONQUE) - + def chkWelcome(self): self.log('chkWelcome') @@ -157,7 +157,6 @@ def chkUpdateTime(self, key, runEvery, nextUpdate=None): def chkPVRSettings(self): try: - if isClient(): return with sudo_dialog(msg='%s %s'%(LANGUAGE(32028),LANGUAGE(30069))): if (self.jsonRPC.getSettingValue('epg.pastdaystodisplay') or 1) != MIN_GUIDEDAYS: SETTINGS.setSettingInt('Min_Days',min) @@ -182,17 +181,14 @@ def chkLibrary(self): def chkRecommended(self): try: - if isClient(): return - else: - library = Library(service=self.myService) - library.searchRecommended() - del library + library = Library(service=self.myService) + library.searchRecommended() + del library except Exception as e: self.log('chkRecommended failed! %s'%(e), xbmc.LOGERROR) def chkChannels(self): try: - if isClient(): return builder = Builder(self.myService) complete = builder.build() channels = builder.verify() @@ -207,7 +203,7 @@ def chkChannels(self): def chkFiles(self): self.log('_chkFiles') # check for missing files and run appropriate action to rebuild them only after init. startup. - if hasFirstrun() and not isClient(): + if hasFirstrun(): if not (FileAccess.exists(LIBRARYFLEPATH)): self._que(self.chkLibrary,2) if not (FileAccess.exists(CHANNELFLEPATH) & FileAccess.exists(M3UFLEPATH) & FileAccess.exists(XMLTVFLEPATH) & FileAccess.exists(GENREFLEPATH)): self._que(self.chkChannels,1) @@ -274,7 +270,6 @@ def chkSettingsChange(self, settings=[]): nSettings = dict(SETTINGS.getCurrentSettings()) for setting, value in list(settings.items()): actions = {'User_Folder' :{'func':self.setUserPath ,'args':(value,nSettings.get(setting))}, - 'Network_Folder' :{'func':SETTINGS.setPVRPath ,'args':(nSettings.get(setting))}, 'Remote_URL' :{'func':SETTINGS.setPVRRemote,'args':(nSettings.get(setting))}, 'UDP_PORT' :{'func':setPendingRestart}, 'TCP_PORT' :{'func':setPendingRestart}, diff --git a/plugin.video.pseudotv.live/resources/lib/utilities.py b/plugin.video.pseudotv.live/resources/lib/utilities.py index 6f550d6f..80377734 100644 --- a/plugin.video.pseudotv.live/resources/lib/utilities.py +++ b/plugin.video.pseudotv.live/resources/lib/utilities.py @@ -207,7 +207,7 @@ def run(self): if SETTINGS.chkPluginSettings(PVR_CLIENT_ID,IPTV_SIMPLE_SETTINGS(),override=True): DIALOG.notificationDialog(LANGUAGE(32152)) else: - DIALOG.notificationDialog(LANGUAGE(32046)) + DIALOG.notificationDialog(LANGUAGE(32165)) elif param.startswith('Channel_Manager'): ctl = (0,1) self.openChannelManager() diff --git a/plugin.video.pseudotv.live/resources/settings.xml b/plugin.video.pseudotv.live/resources/settings.xml index f8faa5e4..c93d21d5 100644 --- a/plugin.video.pseudotv.live/resources/settings.xml +++ b/plugin.video.pseudotv.live/resources/settings.xml @@ -9,10 +9,8 @@ true - - - String.Contains(Window(10000).Property(plugin.video.pseudotv.live.isClient),false) - + + 0 @@ -20,19 +18,15 @@ true - - - + 1 true - - - String.Contains(Window(10000).Property(plugin.video.pseudotv.live.isClient),false) - + + 0 @@ -47,12 +41,12 @@ true - - - String.Contains(Window(10000).Property(plugin.video.pseudotv.live.has.Backup),true) - String.Contains(Window(10000).Property(plugin.video.pseudotv.live.isClient),false) - - + + + 0 + String.Contains(Window(10000).Property(plugin.video.pseudotv.live.has.Backup),true) + + RunScript(special://home/addons/plugin.video.pseudotv.live/resources/lib/backup.py, Recover_Channels) @@ -269,11 +263,11 @@ true - - + + 0 + + String.Contains(Window(10000).Property(plugin.video.pseudotv.live.has.BlackList),true) - String.Contains(Window(10000).Property(plugin.video.pseudotv.live.isClient),false) - @@ -288,15 +282,11 @@ true + + 0 + - String.Contains(Window(10000).Property(plugin.video.pseudotv.live.has.Predefined),true) - - - - - String.Contains(Window(10000).Property(plugin.video.pseudotv.live.isClient),false) - @@ -315,9 +305,9 @@ kodi.resource.images - - - String.Contains(Window(10000).Property(plugin.video.pseudotv.live.isClient),false) + + + 0 @@ -346,10 +336,8 @@ - - String.Contains(Window(10000).Property(plugin.video.pseudotv.live.isClient),false) - - + 0 + @@ -359,11 +347,11 @@ true - - - true - String.Contains(Window(10000).Property(plugin.video.pseudotv.live.isClient),false) - + + 0 + + + true @@ -374,12 +362,10 @@ 0 0 - + - - String.Contains(Window(10000).Property(plugin.video.pseudotv.live.isClient),false) - - + 0 + @@ -393,11 +379,9 @@ 0 true - - - - String.Contains(Window(10000).Property(plugin.video.pseudotv.live.isClient),false) - + + + 0 @@ -406,11 +390,11 @@ false - - - String.Contains(Window(10000).Property(plugin.video.pseudotv.live.isClient),false) - String.Contains(Window(10000).Property(plugin.video.pseudotv.live.isLowPower),true) - + + String.Contains(Window(10000).Property(plugin.video.pseudotv.live.isLowPower),true) + + + 0 @@ -437,9 +421,12 @@ true - - - String.Contains(Window(10000).Property(plugin.video.pseudotv.live.isClient),false) + + + 0 + + + 0 @@ -497,6 +484,11 @@ 1 3 + + + 0 + + false @@ -510,6 +502,11 @@ 1 31 + + + 0 + + false @@ -678,11 +675,9 @@ 25 500 - - - - String.Contains(Window(10000).Property(plugin.video.pseudotv.live.isClient),false) - + + + 0 @@ -698,11 +693,9 @@ - - - - String.Contains(Window(10000).Property(plugin.video.pseudotv.live.isClient),false) - + + + 0 @@ -711,14 +704,24 @@ 3 false - - - - 1 - String.Contains(Window(10000).Property(plugin.video.pseudotv.live.isClient),false) - + + + 0 + + + 1 + + + + + 1 + false + + + 0 + 1 @@ -731,11 +734,9 @@ - - - - String.Contains(Window(10000).Property(plugin.video.pseudotv.live.isClient),false) - + + + 0 @@ -744,11 +745,9 @@ 1 false - - - - String.Contains(Window(10000).Property(plugin.video.pseudotv.live.isClient),false) - + + + 0 @@ -756,11 +755,9 @@ 1 false - - - - String.Contains(Window(10000).Property(plugin.video.pseudotv.live.isClient),false) - + + + 0 @@ -768,25 +765,11 @@ 1 false - - - - String.Contains(Window(10000).Property(plugin.video.pseudotv.live.isClient),false) - - - - - - 1 - false - - - String.Contains(Window(10000).Property(plugin.video.pseudotv.live.isClient),false) - - + + 0 + - @@ -801,12 +784,12 @@ - - - - true - String.Contains(Window(10000).Property(plugin.video.pseudotv.live.isClient),false) - + + + 0 + + + true @@ -819,13 +802,13 @@ - - - - true - String.Contains(Window(10000).Property(plugin.video.pseudotv.live.isClient),false) - + + + 0 + + true + @@ -842,12 +825,12 @@ - - - - true - String.Contains(Window(10000).Property(plugin.video.pseudotv.live.isClient),false) - + + + 0 + + + true @@ -865,12 +848,12 @@ - - - - true - String.Contains(Window(10000).Property(plugin.video.pseudotv.live.isClient),false) - + + + 0 + + + true @@ -884,12 +867,12 @@ kodi.resource.images - - - - 1 - String.Contains(Window(10000).Property(plugin.video.pseudotv.live.isClient),false) - + + + 0 + + + 1 @@ -904,12 +887,12 @@ kodi.resource.images - - - - 1 - String.Contains(Window(10000).Property(plugin.video.pseudotv.live.isClient),false) - + + + 0 + + + 1 @@ -926,12 +909,12 @@ 1 100 - - - - 1 - String.Contains(Window(10000).Property(plugin.video.pseudotv.live.isClient),false) - + + + 0 + + + 1 @@ -944,12 +927,12 @@ kodi.resource.images - - - - 0 - String.Contains(Window(10000).Property(plugin.video.pseudotv.live.isClient),false) - + + + 0 + + + 0 @@ -966,12 +949,12 @@ 1 100 - - - - 0 - String.Contains(Window(10000).Property(plugin.video.pseudotv.live.isClient),false) - + + + 0 + + + 0 @@ -984,12 +967,12 @@ kodi.resource.images - - - - 0 - String.Contains(Window(10000).Property(plugin.video.pseudotv.live.isClient),false) - + + + 0 + + + 0 @@ -1006,12 +989,12 @@ 1 100 - - - - 0 - String.Contains(Window(10000).Property(plugin.video.pseudotv.live.isClient),false) - + + + 0 + + + 0 @@ -1028,12 +1011,12 @@ - - - - 0 - String.Contains(Window(10000).Property(plugin.video.pseudotv.live.isClient),false) - + + + 0 + + + 0 @@ -1084,9 +1067,9 @@ false - - - String.Contains(Window(10000).Property(plugin.video.pseudotv.live.isClient),false) + + + 0 @@ -1099,9 +1082,9 @@ false - - - String.Contains(Window(10000).Property(plugin.video.pseudotv.live.isClient),false) + + + 0 @@ -1122,7 +1105,7 @@ - + 1 special://profile/addon_data/plugin.video.pseudotv.live/cache @@ -1133,6 +1116,9 @@ + 2 + + 2 @@ -1338,11 +1324,9 @@ 1 true - - - - String.Contains(Window(10000).Property(plugin.video.pseudotv.live.isClient),false) - + + + 0 diff --git a/zips/plugin.video.pseudotv.live/plugin.video.pseudotv.live-0.4.8f.zip b/zips/plugin.video.pseudotv.live/plugin.video.pseudotv.live-0.4.8f.zip new file mode 100644 index 00000000..3809c679 Binary files /dev/null and b/zips/plugin.video.pseudotv.live/plugin.video.pseudotv.live-0.4.8f.zip differ