Posts: 2,529
Joined: Apr 2009
Reputation:
8
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.
Posts: 81
Joined: Mar 2012
Reputation:
0
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?
Posts: 17,417
Joined: Aug 2007
Reputation:
590
Hitcher
Team-Kodi Member
Posts: 17,417
From one of the many different ways available from the home screen.
Posts: 81
Joined: Mar 2012
Reputation:
0
2012-06-01, 23:06
(This post was last modified: 2012-06-02, 18:01 by snavaro.)
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.
Posts: 2,529
Joined: Apr 2009
Reputation:
8
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.
Posts: 2,529
Joined: Apr 2009
Reputation:
8
I agree it can be used like that and it is not bad. I see it more as a challenge to fix it,
Posts: 2,529
Joined: Apr 2009
Reputation:
8
I have done some tests and the playCount and percentagePlayed are not updated on return to MyVideoNav.
and isResumable always returns an empty string.
Posts: 2,529
Joined: Apr 2009
Reputation:
8
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.
Posts: 81
Joined: Mar 2012
Reputation:
0
That is good information to know. It would be helpful if those functions worked properly, but that is way over my head.
Posts: 11
Joined: Jun 2012
Reputation:
0
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?