Skip to content

Commit

Permalink
v.0.5.4g
Browse files Browse the repository at this point in the history
  • Loading branch information
Lunatixz committed Sep 19, 2024
1 parent b28421e commit 2849cf5
Show file tree
Hide file tree
Showing 9 changed files with 39 additions and 27 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.4f" name="PseudoTV Live" provider-name="Lunatixz">
<addon id="plugin.video.pseudotv.live" version="0.5.4g" 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 @@
65d5dcdf92c4c5f52a67b1c63d70ce5f
b65982b66e2b3f1b517f13e43df12aae
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.4f" name="PseudoTV Live" provider-name="Lunatixz">
<addon id="plugin.video.pseudotv.live" version="0.5.4g" 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
1 change: 1 addition & 0 deletions plugin.video.pseudotv.live/changelog.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
v.0.5.5
-Tweaked Restart Button settings and labels.
-Fixed "Play from here" playback.
-Added Local to URL image converter; hosted via Kodi webserver and PseudoTV Server.
-Added "Smart" TV-guide loading as the default when launching PseudoTV Live via Kodi UI.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -634,7 +634,7 @@ msgid "Resume Later"
msgstr ""

msgctxt "#30153"
msgid "Set Replay Percentage"
msgid "Restart Percentage"
msgstr ""

msgctxt "#30154"
Expand Down
10 changes: 5 additions & 5 deletions plugin.video.pseudotv.live/resources/lib/rules.py
Original file line number Diff line number Diff line change
Expand Up @@ -709,7 +709,7 @@ def __init__(self):
self.name = LANGUAGE(30153)
self.description = LANGUAGE(33153)
self.optionLabels = [LANGUAGE(30153)]
self.optionValues = [SETTINGS.getSettingInt('Enable_Replay')]
self.optionValues = [SETTINGS.getSettingInt('Restart_Percentage')]
self.optionDescriptions = [LANGUAGE(33153)]
self.actions = [RULES_ACTION_PLAYER_START,RULES_ACTION_PLAYER_STOP]
self.selectBoxOptions = [list(range(0,100,5))]
Expand All @@ -731,12 +731,12 @@ def onAction(self, optionindex):

def runAction(self, actionid, citem, parameter, player):
if actionid == RULES_ACTION_PLAYER_START:
self.storedValues[0] = player.enableReplay
player.enableReplay = self.optionValues[0]
self.storedValues[0] = player.restartPercentage
player.restartPercentage = self.optionValues[0]

elif actionid == RULES_ACTION_PLAYER_STOP:
player.enableReplay = self.storedValues[0]
self.log("runAction, setting enableReplay = %s"%(player.enableReplay))
player.restartPercentage = self.storedValues[0]
self.log("runAction, setting restartPercentage = %s"%(player.restartPercentage))
return parameter


Expand Down
18 changes: 12 additions & 6 deletions plugin.video.pseudotv.live/resources/lib/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def __init__(self, jsonRPC=None):
self.jsonRPC = jsonRPC
self.disableTrakt = SETTINGS.getSettingBool('Disable_Trakt') #todo adv. rule opt
self.rollbackPlaycount = SETTINGS.getSettingBool('Rollback_Watched')#todo adv. rule opt
self.enableReplay = SETTINGS.getSettingInt('Enable_Replay')
self.restartPercentage = SETTINGS.getSettingInt('Restart_Percentage')
self.saveDuration = SETTINGS.getSettingBool('Store_Duration')

"""
Expand All @@ -69,8 +69,12 @@ def onPlayBackStarted(self):
def onAVChange(self):
self.log('onAVChange')
if self.isPseudoTV:
self.lastSubState = BUILTIN.isSubtitle()
self.isIdle = self.myService.monitor.chkIdle()
self.lastSubState = BUILTIN.isSubtitle()
self.disableTrakt = SETTINGS.getSettingBool('Disable_Trakt') #todo adv. rule opt
self.rollbackPlaycount = SETTINGS.getSettingBool('Rollback_Watched')#todo adv. rule opt
self.restartPercentage = SETTINGS.getSettingInt('Restart_Percentage')
self.saveDuration = SETTINGS.getSettingBool('Store_Duration')
self.isIdle = self.myService.monitor.chkIdle()


def onAVStarted(self):
Expand Down Expand Up @@ -232,10 +236,10 @@ def _onError(self):


def toggleReplay(self, state: bool=True, sysInfo: dict={}):
self.log('toggleReplay, state = %s, enableReplay = %s'%(state,self.enableReplay))
if state and bool(self.enableReplay) and not self.isIdle and sysInfo.get('fitem'):
self.log('toggleReplay, state = %s, restartPercentage = %s'%(state,self.restartPercentage))
if state and self.myService.monitor.enableOverlay and bool(self.restartPercentage) and not self.isIdle and sysInfo.get('fitem'):
progress = self.getPlayerProgress()
if (progress >= self.enableReplay and progress < SETTINGS.getSettingInt('Seek_Threshold')):
if (progress >= self.restartPercentage and progress < SETTINGS.getSettingInt('Seek_Threshold')):
self.replay = Replay("%s.replay.xml"%(ADDON_ID), ADDON_PATH, "default", "1080i", player=self)
self.replay.doModal()
elif hasattr(self.replay, 'close'): self.replay.close()
Expand Down Expand Up @@ -355,6 +359,8 @@ def onSettingsChangedTimer(self):

def _onSettingsChanged(self):
self.log('_onSettingsChanged')
self.sleepTime = (SETTINGS.getSettingInt('Idle_Timer') or 0)
self.enableOverlay = (SETTINGS.getSettingBool('Enable_Overlay') or True)
self.myService.currentChannels = self.myService.tasks.chkChannelChange(self.myService.currentChannels) #check for channel change, rebuild if needed.
self.myService.currentSettings = self.myService.tasks.chkSettingsChange(self.myService.currentSettings) #check for settings change, take action if needed.

Expand Down
29 changes: 17 additions & 12 deletions plugin.video.pseudotv.live/resources/settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -528,18 +528,6 @@
</setting>
</group>
<group id="2" label="30048">
<setting id="Enable_Replay" type="integer" label="30153" help="33153">
<level>1</level>
<default>5</default>
<constraints>
<minimum>0</minimum>
<step>5</step>
<maximum>75</maximum>
</constraints>
<control type="slider" format="percentage">
<popup>false</popup>
</control>
</setting>
<setting id="Enable_Overlay" type="boolean" label="30042" help="33042">
<level>1</level>
<default>true</default>
Expand All @@ -562,6 +550,23 @@
<multiselect>true</multiselect>
</control>
</setting>
<setting id="Restart_Percentage" type="integer" label="30153" help="33153" parent="Enable_Overlay">
<level>1</level>
<default>5</default>
<constraints>
<minimum>0</minimum>
<step>5</step>
<maximum>75</maximum>
</constraints>
<dependencies>
<dependency type="visible">
<condition operator="is" setting="Enable_Overlay">true</condition>
</dependency>
</dependencies>
<control type="slider" format="percentage">
<popup>false</popup>
</control>
</setting>
<setting id="Enable_OnNext" type="boolean" label="30045" help="33045" parent="Enable_Overlay">
<level>1</level>
<default>true</default>
Expand Down
Binary file not shown.

0 comments on commit 2849cf5

Please sign in to comment.