Skip to content

Commit

Permalink
v.5.5h
Browse files Browse the repository at this point in the history
  • Loading branch information
Lunatixz committed Oct 22, 2024
1 parent e61e38c commit 265b12d
Show file tree
Hide file tree
Showing 14 changed files with 76 additions and 73 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.5.5g" name="PseudoTV Live" provider-name="Lunatixz">
<addon id="plugin.video.pseudotv.live" version="0.5.5h" 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 @@
5850d5b8f2a3cca0af0d37dd4161b2b1
df72e7a2a11f0b983b65edc5c8f79ca6
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.5.5g" name="PseudoTV Live" provider-name="Lunatixz">
<addon id="plugin.video.pseudotv.live" version="0.5.5h" 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
21 changes: 11 additions & 10 deletions plugin.video.pseudotv.live/resources/lib/channelbug.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()


Expand Down
10 changes: 5 additions & 5 deletions plugin.video.pseudotv.live/resources/lib/context_create.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand Down
70 changes: 35 additions & 35 deletions plugin.video.pseudotv.live/resources/lib/context_record.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
3 changes: 2 additions & 1 deletion plugin.video.pseudotv.live/resources/lib/cqueue.py
Original file line number Diff line number Diff line change
Expand Up @@ -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!")
Expand Down
6 changes: 3 additions & 3 deletions plugin.video.pseudotv.live/resources/lib/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)


Expand Down
17 changes: 9 additions & 8 deletions plugin.video.pseudotv.live/resources/lib/utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<window>
<backgroundcolor>0x00000000</backgroundcolor>
<onload>SetProperty(plugin.video.pseudotv.live.OVERLAY_BACKGROUND,true,10000)</onload>
<onunload>SetProperty(plugin.video.pseudotv.live.OVERLAY_BACKGROUND,false,10000)</onunload>
<onload>SetProperty(plugin.video.pseudotv.live.Running.OVERLAY_BACKGROUND,true,10000)</onload>
<onunload>SetProperty(plugin.video.pseudotv.live.Running.OVERLAY_BACKGROUND,false,10000)</onunload>
<controls>
<animation type="WindowOpen" reversible="false">
<effect type="zoom" start="80" end="100" center="960,540" delay="160" tween="back" time="240"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<window>
<backgroundcolor>0x00000000</backgroundcolor>
<onload>SetProperty(plugin.video.pseudotv.live.OVERLAY_CHANNELBUG_RUNNING,true,10000)</onload>
<onunload>SetProperty(plugin.video.pseudotv.live.OVERLAY_CHANNELBUG_RUNNING,false,10000)</onunload>
<onload>SetProperty(plugin.video.pseudotv.live.Running.OVERLAY_CHANNELBUG_RUNNING,true,10000)</onload>
<onunload>SetProperty(plugin.video.pseudotv.live.Running.OVERLAY_CHANNELBUG_RUNNING,false,10000)</onunload>
<controls>
<animation type="WindowOpen" reversible="false">
<effect type="zoom" start="80" end="100" center="960,540" delay="160" tween="back" time="240"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<window>
<backgroundcolor>0x00000000</backgroundcolor>
<onload>SetProperty(plugin.video.pseudotv.live.OVERLAY_MANAGER,true,10000)</onload>
<onunload>SetProperty(plugin.video.pseudotv.live.OVERLAY_MANAGER,false,10000)</onunload>
<onload>SetProperty(plugin.video.pseudotv.live.Running.OVERLAY_MANAGER,true,10000)</onload>
<onunload>SetProperty(plugin.video.pseudotv.live.Running.OVERLAY_MANAGER,false,10000)</onunload>
<controls>
<animation type="WindowOpen" reversible="false">
<effect type="zoom" start="80" end="100" center="960,540" delay="160" tween="back" time="240"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<window>
<defaultcontrol always="true">40001</defaultcontrol>
<onload>SetProperty(plugin.video.pseudotv.live.OVERLAY_REPLAY,true,10000)</onload>
<onunload>SetProperty(plugin.video.pseudotv.live.OVERLAY_REPLAY,false,10000)</onunload>
<onload>SetProperty(plugin.video.pseudotv.live.Running.OVERLAY_REPLAY,true,10000)</onload>
<onunload>SetProperty(plugin.video.pseudotv.live.Running.OVERLAY_REPLAY,false,10000)</onunload>
<controls>
<control type="group">
<posx>0</posx>
Expand Down
Binary file not shown.

0 comments on commit 265b12d

Please sign in to comment.