Is it possible to do something when a video "stops" or "ends"?

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
datalore44 Offline
Junior Member
Posts: 9
Joined: Jun 2012
Reputation: 0
Post: #51
Ok, I am getting there, but
I cannot find the word "Refresh" or "Label 184" in my strings.xml?
I assume I create the deletefile.py by copying your code from you earlier post #46, pasting it into notepad++ and saving it as a python script?
Slightly confused by this comment:
You can either comment out the Refresh button control so it does not appear or leave it on, your choice. Put the Delete button control code directly after the Refresh button control or in place of it.
Not quite sure where the Refresh button control code is?
I have pasted it here:

<control type="togglebutton" id="8">
<description>Play/browse to Show</description>
<include>ButtonInfoDialogsCommonValues</include>
<label>208</label>
<alttexturefocus border="2">button-focus.png</alttexturefocus>
<alttexturenofocus border="2">button-nofocus.png</alttexturenofocus>
<altlabel>1024</altlabel>
<usealttexture>Container.Content(TVShows)</usealttexture>
</control>
<control type="button" id="7"><!--new button control to Delete program-->
<description>Delete</description>
<include>ButtonInfoDialogsCommonValues</include>
<label>184</label><!--label changed to read "Delete" in strings.xml file--->
<onclick>xbmc.RunScript(special://skin/scripts/deletefile.py)</onclick>
<visible>Skin.HasSetting(DeleteEps)</visible> <!--button is visible only through Settings-->
</control>
(This post was last modified: 2012-06-20 01:41 by datalore44.)
find quote
snavaro Offline
Member
Posts: 81
Joined: Mar 2012
Reputation: 0
Post: #52
OK. To comment out a line in xml, just begin with this <!-- and end with this --> If you do this in Notepad ++ everything in between will turn green and be ignored.

You are correct about saving my code in #46 as deletefile.py in Notepad++.

Here is the Refresh button control code:
<control type="button" id="6">
<description>Refresh</description>
<include>ButtonInfoDialogsCommonValues</include>
<label>184</label>
</control>
Find that ( it should be below the control id=8 code). Delete it or comment out using <!-- before the word <control> and --< after the word </control>.

I am sorry, I gave you the wrong directory for the strings file (there are actually 3 strings files). Look in Program Files/XBMC/language/English). This is the strings file that is independent of the skin being used.
Good luck!
(This post was last modified: 2012-06-20 02:49 by snavaro.)
find quote
datalore44 Offline
Junior Member
Posts: 9
Joined: Jun 2012
Reputation: 0
Post: #53
I have tried your code but it does not do anything when I press "stop" (keyboard x). I have checked all the info you have sent me and it appears to be in the right place. The enable delete button is in the skin setting.
I am able to delete it using the information panel (Keyboard i) which has replaced the refresh option.
After it deletes the file it goes through a library cleanup, which I assume you have intended it to do to remove it from the library database.
I am not sure that the deletefile.py is being activated though. Unless I have not created the file properly.

On a different subject, have you heard of voxcommander? It is supposed to be very good voice activation software and can control XBMC very well from what I have seen on You Tube. I am taking a look at it because it can be voice controlled via a mobile phone over wifi using skype.
find quote
datalore44 Offline
Junior Member
Posts: 9
Joined: Jun 2012
Reputation: 0
Post: #54
Snavaro, Are you still there?
find quote
snavaro Offline
Member
Posts: 81
Joined: Mar 2012
Reputation: 0
Post: #55
Sorry.. I had some personal matters to attend to. My code was designed to work using the Video OSD Stop button. I am sure there is a way to trap your keystroke and run the script, but I am no expert. let me check it out and see what I can find, or maybe someone else can chip in.
find quote
datalore44 Offline
Junior Member
Posts: 9
Joined: Jun 2012
Reputation: 0
Post: #56
I tried the osd stop button and that did not do anything either?
find quote
Post Reply