diff options
| -rw-r--r-- | AirPlayService.py | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/AirPlayService.py b/AirPlayService.py index 5525712..be3eeb0 100644 --- a/AirPlayService.py +++ b/AirPlayService.py | |||
| @@ -119,6 +119,26 @@ class AirPlayProtocolHandler(asyncore.dispatcher_with_send): | |||
| 119 | elif (request.type == 'PUT' and request.uri.find('/photo')>-1): | 119 | elif (request.type == 'PUT' and request.uri.find('/photo')>-1): |
| 120 | self.photo(request.body, request.headers['X-Apple-Transition']) | 120 | self.photo(request.body, request.headers['X-Apple-Transition']) |
| 121 | answer = self.create_request() | 121 | answer = self.create_request() |
| 122 | elif (request.type == 'GET' and request.uri.find('/server-info')>-1): | ||
| 123 | self.server_info() | ||
| 124 | content = '<?xml version="1.0" encoding="UTF-8"?>\ | ||
| 125 | <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">\ | ||
| 126 | <plist version="1.0">\ | ||
| 127 | <dict>\ | ||
| 128 | <key>deviceid</key>\ | ||
| 129 | <string>%s</string>\ | ||
| 130 | <key>features</key>\ | ||
| 131 | <integer>%d</integer>\ | ||
| 132 | <key>model</key>\ | ||
| 133 | <string>%s</string>\ | ||
| 134 | <key>protovers</key>\ | ||
| 135 | <string>1.0</string>\ | ||
| 136 | <key>srcvers</key>\ | ||
| 137 | <string>101.10</string>\ | ||
| 138 | </dict>\ | ||
| 139 | </plist>' | ||
| 140 | content = content % (self.service.deviceid, self.service.features, self.service.model) | ||
| 141 | answer = self.create_request(200, "Content-Type: text/x-apple-plist+xml", content) | ||
| 122 | else: | 142 | else: |
| 123 | print "ERROR: AirPlay - Unable to handle request \"%s\"" % (request.uri) | 143 | print "ERROR: AirPlay - Unable to handle request \"%s\"" % (request.uri) |
| 124 | answer = self.create_request(404) | 144 | answer = self.create_request(404) |
