2015-07-24, 12:52
This add-on works great on my Pi1 but after installing on Pi2 (OSMC) it doesn't run bash scripts.
Any suggestions please?
Thanks.
Any suggestions please?
Thanks.
(2015-07-25, 14:31)raspdealer Wrote: The database update event is launch at start or finish ?
(2015-07-25, 19:53)MKANET Wrote: KenV99, thanks again for the great addon. Im attempting to manually start the TrakTV addon Rating dialog after media playback has stopped. I know where the python script is that should be executed:
C:\Users\MKANET\AppData\Roaming\Kodi\addons\script.trakt-master\rating.py
..however, I'm sure what to put in the XMBC.Callbacks2 parameters field. I would appreciate any help or tips you could offer.
(2015-07-25, 14:31)raspdealer Wrote: The database update event is launch at start or finish ?
(2015-07-26, 17:32)bks84 Wrote: Hi, I tried to install the add-on on my RPI 2 (Kodi 14.2) by using the zip file but it is missing dependencies. I also tried to install it by uploading the contents of the zip into the \Userdata\addon_data\ directory but the add-on is not listed anywhere.
(2015-07-26, 00:30)KenV99 Wrote: I don't have the trakt.tv addon installed but looking at the code on github, I noted the following:
1) rating.py is a module that is imported by other modules and does not have any code that executes
2) the addon runs as a service and there is substantial infrastructure that needs to be loaded before being able to provide a rating
3) there is no simple way for an external script to call code in another script (this is true of all addons)
4) the addon already implements events for Player.OnPlaybackStopped
So, in short, you cannot do what you are trying to do using XBMC.Callbacks2.
import xbmc
import urllib2
import datetime
DAY, NIGHT = 1, 2
def check_time(time_to_check, on_time, off_time):
if on_time > off_time:
if time_to_check > on_time or time_to_check < off_time:
return NIGHT, True
elif on_time > off_time:
if time_to_check > on_time and time_to_check < off_time:
return DAY, True
elif time_to_check == on_time:
return None, True
return None, False
on_time = datetime.time(18,00)
off_time = datetime.time(04,00)
timenow = datetime.datetime.now().time()
current_time = datetime.datetime.now().time()
when, matching = check_time(current_time, on_time, off_time)
if matching:
if when == NIGHT:
if 'movie' in sys.argv[1]:
urllib2.urlopen('insert lighting url here')
if 'episode' in sys.argv[1]:
urllib2.urlopen('insert lighting url here')
urllib2.urlopen('insert lighting url here')
(2015-07-24, 14:11)KenV99 Wrote: This, almost always, is a permissions issue.
But as has been mentioned OVER AND OVER on the forums, if you don't post your kodi.log to pastebin and put a link, it's pretty much impossible to provide useful help.