Is it possible to do something when a video "stops" or "ends"?
#31
(2012-05-31, 23:22)Big_Noid Wrote:
(2012-05-31, 23:07)Hitcher Wrote:
(2012-05-31, 22:37)Big_Noid Wrote: I would never use Container.Content with an onload condition as its only checked on window load

Which is what happens when you stop playing an episode. Wink

Not very reliable imo, you could quit fullscreen when playing an episode and browse your movies, go to home screen, whatever and when exiting, the container.content is not the same as the videoplayer content.

And the original solution wouldn't work in those conditions either as it's also reliant on the user playing the episode from the video library at episode level and not leaving it.
Reply
#32
So is there a valid solution or it needs core changes to provide the events?

Would it help to add parameters and script calls on the fullscreen onunload ? Is that the place to hook it up?
I could test with an addon call from the unload and see where it ends up.
Reply
#33
Is there another way to view a movie.. other than selecting it at episode level? it seems to me that this is how most people would activate the movie or show. And of course it is possible to minimize the view screen and do other things, but ultimately to stop the show one has to return the focus to that screen or the OSD screen, ne c'est pas?
Reply
#34
From one of the many different ways available from the home screen.
Reply
#35
(2012-06-01, 15:51)Hitcher Wrote: From one of the many different ways available from the home screen.

You mean for example, by selecting a movie or episode from the "recently added" list? I guess my big question is why, when stopping a video, it automatically returns to the MyVideoNav screen, rather than the DialogVideoInfo screen. Ultimately, this is what I would like to change. This would then mirror what happens in Netflix or Tivo (and perhaps others) when stopping a show. It leaves the focus on that particular video, and the Delete decision can be made from there, where it is obvious what one is deleting. However, I cannot find what file controls this behaviour (return to MyVideoNav) currently. Or is it baked into the hard coding?
Reply
#36
OK. I finally borrowed from a MOD to the Refocus skin to make this work in Confluence, at least for TV shows.
Here is what I did:
In MyVideoNav add the following after line 5:
<onload condition="Window.Previous(FullScreenVideo) + Skin.HasSetting(DeleteEps)">Delete</onload>

In Custom Settings_1111, add the following in the general area after line 294:
<!--deleteafterwatching-->
<control type="radiobutton" id="2003">
<width>750</width>
<height>40</height>
<font>font13</font>
<textcolor>grey2</textcolor>
<focusedcolor>white</focusedcolor>
<texturefocus>MenuItemFO.png</texturefocus>
<texturenofocus>MenuItemNF.png</texturenofocus>
<label>Enable DELETE After Watching TV Episodes</label>
<onclick>Skin.ToggleSetting(DeleteEps)</onclick>
<selected>Skin.HasSetting(DeleteEps)</selected>
<include>button_Settings</include>
</control>
Make a backup then save these files in the 720p folder. Restart XBMC, go to Settings/Skin/TV Shows and select the option to Delete TV show after watching. Then, whenever the Stop button is pressed, a Yes No Dialog will ask if you want to delete the show. Simple and Straightforward.

UPDATE: The YesNo Delete dialog also appears for movies when the Stop button is pressed. However, XBMC hangs after OK' ing Delete and I have to force a shutdown. I cannot seem to find the issue after reviewing the debug log. I would also like to see an automatic Library clean after the Delete process is completed.
Reply
#37
well, that is what we already sorted out yesterday if you read from Hitchers first post and down. The only difference is that you do not check that content is episodes.

What is not working is:
1) Do not prompt if stopped before the end
2) Be sure to delete the the file actually watched not random line that has focused.

If 1) is sorted 2) is not that bad... I was planning to add a check on lastplayed. If it is watched and just played..it is pretty likely the file we are after.

My guess is that the problem is that ListItem i not updated in onload which would make sense.
Reply
#38
I really don't mind the YesNo Delete? Dialog coming up even if I have watched 10 minutes of the show. Often, my wife says "Enuff of this..get rid of it!" 5 minutes into a show. Of course, I obey Big Grin

As to the 2nd item, the Yes/No dialog actually provides the show title that would be deleted in the dialog box.
Reply
#39
I agree it can be used like that and it is not bad. I see it more as a challenge to fix it,
Reply
#40
I have done some tests and the playCount and percentagePlayed are not updated on return to MyVideoNav.
and isResumable always returns an empty string.
Reply
#41
(2012-06-02, 06:35)vikjon0 Wrote: I have done some tests and the playCount and percentagePlayed are not updated on return to MyVideoNav.
and isResumable always returns an empty string.

Indeed there is currently a issue with it even in the latest git source where they only get updated on a list contents refresh which doesn't happen because the dir gets cached 99.8% of the time so its a far from reliable method to use nd its even worse in the files node where it randomly changes other files watched status
Reply
#42
Thanks Jezz_X, I was this very minute pulling my hair out because for the moment it is working perfectly.
Would Container.Refresh help at all? If so, any idea how I can get it to cache again so I can test? (I have tested 25 times)

It is also worth noting that percentagePlayed perhaps goes from 0-100 as stated, but it also return to 0 when done.

Reply
#43
That is good information to know. It would be helpful if those functions worked properly, but that is way over my head.
Reply
#44
EDIT: was wrong, sorry.
Donate: https://kodi.tv/contribute/donate (foundation), 146Gr48FqHM7TPB9q33HHv6uWpgQqdz1yk (BTC personal)
Estuary: Kodis new default skin - ExtendedInfo Script - KodiDevKit
Reply
#45
Hi. Has anyone managed to get this working yet?
I tried Snavaro`s code and all it did was to lock up!
Could not a separate script be made that could give you the delete option after you press stop?
Reply

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