Skip to content

Commit

Permalink
Merge branch 'master' of github.com:Eichhoernchen/SiriServer
Browse files Browse the repository at this point in the history
  • Loading branch information
Eichhoernchen authored and Eichhoernchen committed Feb 15, 2012
2 parents 8936418 + 79b10c8 commit 9d8d8e7
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 4 deletions.
4 changes: 2 additions & 2 deletions gen_certs/gen_certs.sh
Expand Up @@ -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=""

Expand Down
27 changes: 26 additions & 1 deletion plugins/XBMC.py
Expand Up @@ -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()

Expand All @@ -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 ','')
Expand Down
2 changes: 1 addition & 1 deletion siriObjects/systemObjects.py
Expand Up @@ -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
Expand Down

0 comments on commit 9d8d8e7

Please sign in to comment.