Add API version to CP calls

This commit is contained in:
Ruud
2012-09-14 12:44:26 +02:00
parent 45bb88460c
commit de6d686fe5

View File

@@ -29,7 +29,10 @@ class CouchPotatoApi(MovieProvider):
if identifier is None: return {}
try:
headers = {'X-CP-Version': fireEvent('app.version', single = True)}
headers = {
'X-CP-Version': fireEvent('app.version', single = True),
'X-CP-API': 1,
}
data = self.urlopen((self.api_url % ('eta')) + (identifier + '/'), headers = headers)
dates = json.loads(data)
log.debug('Found ETA for %s: %s', (identifier, dates))