Skip to content

Commit

Permalink
v.0.5.5g
Browse files Browse the repository at this point in the history
  • Loading branch information
Lunatixz committed Oct 21, 2024
1 parent 067a315 commit e61e38c
Show file tree
Hide file tree
Showing 14 changed files with 39 additions and 32 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.5f" name="PseudoTV Live" provider-name="Lunatixz">
<addon id="plugin.video.pseudotv.live" version="0.5.5g" 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 @@
a7c814ea9ceb1d5ea63d99f009d0025d
5850d5b8f2a3cca0af0d37dd4161b2b1
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.5f" name="PseudoTV Live" provider-name="Lunatixz">
<addon id="plugin.video.pseudotv.live" version="0.5.5g" 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
Original file line number Diff line number Diff line change
Expand Up @@ -674,7 +674,7 @@ msgid "Miscellaneous Options"
msgstr ""

msgctxt "#30163"
msgid "Ratings & Network Bumpers"
msgid "Ratings & Bumpers"
msgstr ""

msgctxt "#30164"
Expand Down
5 changes: 5 additions & 0 deletions plugin.video.pseudotv.live/resources/lib/kodi.py
Original file line number Diff line number Diff line change
Expand Up @@ -827,6 +827,11 @@ def clearTrash(self, instanceID=None): #clear abandoned properties after instanc
for prop in tmpDCT.get(instanceID,[]): self.clearEXTProperty(prop)


def __exit__(self):
self.log('__exit__')
self.clearTrash()


class ListItems:

def log(self, msg, level=xbmc.LOGDEBUG):
Expand Down
6 changes: 2 additions & 4 deletions plugin.video.pseudotv.live/resources/lib/library.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,11 @@
REG_KEY = 'PseudoTV_Recommended.%s'

class Service:
monitor = MONITOR()
from jsonrpc import JSONRPC
jsonRPC = JSONRPC()
monitor = MONITOR()
jsonRPC = JSONRPC()
def _interrupt(self, wait: float=.001) -> bool:
return self.monitor.waitForAbort(wait)


def _suspend(self) -> bool:
return PROPERTIES.isPendingSuspend()

Expand Down
4 changes: 1 addition & 3 deletions plugin.video.pseudotv.live/resources/lib/multiroom.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,14 @@
# -*- coding: utf-8 -*-

from globals import *
from jsonrpc import JSONRPC
from server import Discovery, Announcement

class Service:
from jsonrpc import JSONRPC
monitor = xbmc.Monitor()
jsonRPC = JSONRPC()
def _interrupt(self, wait: float=.001) -> bool:
return self.monitor.waitForAbort(wait)


def _suspend(self) -> bool:
return PROPERTIES.isPendingSuspend()

Expand Down
4 changes: 2 additions & 2 deletions plugin.video.pseudotv.live/resources/lib/seasons.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@
"October" : {'1':{'name':"Willy Wonka Week" , 'tagline':"“The Suspense Is Terrible. I Hope It’ll Last.”" , 'keyword':'wonka' , 'query':[TV_QUERY,MOVIE_QUERY], 'logo':'https://seeklogo.com/images/W/wonka-logo-AFC0443DD4-seeklogo.com.png'},
'2':{'name':"Back to the Future Week" , 'tagline':"“Great Scott!”" , 'keyword':'future' , 'query':[TV_QUERY,MOVIE_QUERY], 'logo':'https://upload.wikimedia.org/wikipedia/commons/1/1b/Back_to_the_Future_film_series_logo.png'},
'3':{'name':"" , 'tagline':'' , 'keyword':'' , 'query':[TV_QUERY,MOVIE_QUERY], 'logo':''},
'4':{'name':"Halloween Season" , 'tagline':"Spooky Suggestions" , 'keyword':'horror' , 'query':[TV_QUERY,MOVIE_QUERY], 'logo':'https://png.pngtree.com/png-clipart/20191120/original/pngtree-halloween-party-with-pumpkin-icon-and-symbol-template-png-image_5048069.jpg'},
'5':{'name':"Halloween Season" , 'tagline':"Spooky Suggestions" , 'keyword':'horror' , 'query':[TV_QUERY,MOVIE_QUERY], 'logo':'https://png.pngtree.com/png-clipart/20191120/original/pngtree-halloween-party-with-pumpkin-icon-and-symbol-template-png-image_5048069.jpg'}},
'4':{'name':"Halloween Season" , 'tagline':"Spooky Suggestions" , 'keyword':'horror' , 'query':[TV_QUERY,MOVIE_QUERY], 'logo':'https://png.pngtree.com/png-vector/20240925/ourmid/pngtree-happy-halloween-pumpkin-spooky-festival-png-image_13904615.png'},
'5':{'name':"Halloween Season" , 'tagline':"Spooky Suggestions" , 'keyword':'horror' , 'query':[TV_QUERY,MOVIE_QUERY], 'logo':'https://png.pngtree.com/png-vector/20240925/ourmid/pngtree-happy-halloween-pumpkin-spooky-festival-png-image_13904615.png'}},

