This repository has been archived by the owner on Feb 9, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #40 from metabrainz/update-deps
Update deps
- Loading branch information
Showing
3 changed files
with
32 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
from libsonic import Connection | ||
|
||
|
||
class FixedConnection(Connection): | ||
""" | ||
This hack enables album ids to strings -- a PR has been submitted, but in case | ||
it doesn't get accepted in a timely manner, this workaround allows us to | ||
continue. | ||
""" | ||
|
||
def getAlbumInfo2(self, aid): | ||
""" | ||
since 1.14.0 | ||
Same as getAlbumInfo, but uses ID3 tags | ||
aid:int The album ID | ||
""" | ||
methodName = 'getAlbumInfo2' | ||
viewName = '%s.view' % methodName | ||
|
||
# The release version has an int() cast here | ||
q = {'id': aid} | ||
req = self._getRequest(viewName, q) | ||
res = self._doInfoReq(req) | ||
self._checkStatus(res) | ||
return res |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters