diff --git a/gen_certs/gen_certs.sh b/gen_certs/gen_certs.sh index a94c258..dd80d4a 100755 --- a/gen_certs/gen_certs.sh +++ b/gen_certs/gen_certs.sh @@ -27,11 +27,11 @@ fi cd $script_dir # Feel free to change any of these defaults -commonName="SiriProxyCA" +commonName="SiriServer" countryName="US" stateOrProvinceName="Missouri" localityName="" -organizationName="Siri Proxy" +organizationName="Siri Server" organizationalUnitName="" emailAddress="" diff --git a/plugins/XBMC.py b/plugins/XBMC.py index 115d90a..cc0db51 100644 --- a/plugins/XBMC.py +++ b/plugins/XBMC.py @@ -50,7 +50,7 @@ def addPictureView(self,title,image_url): view1 = AnswerSnippet(answers=[ImageAnswer]) view.views = [view1] self.sendRequestWithoutAnswer(view) - + global xbmc xbmc = XBMC_object() @@ -72,6 +72,31 @@ def test2(self, speech, language): json.Player.PlayPause(playerid=1) except: self.say('Nothing to play/pause') + elif command == 'update library' or command == 'scan': + json.VideoLibrary.Scan() + elif command == 'clean library': + json.VideoLibrary.Clean() + elif command == 'latest movies': + recentMovies = json.VideoLibrary.GetRecentlyAddedMovies(properties=['playcount'])['movies'] + movieList = '' + for movie in recentMovies: + if movie['playcount'] > 0: + watched = 'Watched: Yes' + else: + watched = 'Watched: No' + movieList = movieList + movie['label'] + '\n' + watched + '\n\n' + self.say(movieList, "Here you go:") + elif command == 'latest episodes': + recentEpisodes = json.VideoLibrary.GetRecentlyAddedEpisodes(properties=['showtitle','season','episode','playcount'])['episodes'] + episodeList = '' + for episode in recentEpisodes: + ep = '%s\nS%02dE%02d: %s\n' % (episode['showtitle'],episode['season'],episode['episode'],episode['label']) + if episode['playcount'] > 0: + watched = 'Watched: Yes' + else: + watched = 'Watched: No' + episodeList = episodeList + ep + watched + '\n\n' + self.say(episodeList, "Here you go:") elif 'play trailer of' in command or 'play trailer for' in command or 'play trailer 4' in command: if 'play trailer of' in command: title = command.replace('play trailer of ','') diff --git a/siriObjects/systemObjects.py b/siriObjects/systemObjects.py index 5b222da..0c28e0a 100644 --- a/siriObjects/systemObjects.py +++ b/siriObjects/systemObjects.py @@ -282,7 +282,7 @@ class Location(DomainObject): AccuracyKilometerValue = "Kilometer" AccuracyThreeKilometersValue = "ThreeKilometers" def __init__(self, label="", street="", city="", stateCode="", countryCode="", postalCode="", latitude=0, longitude=0, accuracy=0, group="com.apple.ace.system", clazz="Location"): - super(Location, self).__init__(group, clazz) + super(Location, self).__init__(group, None, clazz) self.label = label self.street = street self.city = city