"November" : {'1':{'name':"" , 'tagline':'' , 'keyword':'' , 'query':[TV_QUERY,MOVIE_QUERY], 'logo':''},
'2':{'name':"Veterans Week" , 'tagline':"“Honoring all who served”" , 'keyword':'heros' , 'query':[TV_QUERY,MOVIE_QUERY], 'logo':'https://images.vexels.com/media/users/3/207384/isolated/preview/d21b0f9e1fc67cc5579d05c9427eb2ec-veterans-day-usa-flat.png'},
Expand Down
28 changes: 15 additions & 13 deletions plugin.video.pseudotv.live/resources/lib/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ def onPlayBackStarted(self):
def onAVChange(self):
self.log('onAVChange')
self.service.monitor.chkIdle()
if self.isPseudoTV: self._onPlay()


def onAVStarted(self):
Expand Down Expand Up @@ -125,10 +124,13 @@ def getPlayerSysInfo(self):
self.log('getPlayerSysInfo, sysInfo = %s'%(sysInfo))
return sysInfo


def getPlayerItem(self):
try: return self.getPlayingItem()
except: return xbmcgui.ListItem()
try: return self.getPlayingItem()
except:
if self.service._interrupt(0.5): return None
elif self.isPlaying(): return self.getPlayerItem()
else: return xbmcgui.ListItem()


def getPlayerFile(self):
Expand Down Expand Up @@ -230,13 +232,13 @@ def _onStop(self):
def _onError(self):
self.log('_onError, playing file = %s'%(self.getPlayerFile()))
self.onPlayBackStopped()


def toggleReplay(self, state: bool=True):
self.log('toggleReplay, state = %s, restartPercentage = %s'%(state,self.restartPercentage))
if state and self.service.monitor.enableOverlay and bool(self.restartPercentage) and not self.isIdle and self.sysInfo.get('fitem'):
if state and self.service.monitor.enableOverlay and bool(self.restartPercentage):
progress = self.getPlayerProgress()
if (progress >= self.restartPercentage and progress < SETTINGS.getSettingInt('Seek_Threshold')):
if (progress >= self.restartPercentage and progress < SETTINGS.getSettingInt('Seek_Threshold')) and not self.isIdle and self.sysInfo.get('fitem'):
self.replay = Replay(RESTART_XML, ADDON_PATH, "default", "1080i", player=self)
self.replay.doModal()
elif hasattr(self.replay, 'close'): self.replay.close()
Expand Down Expand Up @@ -296,7 +298,7 @@ def chkIdle(self):
def toggleOverlay(self, state: bool=True):
self.log("toggleOverlay, state = %s"%(state))
if state and self.enableOverlay:
if not hasattr(self.overlay, 'open'):
if not hasattr(self.overlay, 'open') and self.service.player.isPseudoTV:
self.overlay = Overlay(jsonRPC=self.jsonRPC,player=self.service.player)
self.overlay.open()
else:
Expand Down Expand Up @@ -360,6 +362,7 @@ def _onSettingsChanged(self):
class Service():
currentChannels = []
currentSettings = []
PROPERTIES.clrInstanceID()

def __init__(self):
self.log('__init__')
Expand Down Expand Up @@ -397,9 +400,9 @@ def _suspend(self) -> bool: #continue


def __restart(self, wait=1.0) -> bool:
self.pendingRestart = (self.pendingRestart | PROPERTIES.isPendingRestart() | self.monitor.waitForAbort(wait) )
self.pendingRestart = (self.pendingRestart | PROPERTIES.isPendingRestart())
self.log('__restart, pendingRestart = %s'%(self.pendingRestart))
return self.pendingRestart
return (self.pendingRestart | self.monitor.waitForAbort(wait))


def __playing(self) -> bool:
Expand All @@ -409,7 +412,6 @@ def __playing(self) -> bool:

def __tasks(self):
self.log('__tasks')
if self.player.isPseudoTV: self.tasks._que(self.monitor.chkIdle,1)
self.tasks._chkEpochTimer('chkQueTimer',self.tasks._chkQueTimer,EPOCH_TIMER)


Expand All @@ -423,6 +425,7 @@ def _start(self):
self.log('_start')
self.__initialize()
while not self.monitor.abortRequested():
self.monitor.chkIdle()
if self.__restart(): break
else: self.__tasks()
self._stop()
Expand All @@ -436,7 +439,6 @@ def _stop(self):
thread.join(1.0)
except: pass
self.log('_stop, finished, exiting %s...'%(ADDON_NAME))
PROPERTIES.clrInstanceID()
if PROPERTIES.isPendingRestart(): Service()._start()
if self.pendingRestart: Service()._start()

if __name__ == '__main__': Service()._start()
1 change: 1 addition & 0 deletions plugin.video.pseudotv.live/resources/lib/utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,7 @@ def deleteFiles(self, msg, full: bool=False):
if FileAccess.delete(files[key]): DIALOG.notificationDialog(LANGUAGE(32127)%(key.replace(':','')))
if full:
SETTINGS.setAutotuned(False)
PROPERTIES.setEpochTimer('chkPVRRefresh')
PROPERTIES.setPendingRestart()


Expand Down
5 changes: 3 additions & 2 deletions plugin.video.pseudotv.live/resources/settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1190,6 +1190,7 @@
<dependency type="visible">
<and>
<condition on="property" name="InfoBool">!System.HasAddon(script.kodi.loguploader)</condition>
<condition on="property" name="InfoBool">!System.AddonIsEnabled(script.kodi.loguploader)</condition>
</and>
</dependency>
</dependencies>
Expand Down Expand Up @@ -1229,12 +1230,12 @@
<allowempty>true</allowempty>
</constraints>
<dependencies>
<dependency type="enable">
<dependency type="visible">
<and>
<condition operator="is" setting="Debug_Enable">true</condition>
</and>
</dependency>
<dependency type="visible">
<dependency type="enable">
<and>
<condition on="property" name="InfoBool">System.AddonIsEnabled(script.kodi.loguploader)</condition>
<condition on="property" name="InfoBool">System.HasAddon(script.kodi.loguploader)</condition>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@
<control type="image" id="40000">
<description>Replay Progress</description>
<left>522</left>
<bottom>310</bottom>
<bottom>360</bottom>
<width>116</width>
<height>24</height>
<texture>buttons/ButtonFocus.png</texture>
<visible>[Control.IsVisible(40001) + Player.Playing] + [!String.Contains(VideoPlayer.Genre,Pre-Roll) | !String.Contains(VideoPlayer.Genre,Post-Roll)]</visible>
<visible>Control.IsVisible(40001)</visible>
</control>
<control type="button" id="40001">
<description>Replay Button</description>
<left>480</left>
<bottom>270</bottom>
<bottom>320</bottom>
<width>200</width>
<height>106</height>
<colordiffuse>FFFFFFFF</colordiffuse>
Expand All @@ -44,7 +44,9 @@
<onclick/>
<onfocus/>
<onunfocus/>
<visible>Player.Playing + [!String.Contains(VideoPlayer.Genre,Pre-Roll) | !String.Contains(VideoPlayer.Genre,Post-Roll)]</visible>
<visible>Player.Playing + Window.IsActive(fullscreenvideo)</visible>
<visible>!String.Contains(VideoPlayer.Genre,Pre-Roll) | !String.Contains(VideoPlayer.Genre,Post-Roll)</visible>
<visible>!Window.IsActive(seekbar) | !Window.IsActive(pvrosdchannels) | !Window.IsActive(pvrchannelguide)</visible>
</control>
</control>
</controls>
Expand Down
Binary file not shown.
Binary file not shown.

0 comments on commit e61e38c

Please sign in to comment.