Skip to content

Commit

Permalink
v.0.5.7f
Browse files Browse the repository at this point in the history
  • Loading branch information
Lunatixz committed Jan 4, 2025
1 parent 58cb733 commit deba4fc
Show file tree
Hide file tree
Showing 10 changed files with 132 additions and 135 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/addon-checker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
- name: Set up Python 3.8
uses: actions/setup-python@v1
with:
python-version: 3.8
python-version: 3.9.20
- name: Install addon checker
run: |
pip install -q kodi-addon-checker
Expand Down
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.7e" name="PseudoTV Live" provider-name="Lunatixz">
<addon id="plugin.video.pseudotv.live" version="0.5.7f" 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 @@
7a3ef21a0ec9c096dc3a534798eb2c34
ca4728180dfee41c970c3d52f217b518
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.7e" name="PseudoTV Live" provider-name="Lunatixz">
<addon id="plugin.video.pseudotv.live" version="0.5.7f" 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: 2 additions & 0 deletions plugin.video.pseudotv.live/changelog.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
v.0.5.8
-UI Improvements.
-Added New "On Next" controls to overlay position utility.
-Various tweaks to playback & on next logic.
-Various tweaks to improve stability.
-Fixed Restart Percentage setting to allow 0% ie. Disable Restart Prompt.
Expand Down
163 changes: 79 additions & 84 deletions plugin.video.pseudotv.live/resources/lib/overlay.py

Large diffs are not rendered by default.

48 changes: 24 additions & 24 deletions plugin.video.pseudotv.live/resources/lib/overlaytool.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ def __init__(self, *args, **kwargs):
self.advRule = (kwargs.get("ADV_RULES") or False)
self.focusIDX = (kwargs.get("Focus_IDX") or 1)

self._defViewMode = self.jsonRPC.getViewMode()
self._vinViewMode = (kwargs.get("Vignette_VideoMode") or self._defViewMode)
self._vinImage = (kwargs.get("Vignette_Image") or os.path.join(MEDIA_LOC,'overlays','ratio.png'))
self.defaultView = self.jsonRPC.getViewMode()
self.vinView = (kwargs.get("Vignette_VideoMode") or self.defaultView)
self.vinImage = (kwargs.get("Vignette_Image") or os.path.join(MEDIA_LOC,'overlays','ratio.png'))

