Posts: 306
Joined: Feb 2012
Reputation:
1
I tried this script and it does work as advertised thank you.
I have a suggestion however for the launch at start up, or maybe it is already possible some other way.....
Is there any way one can delay the availability (not launch) of xbmc/kodi until the start up script has completed? If not can this be implemented into this script? I am using this to sync files from a web server and need to delay the availability of using xbmc until the script has completed. I have to prevent add ons from being run till this is done
Posts: 306
Joined: Feb 2012
Reputation:
1
Actually, I ended up doing this somewhat differently than I wanted to and thought I would post that result here.
Instead of making xbmc "unavailable" like muting video or something of the like I used xbmc callbacks and my script now includes a message to xbmc-eventclients that says "Please Wait, Downloading..." then after the script is run it sends "Download complete, Ready."
Works quite well however I wish that the kodi devs would finally reduce the volume of alerts or the recordings they play back The sounds are quite sharp and loud compared to average Movie or TV volume. I have seen these alerts complained about before. yes I have lowered the volume in the recordings before but they get overwritten on an upgrade
Thanks
Posts: 265
Joined: Sep 2008
Reputation:
2
2015-01-04, 18:21
(This post was last modified: 2015-01-04, 18:22 by bigbadrabbit.)
Nevermind. Found a way to execute the applescript within Python.
Any chance there'll be a "Kodi Quit/Exit" option instead of shutdown?
Posts: 128
Joined: Feb 2014
Reputation:
0
2015-01-23, 04:20
(This post was last modified: 2015-02-02, 18:51 by ReplayHarry.)
I saw this service addon script and it gave me a great idea. It works well triggering the starts of video and stops, which is what I wanted.
I'm running Gotham 13.2 on a win 8.1 system with nextpvr doing my recording for me.
I am trying to make viewing videos similar to my REPLAY TV (some people may remember these and my wife is still using one of ours). With Replay TV, when a video ends or you stop it, it gives you 3 options, "Resume playback", "Delete the video", or "Play another Video". By default I have the "Play another video" working as that would be where Kodi would return anyway, and I don't think I will have any problem with the delete. That is ordinary stuff.
I am of course using Python to try to do these things, and while not a Python expert, I am getting better with it. I've already made a couple of handy little tools for Kodi.
But... the resume is another story for me and maybe someone could point me in the right direction as my searches on this forum and elsewhere have not found a solution. When I "START" a video (I'm watching in file mode so I can skip the commercials via COMSKIP), the trigger records all the pertinent info available with the addon (file name, the trigger, etc, etc) and writes that to a file for later use. I then use that file when "STOP" is triggered as the addon does not provide the filename there. But when I execute a xbmc.player.play(), it always starts at the beginning of the video, not in the place it left off. I do have XBMC video settings set to "Resume" and that works fine when playing or resuming a video normally.
I am assuming Kodi has a bookmark someplace saying where the video left off as it knows when you start a video. So I need to know where that is and how to get it so I could use it in my Python script. There does not seem to be a player.resume() function to execute and I'd like to build one for my function. I know the player.play() function has a field indicating where to start. So if I could retrieve that info from "who knows where" I should be able to plug it in and do exactly what I want. I'd also like to find where the "WATCHED" or "UNWATCHED" field is as ideally I'd only like to trigger my delete function when the show is watched.
I'm doing all my development on my desktop PC so Kodi remains stable and usable for my normal needs.
Anyone have any ideas? I would greatly appreciate it. It might help me finally get my wife to give up her ReplayTVs.
Thanks in advance for any assistance that may be given.
------- OK, I found a fix
jsonrpc. From there I can send a play "resume".
{"jsonrpc": "2.0",
"id": 1,
"method": "Player.Open",
"params": {"item": {"file":my_file},
"options": {"resume": True
I wanted to use the "executejsonrpc" from within the XBMC Python transport. Never could get it to work. After much research, trial and error, and frustration I went to the HTTP jsonrpc transport, and got it to work. Not a lot of examples out on the web to help, but the ones I did find, finally gave me enough help to make it work.
So now when a show stops (set it up to only do my thing if a TV Show) I have the 3 options mentioned above. And when I select "delete" it deletes the show file along with the other edl and txt files created by COMSKIP. If the directory is now empty, it deletes the directory too.
Maybe someone else will be helped by this.
Posts: 25
Joined: Feb 2014
Reputation:
0
This looks like it could be perfect for my implementation of XBMC.MyLibrary, however I can't get it to activate correctly quite yet.
Is there any way to get this to run from the C:\? I think that's why it's not finding the JAR file that my script points to - and I freely admit that I'm pretty inexperienced when it comes to the command line.
This happens both when using .5 and 2.