Skip to content

Commit

Permalink
v.0.4.5l
Browse files Browse the repository at this point in the history
  • Loading branch information
Lunatixz committed Feb 28, 2024
1 parent 22ea4c6 commit 3900616
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 16 deletions.
2 changes: 1 addition & 1 deletion 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.4.5k" name="PseudoTV Live" provider-name="Lunatixz">
<addon id="plugin.video.pseudotv.live" version="0.4.5l" 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
2 changes: 1 addition & 1 deletion addons.xml.md5
Original file line number Diff line number Diff line change
@@ -1 +1 @@
e5f7b19f0b8d6c3e25d5906593d157ea
a46d51e3f906033df9c818646e2dee9a
2 changes: 1 addition & 1 deletion 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.4.5k" name="PseudoTV Live" provider-name="Lunatixz">
<addon id="plugin.video.pseudotv.live" version="0.4.5l" 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
26 changes: 15 additions & 11 deletions plugin.video.pseudotv.live/resources/lib/autotune.py
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand All @@ -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'])

Expand Down
2 changes: 1 addition & 1 deletion plugin.video.pseudotv.live/resources/lib/channels.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',[]))))
Expand Down
2 changes: 1 addition & 1 deletion plugin.video.pseudotv.live/resources/lib/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
Binary file not shown.
Binary file not shown.

0 comments on commit 3900616

Please sign in to comment.