Thread Rating:
  • 0 Vote(s) - 0 Average
Is it possible to do something when a video "stops" or "ends"?
#1
I'd like to prompt the user when a tv show ends or is stopped. Is there a way to create a dialog that appears when "stop" is pressed while a tv show is playing or if the tv show ends?
[Image: sigpic_51354_dedd3c5dac45dcc8f6b4ccc9d9ad3429.png]
To learn more, click here.
Reply
#2
Noone has any ideas? Thats odd.
[Image: sigpic_51354_dedd3c5dac45dcc8f6b4ccc9d9ad3429.png]
To learn more, click here.
Reply
#3
Well my idea is NO at least not without a python script monitoring playback (maybe). but I really didn't want to say No and then look dumb when someone says yes Tongue
Reply
#4
Is there a previous.window() type command, something along those lines? I checked the wiki but I must be phrasing it wrong or it doesnt exist in general. Thought I've seen that type of infolabel before? If yes maybe that would work, being able to show something if previous window was dialogfullscreen?
Image

Check out The Carmichael - A Skin For XBMC

Check out Night - A Skin For XBMC

Check out Unfinished - A Skin For XBMC
Reply
#5
Its
Window.Previous()
and
Window.Next()
but thats not really for stopping I guess maybe a combination of
PHP Code:
Window.Previous(FullScreenVideo) + !Player.HasVideo 
maybe, but its still really hit and miss
Reply
#6
Why don't you put a hidden control in fullscreen video xml that sets a custom skin string or setting and have your control in your myvideonav.xml only visible when the string matches or the setting is on. When the user clicks the button in your dialog make it set the skin string/setting back so the control is no longer visible.
Reply
#7
Got it:

Ok, so I wanted XBMC to prompt me to delete an episode automatically after watching it, so here's the solution.

A button is SkinSettings:


Code:
<control type="radiobutton" id="2003">
          <width>900</width>
        <height>40</height>
        <font>Simplicity_20</font>
        <label>Enable "Delete" Prompt After Watching TV Episodes</label>
        <textcolor>white</textcolor>
        <focusedcolor>white</focusedcolor>
        <radiowidth>83</radiowidth>
        <radioheight>67</radioheight>
        <textureradiofocus>simplicity/settings-radiobutton-on.png</textureradiofocus>
        <textureradionofocus>simplicity/settings-radiobutton-off.png</textureradionofocus>
        <texturefocus border="0,2,0,2">simplicity/button-focus.png</texturefocus>
        <texturenofocus border="0,2,0,2">simplicity/menuitemnf.png</texturenofocus>
        <onclick>Skin.ToggleSetting(DeleteEps)</onclick>
        <selected>Skin.HasSetting(DeleteEps)</selected>
    </control>


Then I added on to the TVTunes Button in MYVideoNav:

Code:
        <control type="button" id="9999">
            <description>trigger</description>
            <include condition="!Skin.HasSetting(UseTvTunes)">No_TV_Tunes</include>
            <include condition="Skin.HasSetting(UseTvTunes)">Use_TV_Tunes</include>
            <include condition="Window.Previous(FullScreenVideo) + !Skin.HasSetting(DeleteEps)">No_Delete_Eps</include>
            <include condition="Window.Previous(FullScreenVideo) + Skin.HasSetting(DeleteEps)">Delete_Eps</include>
            <texturenofocus>-</texturenofocus>
            <texturefocus>-</texturefocus>
        </control>


Finally the Focus conditions in Includes:

Code:
    <include name="No_Delete_Eps">
        <onfocus>SetFocus(50)</onfocus>
    </include>
    <include name="Delete_Eps">
        <visible>Container.Content(Episodes)</visible>
        <onfocus>Delete</onfocus>
        <onfocus>SetFocus(50)</onfocus>
    </include>
[Image: sigpic_51354_dedd3c5dac45dcc8f6b4ccc9d9ad3429.png]
To learn more, click here.
Reply
#8
What happens when someone isn't watching in fullscreen and presses stop? For instance I'm watching a video and decide to go back and look at the episode list while it's playing in the background.
Reply
#9
wannabegt4 Wrote:What happens when someone isn't watching in fullscreen and presses stop? For instance I'm watching a video and decide to go back and look at the episode list while it's playing in the background.

