mirror of
https://github.com/spl0k/supysonic.git
synced 2024-12-22 17:06:17 +00:00
parent
6f9da086f0
commit
7a060c9186
@ -27,7 +27,7 @@ or as a WSGI application (on Apache for instance). But first:
|
||||
* [SQLAlchemy](http://www.sqlalchemy.org/) (`apt-get install python-sqlalchemy`)
|
||||
* Python Imaging Library (`apt-get install python-imaging`)
|
||||
* simplejson (`apt-get install python-simplejson`)
|
||||
* [requests](http://docs.python-requests.org/) >= 0.12.1 (`pip install requests`)
|
||||
* [requests](http://docs.python-requests.org/) >= 1.0.0 (`pip install requests`)
|
||||
* [mutagen](https://code.google.com/p/mutagen/) (`apt-get install python-mutagen`)
|
||||
|
||||
### Configuration
|
||||
|
@ -89,11 +89,12 @@ class LastFm:
|
||||
else:
|
||||
r = requests.get('http://ws.audioscrobbler.com/2.0/', params = kwargs)
|
||||
|
||||
if 'error' in r.json:
|
||||
if r.json['error'] in (9, '9'):
|
||||
json = r.json()
|
||||
if 'error' in json:
|
||||
if json['error'] in (9, '9'):
|
||||
self.__user.lastfm_status = False
|
||||
session.commit()
|
||||
self.__logger.warn('LastFM error %i: %s' % (r.json['error'], r.json['message']))
|
||||
self.__logger.warn('LastFM error %i: %s' % (json['error'], json['message']))
|
||||
|
||||
return r.json
|
||||
return json
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user