self.channelBugDiffuse = '0x%s'%((kwargs.get("ChannelBug_Color") or SETTINGS.getSetting('ChannelBug_Color')))
self.autoBugX, self.autoBugY = (abs(int(self.window_w // 8) - self.window_w) - 128, abs(int(self.window_h // 16) - self.window_h) - 128)
Expand All @@ -72,21 +72,21 @@ def onInit(self):
if not BUILTIN.getInfoBool('IsFullscreen','System'):
DIALOG.okDialog(LANGUAGE(32097)%(BUILTIN.getInfoLabel('ScreenResolution','System')))

self._vignetteControl = xbmcgui.ControlImage(0, 0, self.window_w, self.window_h, self._vinImage, aspectRatio=0) #IDX 0
self._addCntrl(self._vignetteControl)
self.vignetteControl = xbmcgui.ControlImage(0, 0, self.window_w, self.window_h, self.vinImage, aspectRatio=0) #IDX 0
self._addCntrl(self.vignetteControl)

self._channelBug = xbmcgui.ControlImage(self.channelBugX, self.channelBugY, 128, 128, COLOR_LOGO, 2, self.channelBugDiffuse) #IDX 1
self._addCntrl(self._channelBug)
self.posx, self.posy = self._channelBug.getX(),self._channelBug.getY()
self.channelBug = xbmcgui.ControlImage(self.channelBugX, self.channelBugY, 128, 128, COLOR_LOGO, 2, self.channelBugDiffuse) #IDX 1
self._addCntrl(self.channelBug)
self.posx, self.posy = self.channelBug.getX(),self.channelBug.getY()

self._onNext_Border = xbmcgui.ControlImage(self.onNextX, self.onNextY, 240, 135, os.path.join(MEDIA_LOC,'colors','white.png'), 0, '0xC0%s'%(COLOR_BACKGROUND)) #IDX 2
self._onNext_Artwork = xbmcgui.ControlImage((self.onNextX + 5), self.onNextY + 5, 230, 125, COLOR_FANART, aspectRatio=0)
self._onNext_Text = xbmcgui.ControlTextBox(self.onNextX, (self.onNextY + 140), 960, 70, 'font27', self.onNextColor)
self._onNext_Text.setText('%s %s\n%s %s'%(LANGUAGE(32104),ADDON_NAME,LANGUAGE(32116),ADDON_NAME))
self.onNext_Border = xbmcgui.ControlImage(self.onNextX, self.onNextY, 240, 135, os.path.join(MEDIA_LOC,'colors','white.png'), 0, '0xC0%s'%(COLOR_BACKGROUND)) #IDX 2
self.onNext_Artwork = xbmcgui.ControlImage((self.onNextX + 5), self.onNextY + 5, 230, 125, COLOR_FANART, aspectRatio=0)
self.onNext_Text = xbmcgui.ControlTextBox(self.onNextX, (self.onNextY + 140), 960, 70, 'font27', self.onNextColor)
self.onNext_Text.setText('%s %s\n%s %s'%(LANGUAGE(32104),ADDON_NAME,LANGUAGE(32116),ADDON_NAME))

self._addCntrl(self._onNext_Border)
self._addCntrl(self._onNext_Artwork, incl=False)
self._addCntrl(self._onNext_Text, incl=False)
self._addCntrl(self.onNext_Border)
self._addCntrl(self.onNext_Artwork, incl=False)
self._addCntrl(self.onNext_Text, incl=False)

self.focusCycleLST.insert(0,self.focusCycleLST.pop(self.focusIDX))
self.focusCycle = cycle(self.focusCycleLST).__next__
Expand All @@ -109,11 +109,11 @@ def switch(self, cntrl=None):
self.focusControl = cntrl
self._setFocus(self.focusControl)
for cntrl in self.focusCNTRLST:
if cntrl == self._onNext_Border:
if cntrl == self.onNext_Border:
self.posx, self.posy = cntrl.getX(),cntrl.getY()
cntrl.setAnimations([('Conditional', 'effect=fade start=25 end=100 time=240 delay=160 condition=True reversible=False')])
self._onNext_Artwork.setAnimations([('Conditional', 'effect=fade start=25 end=100 time=240 delay=160 condition=True reversible=False')])
self._onNext_Text.setAnimations([('Conditional', 'effect=fade start=25 end=100 time=240 delay=160 condition=True reversible=False')])
self.onNext_Artwork.setAnimations([('Conditional', 'effect=fade start=25 end=100 time=240 delay=160 condition=True reversible=False')])
self.onNext_Text.setAnimations([('Conditional', 'effect=fade start=25 end=100 time=240 delay=160 condition=True reversible=False')])
elif self.focusControl != cntrl:
cntrl.setAnimations([('Conditional', 'effect=fade start=100 end=25 time=240 delay=160 condition=True reversible=False')])
else:
Expand All @@ -125,19 +125,19 @@ def move(self, cntrl):
posx, posy = self.focusCNTRLST[cntrl]
if (self.posx != posx or self.posy != posy):
cntrl.setPosition(self.posx, self.posy)
if cntrl == self._onNext_Border:
self._onNext_Artwork.setPosition((self.posx + 5), (self.posy + 5))
self._onNext_Text.setPosition(self.posx, (self.posy + 140))
if cntrl == self.onNext_Border:
self.onNext_Artwork.setPosition((self.posx + 5), (self.posy + 5))
self.onNext_Text.setPosition(self.posx, (self.posy + 140))


def save(self):
changes = {}
for cntrl in self.focusCNTRLST:
posx, posy = cntrl.getX(), cntrl.getY()
if cntrl == self._channelBug:
if cntrl == self.channelBug:
if (posx != self.channelBugX or posy != self.channelBugY):
changes[cntrl] = posx, posy, (posx == self.autoBugX & posy == self.autoBugY)
elif cntrl == self._onNext_Border:
elif cntrl == self.onNext_Border:
if (posx != self.onNextX or posy != self.onNextY):
changes[cntrl] = posx, posy, (posx == self.autoNextX & posy == self.autoNextY)

Expand All @@ -153,7 +153,7 @@ def set(self, cntrl, posx, posy, auto=False):
if self.advRule: save = PROPERTIES.setProperty
else: save = SETTINGS.setSetting

if cntrl == self._channelBug:
if cntrl == self.channelBug:
if auto: save("Channel_Bug_Position_XY",LANGUAGE(30022))
else: save("Channel_Bug_Position_XY","(%s,%s)"%(posx, posy))
elif cntrl == self._onNext:
Expand Down
32 changes: 16 additions & 16 deletions plugin.video.pseudotv.live/resources/lib/rules.py
Original file line number Diff line number Diff line change
Expand Up @@ -541,19 +541,19 @@ def onAction(self, optionindex):
def runAction(self, actionid, citem, parameter, overlay):
if actionid == RULES_ACTION_OVERLAY_OPEN:
self.storedValues[0] = overlay.enableVignette
self.storedValues[1] = overlay._vinImage
self.storedValues[2] = overlay._vinViewMode
self.storedValues[1] = overlay.vinImage
self.storedValues[2] = overlay.vinView

overlay.enableVignette = self.optionValues[0]
overlay._vinImage = self.getImage(self.optionValues[1])
overlay._vinViewMode = {"nonlinearstretch":self.optionValues[5] ,"pixelratio":self.optionValues[4],"verticalshift":self.optionValues[3],"viewmode":"custom","zoom": self.optionValues[2]}
self.log('runAction, setting vignette image = %s\nmode = %s'%(overlay._vinImage,overlay._vinViewMode))
overlay.vinImage = self.getImage(self.optionValues[1])
overlay.vinView = {"nonlinearstretch":self.optionValues[5] ,"pixelratio":self.optionValues[4],"verticalshift":self.optionValues[3],"viewmode":"custom","zoom": self.optionValues[2]}
self.log('runAction, setting vignette image = %s\nmode = %s'%(overlay.vinImage,overlay.vinView))

elif actionid == RULES_ACTION_OVERLAY_CLOSE:
overlay.enableVignette = self.storedValues[0]
overlay._vinImage = self.storedValues[1]
overlay._vinViewMode = self.storedValues[2]
self.log('runAction, restoring vignette image = %s\nmode = %s'%(overlay._vinImage,overlay._vinViewMode))
overlay.vinImage = self.storedValues[1]
overlay.vinView = self.storedValues[2]
self.log('runAction, restoring vignette image = %s\nmode = %s'%(overlay.vinImage,overlay.vinView))


class MST3k(BaseRule):
Expand Down Expand Up @@ -600,25 +600,25 @@ def onAction(self, optionindex):

def runAction(self, actionid, citem, parameter, overlay):
if actionid == RULES_ACTION_OVERLAY_OPEN:
self.storedValues[0] = overlay._vinImage
self.storedValues[0] = overlay.vinImage
self.storedValues[1] = overlay._vinOffsetXY
self.storedValues[2] = overlay._vinZoom

overlay._vinImage = self.setImage(actionid+.1, citem, overlay, MST3K_1)
overlay.vinImage = self.setImage(actionid+.1, citem, overlay, MST3K_1)
overlay._vinOffsetXY = (0,0)
overlay._vinZoom = 1.0
self.log("runAction, setting overlay enabled = %s, image %s @ (%s) X %s"%(overlay.enableVignette, overlay._vinImage, overlay._vinOffsetXY, overlay._vinZoom))
self.log("runAction, setting overlay enabled = %s, image %s @ (%s) X %s"%(overlay.enableVignette, overlay.vinImage, overlay._vinOffsetXY, overlay._vinZoom))

elif actionid == RULES_ACTION_OVERLAY_OPEN+.1:
overlay._vinImage = self.setImage(actionid, citem, overlay, MST3K_2)
overlay._setImage(overlay._vignette,overlay._vinImage)
self.log("runAction, setting overlay enabled = %s, image %s @ (%s) X %s"%(overlay.enableVignette, overlay._vinImage, overlay._vinOffsetXY, overlay._vinZoom))
overlay.vinImage = self.setImage(actionid, citem, overlay, MST3K_2)
overlay._setImage(overlay.vignette,overlay.vinImage)
self.log("runAction, setting overlay enabled = %s, image %s @ (%s) X %s"%(overlay.enableVignette, overlay.vinImage, overlay._vinOffsetXY, overlay._vinZoom))

elif actionid == RULES_ACTION_OVERLAY_CLOSE:
overlay._vinImage = self.storedValues[0]
overlay.vinImage = self.storedValues[0]
overlay._vinOffsetXY = self.storedValues[1]
overlay._vinZoom = self.storedValues[2]
self.log("runAction, restoring overlay enabled = %s, image %s @ (%s) X %s"%(overlay.enableVignette, overlay._vinImage, overlay._vinOffsetXY, overlay._vinZoom))
self.log("runAction, restoring overlay enabled = %s, image %s @ (%s) X %s"%(overlay.enableVignette, overlay.vinImage, overlay._vinOffsetXY, overlay._vinZoom))

if self.threadTimer.is_alive():
if hasattr(thread, 'cancel'): self.threadTimer.cancel()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<aspectratio scalediffuse="true" align="center" aligny="center">scale</aspectratio>
<bordertexture border="5" infill="false" colordiffuse="FF01416b">colors/white.png</bordertexture>
</control>
<control type="image" id="40001">
<control type="image" id="40000">
<description>Background Dynamic</description>
<top>40</top>
<left>360</left>
Expand All @@ -49,7 +49,7 @@
<width>256</width>
<height>256</height>
<texture border="5" fallback="logo.png">logo.png</texture>
<visible>Control.IsVisible(40001)</visible>
<visible>Control.IsVisible(40000)</visible>
<aspectratio scalediffuse="true" align="center" aligny="center">keep</aspectratio>
</control>
<control type="group">
Expand All @@ -67,17 +67,17 @@
<textcolor>dimgray</textcolor>
<height>60</height>
<label>[B]$INFO[System.Time][/B]</label>
<visible>Control.IsVisible(40001)</visible>
<visible>Control.IsVisible(40000)</visible>
</control>
<control type="image">
<height>90</height>
<visible>Control.IsVisible(40001)</visible>
<visible>Control.IsVisible(40000)</visible>
<texture colordiffuse="dimgray">splashtext.png</texture>
<aspectratio scalediffuse="true" align="center" aligny="center">keep</aspectratio>
</control>
</control>
</control>
<control type="group">
<control type="group" id="40001">
<posx>130</posx>
<posy>735</posy>
<width>960/</width>
Expand All @@ -91,7 +91,7 @@
<bordersize>5</bordersize>
<aspectratio scalediffuse="true" align="center" aligny="center">keep</aspectratio>
<bordertexture border="5" infill="false" colordiffuse="FF01416b">colors/white.png</bordertexture>
<visible>Control.IsVisible(40001)</visible>
<visible>Control.IsVisible(40000)</visible>
</control>
<control type="textbox" id="40003">
<height>70</height>
Expand All @@ -104,7 +104,7 @@
<scrolltime>600</scrolltime>
<autoscroll delay="5000" time="1000">false</autoscroll>
<label/>
<visible>Control.IsVisible(40001)</visible>
<visible>Control.IsVisible(40000)</visible>
</control>
</control>
</control>
Expand Down
Binary file not shown.

0 comments on commit deba4fc

Please sign in to comment.