It will ask them if they want to delete. This is a rough way of getting what I wanted, I wish I could say "If episode is 100% finished or Episode is playing and user presses "stop"" Then prompt to delete. But I cant get that exactly, so I use a hack. Sad
[Image: sigpic_51354_dedd3c5dac45dcc8f6b4ccc9d9ad3429.png]
To learn more, click here.
Reply
#10
Couldn't you just add the !Player.HasVideo to the condition that Jezz suggested that way it won't come up until stop is pressed. Also, What if the previous window isn't full screen video like I went to the home menu and pressed stop? Would you still get your dialog? Would you still want it to be available throughout the skin? That's the only reason I had thought about using the custom skin setting in the hidden control.

EDIT: You know; I'm probably over complicating things. I'm sure it's fine the way you have it now.
Reply
#11
wannabegt4 Wrote:Couldn't you just add the !Player.HasVideo to the condition that Jezz suggested that way it won't come up until stop is pressed. Also, What if the previous window isn't full screen video like I went to the home menu and pressed stop? Would you still get your dialog? Would you still want it to be available throughout the skin? That's the only reason I had thought about using the custom skin setting in the hidden control.

EDIT: You know; I'm probably over complicating things. I'm sure it's fine the way you have it now.

I added !Player.HasVideo, thanks for pointing it out. That solved that problem. Good to go now.
[Image: sigpic_51354_dedd3c5dac45dcc8f6b4ccc9d9ad3429.png]
To learn more, click here.
Reply
#12
hello,
I am trying to implement this in confluence.

I am not a skinner, but I have made a few add-on skins and sometimes pretty good with code.

I take it the 9999 button is pre-existing in simplicity? It is not in confluence. I guess that means I have to forget the quick fix?
The tv tunes are loaded in onload.

Is there any way you could explain a bit more detail?
I guess the 9999 button is triggering one of the two actions added to include? Somehow it does not bite and I do not know how to debug a skin.
Reply
#13
You should be able to do it this way -

PHP Code:
<onload condition="Container.Content(Episodes) + Window.Previous(FullScreenVideo) + Skin.HasSetting(DeleteEps)">Delete</onload>
<
onload condition="Container.Content(Episodes) + Window.Previous(FullScreenVideo) + Skin.HasSetting(DeleteEps)">SetFocus(50)</onload
Reply
#14
(2011-04-05, 06:07)igotdvds Wrote:
wannabegt4 Wrote:What happens when someone isn't watching in fullscreen and presses stop? For instance I'm watching a video and decide to go back and look at the episode list while it's playing in the background.

It will ask them if they want to delete. This is a rough way of getting what I wanted, I wish I could say "If episode is 100% finished or Episode is playing and user presses "stop"" Then prompt to delete. But I cant get that exactly, so I use a hack. Sad

perhaps with
Code:
IntegerGreaterThan(ListItem.PercentPlayed,95)
?
Donate: https://kodi.tv/contribute/donate (foundation), 146Gr48FqHM7TPB9q33HHv6uWpgQqdz1yk (BTC personal)
Estuary: Kodis new default skin - ExtendedInfo Script - KodiDevKit
Reply
#15
Yes, that is easier to understand. Thank you.
I couldn't get the trigger button to fire regardless of condition.

EDIT: Lost half the words...
However, this is true also if stopping before the end of the video and the adjustment from above does not work. Perhaps it only worked in dharma?

Code:
<onload condition="Container.Content(Episodes) + Window.Previous(FullScreenVideo)  + !Player.HasVideo + Skin.HasSetting(DeleteEps)">Delete</onload>
    <onload condition="Container.Content(Episodes) + Window.Previous(FullScreenVideo)  + !Player.HasVideo + Skin.HasSetting(DeleteEps)">SetFocus(50)</onload>
Reply
 
Thread Rating:
  • 0 Vote(s) - 0 Average



Logout Mark Read Team Forum Stats Members Help
Is it possible to do something when a video "stops" or "ends"?00