diff --git a/addons.xml b/addons.xml index a82d971f..a58602b8 100644 --- a/addons.xml +++ b/addons.xml @@ -1,6 +1,6 @@ - + diff --git a/addons.xml.md5 b/addons.xml.md5 index 959e6f34..9c950ee1 100644 --- a/addons.xml.md5 +++ b/addons.xml.md5 @@ -1 +1 @@ -e5f7b19f0b8d6c3e25d5906593d157ea \ No newline at end of file +a46d51e3f906033df9c818646e2dee9a \ No newline at end of file diff --git a/plugin.video.pseudotv.live/addon.xml b/plugin.video.pseudotv.live/addon.xml index 667bad14..fcf7ce27 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/autotune.py b/plugin.video.pseudotv.live/resources/lib/autotune.py index 054a1e1f..24cea640 100644 --- a/plugin.video.pseudotv.live/resources/lib/autotune.py +++ b/plugin.video.pseudotv.live/resources/lib/autotune.py @@ -44,11 +44,19 @@ def getAutotuned(self): def _runTune(self, samples=False, rebuild=False, dia=None): - self.log('_runTune, samples = %s'%(samples)) if not hasAutotuned() and not isClient(): setAutotuned() autoChannels = self.getAutotuned() - if len(autoChannels) == 0 and samples: + self.log('_runTune, autotune channels = %s'%(len(autoChannels))) + if len(autoChannels) > 0: rebuild = True + elif len(autoChannels) == 0: + autoEnabled = [] + for type in AUTOTUNE_TYPES: autoEnabled.extend(self.library.getEnabled(type)) + self.log('_runTune, library enabled items = %s'%(len(autoEnabled))) + if len(autoEnabled) > 0: rebuild = True #recover empty channels.json with enabled library.json items. + else: samples = True #create sample channels "autotune". + + if samples: opt = '' msg = (LANGUAGE(32042)%ADDON_NAME) if Backup().hasBackup(): @@ -58,19 +66,15 @@ def _runTune(self, samples=False, rebuild=False, dia=None): if retval == 1: dia = DIALOG.progressBGDialog(header='%s, %s'%(ADDON_NAME,'%s %s'%(LANGUAGE(32021),LANGUAGE(30038)))) elif retval == 2: return Backup().recoverChannels() else: return - elif len(autoChannels) > 0: - samples = False - rebuild = True + elif rebuild: PROPERTIES.setEXTProperty('%s.has.Predefined'%(ADDON_ID),True) - if samples or rebuild: - PROPERTIES.setEXTProperty('%s.has.Predefined'%(ADDON_ID),True) - for idx, ATtype in enumerate(AUTOTUNE_TYPES): - if samples and dia: dia = DIALOG.progressBGDialog(int((idx+1)*100//len(AUTOTUNE_TYPES)),dia,ATtype,'%s, %s'%(ADDON_NAME,'%s %s'%(LANGUAGE(32021),LANGUAGE(30038)))) - self.selectAUTOTUNE(ATtype, autoSelect=samples, rebuildChannels=rebuild) + for idx, ATtype in enumerate(AUTOTUNE_TYPES): + if dia: dia = DIALOG.progressBGDialog(int((idx+1)*100//len(AUTOTUNE_TYPES)),dia,ATtype,'%s, %s'%(ADDON_NAME,'%s %s'%(LANGUAGE(32021),LANGUAGE(30038)))) + self.selectAUTOTUNE(ATtype, autoSelect=samples, rebuildChannels=rebuild) def selectAUTOTUNE(self, ATtype, autoSelect=False, rebuildChannels=False): - self.log('selectAUTOTUNE, ATtype = %s'%(ATtype)) + self.log('selectAUTOTUNE, ATtype = %s, autoSelect = %s, rebuildChannels = %s'%(ATtype,autoSelect,rebuildChannels)) def _build(item): return LISTITEMS.buildMenuListItem(item['name'],item['type'],item['logo']) diff --git a/plugin.video.pseudotv.live/resources/lib/channels.py b/plugin.video.pseudotv.live/resources/lib/channels.py index ce58ecc8..f9c9942f 100644 --- a/plugin.video.pseudotv.live/resources/lib/channels.py +++ b/plugin.video.pseudotv.live/resources/lib/channels.py @@ -33,7 +33,7 @@ def __init__(self): def log(self, msg, level=xbmc.LOGDEBUG): return log('%s: %s'%(self.__class__.__name__,msg),level) - + def _load(self, file=CHANNELFLEPATH): channelDATA = getJSON(file) self.log('_load, channels = %s'%(len(channelDATA.get('channels',[])))) diff --git a/plugin.video.pseudotv.live/resources/lib/tasks.py b/plugin.video.pseudotv.live/resources/lib/tasks.py index 01506cf0..30fb6d24 100644 --- a/plugin.video.pseudotv.live/resources/lib/tasks.py +++ b/plugin.video.pseudotv.live/resources/lib/tasks.py @@ -221,7 +221,7 @@ def runJSON(self): def runAutoTune(self): try: autotune = Autotune(service=self.myService) - autotune._runTune(samples=True) + autotune._runTune() del autotune except Exception as e: self.log('runAutoTune failed! %s'%(e), xbmc.LOGERROR) diff --git a/zips/plugin.video.pseudotv.live/plugin.video.pseudotv.live-0.4.5k.zip b/zips/plugin.video.pseudotv.live/plugin.video.pseudotv.live-0.4.5k.zip index 0d12e9b9..6e89f60d 100644 Binary files a/zips/plugin.video.pseudotv.live/plugin.video.pseudotv.live-0.4.5k.zip and b/zips/plugin.video.pseudotv.live/plugin.video.pseudotv.live-0.4.5k.zip differ diff --git a/zips/plugin.video.pseudotv.live/plugin.video.pseudotv.live-0.4.5l.zip b/zips/plugin.video.pseudotv.live/plugin.video.pseudotv.live-0.4.5l.zip new file mode 100644 index 00000000..9621d993 Binary files /dev/null and b/zips/plugin.video.pseudotv.live/plugin.video.pseudotv.live-0.4.5l.zip differ