CinemaVision / script.cinemavision

The core CinemaVision add-on for Kodi.
http://www.cinemavision.tv/
Other
9 stars 16 forks source link

Issues displaying message via Action #121

Open CinemaVision opened 6 years ago

CinemaVision commented 6 years ago

Thread

Appears that this is not a skin issue, possible Kodi bug?

ruuk commented 6 years ago

On second look, perhaps the line should look like below, I don't think the : character is safe in a URL:

#Fade In: We´ll take a short break
http://192.168.188.21:8080/jsonrpc?request=%7B%22jsonrpc%22%3A%222.0%22%2C%22method%22%3A%22GUI.ShowNotification%22%2C%22params%22%3A%7B%22title%22%3A%22Short%20Break%21%22%2C%22message%22%3A%22We%20are%20back%20in%2010%20Minutes%22%7D%2C%22id%22%3A1%7D
ruuk commented 6 years ago

Scratch that. Using python on the command line, it works either way.

ruuk commented 6 years ago

OK, I played around with this, and was able to duplicate the issue. It IS a skin issue. Estuary does not show notifications during the video when CV is playing. But if I play a movie without using CV, I can trigger a message from the browser and via Python. If CV is playing neither the action, nor Python command line, nor the browser works.

I suspect the user was testing the browser on the movie when it was not launched from CV.

ruuk commented 6 years ago

Estuary: DialogNotification.xml (Note the visible condition for CV)

<?xml version="1.0" encoding="UTF-8"?>
<window>
    <zorder>3</zorder>
    <controls>
        <control type="group">
            <depth>DepthMax</depth>
            <top>85</top>
            <right>0</right>
            <width>640</width>
            <include>OpenClose_Right</include>
            <visible>String.IsEmpty(Window(Home).Property(script.cinemavision.running))</visible>
            <control type="image">
                <left>0</left>
                <top>0</top>
                <width>640</width>
                <height>160</height>
                <texture>dialogs/dialog-bg-nobo.png</texture>
                <bordertexture border="21">overlays/shadow.png</bordertexture>
                <bordersize>20</bordersize>
            </control>
            <control type="image" id="400">
                <description>avatar</description>
                <left>25</left>
                <top>25</top>
                <width>110</width>
                <height>110</height>
                <aspectratio>stretch</aspectratio>
            </control>
            <control type="fadelabel" id="401">
                <description>Line 1 Label</description>
                <left>150</left>
                <top>40</top>
                <width>450</width>
                <height>18</height>
                <font>font37</font>
                <aligny>center</aligny>
                <scrollout>false</scrollout>
                <pauseatend>2000</pauseatend>
            </control>
            <control type="textbox" id="402">
                <description>Line 2 Label</description>
                <left>151</left>
                <top>68</top>
                <width>450</width>
                <height>60</height>
                <font>font27_narrow</font>
                <aligny>center</aligny>
            </control>
        </control>
    </controls>
</window>
ruuk commented 6 years ago

Aeon Nox: DialogNotification.xml


<?xml version="1.0" encoding="UTF-8"?>
<window>
    <coordinates>
        <left>560</left>
        <top>33</top>
        <origin x="880" y="33">String.IsEqual(Skin.AspectRatio,21:9)</origin>
    </coordinates>
    <include>DialogPopupAnimation</include>
    <controls>
        <control type="group">
            <visible>String.IsEmpty(Window(Home).Property(script.cinemavision.running))</visible>
            <control type="image">
                <description>background image</description>
                <width>800</width>
                <height>166</height>
                <texture border="20">dialogs/default/bg2.png</texture>
            </control>
            <control type="image" id="400">
                <description>avatar</description>
                <left>30</left>
                <top>34</top>
                <width>100</width>
                <height>100</height>
                <bordertexture border="1,1,2,1">thumbs/panel_border3.png</bordertexture>
                <bordersize>1,1,2,1</bordersize>
                <aspectratio>keep</aspectratio>
            </control>
            <control type="fadelabel" id="401">
                <description>Line 1 Label</description>
                <left>140</left>
                <top>34</top>
                <width>606</width>
                <height>50</height>
                <font>font15_title</font>
                <textoffsetx>15</textoffsetx>
                <textcolor>themecolor</textcolor>
                <scrollout>false</scrollout>
                <pauseatend>2000</pauseatend>
            </control>
            <control type="fadelabel" id="402">
                <description>Line 2 Label</description>
                <left>140</left>
                <top>84</top>
                <width>606</width>
                <height>30</height>
                <font>font15</font>
                <textoffsetx>15</textoffsetx>
                <textcolor>grey2</textcolor>
                <scrollout>false</scrollout>
                <pauseatend>2000</pauseatend>
            </control>
        </control>
    </controls>
</window>
'''
ruuk commented 6 years ago

Leaving this open and moving to Review QA. @CinemaVision: Feel free to close when you've updated the thread with this info.

ruuk commented 6 years ago

Workaround for user

Create a file called unset_cv_running.py with the below contets and place it somewhere on the same device Kodi is running on.

import xbmcgui

def main(*args):
    if len(args) < 1:
    val = ''
    else:
    val = args[0]

    xbmcgui.Window(10000).setProperty('script.cinemavision.running', '')

Add this line to the action file before the line displaying the message:

module:///path/to/unset_cv_running.py

and to disable notifications and busy spinner again:

module:///path/to/unset_cv_running.py
1
CinemaVision commented 6 years ago

Verified working. Leaving open until the fix is put in a Guide on the website.