Compare commits

...
Author SHA1 Message Date
rembo10 517d0eb327 Merge branch 'develop' 2022-02-01 20:11:24 +05:30
rembo10 2bacd5a0fc Merge branch 'https' into develop 2022-01-23 14:23:42 +05:30
rembo10 5a559c526d http -> https for album art with small refactor 2022-01-23 14:23:27 +05:30
rembo10 095cee9368 http -> https for internet calls 2022-01-23 14:08:36 +05:30
rembo10 79cb133d1d Remove non-ascii chars in nzb folder name 2022-01-22 08:34:47 +05:30
rembo10 3a9b749017 Merge branch 'develop' 2022-01-22 08:11:01 +05:30
rembo10 0182be2f27 Merge pull request #3284 from hypsometric/py3
Fixes for Python 3.10
2022-01-22 08:01:58 +05:30
hypsometric b6388f7daa Fixes for Python 3.10
- deluge: b64encode returns bytes, transform into string before
  serializing to JSON.
- deluge: no more need to try different encodings for the torrent
  filename or the base64-encoded content, should all be unicode strings
  with Python 3
- collections.abc: Iterable, Mapping, MutableMapping, MutableSequence
  moved from collections to collections.abc since Python 3.3
- pygazelle: html.parser.HTMLParser().unescape() moved to
  html.unescape() in Python 3.4
2022-01-19 18:21:16 +01:00
rembo10 b3199605be v0.5.20 2021-10-15 09:56:59 +05:30
AdeHub 58edc604b3 Merge branch 'develop' 2021-07-08 19:57:08 +12:00
AdeHub 379fd3d0b8 Merge branch 'develop' 2020-10-17 11:06:38 +13:00
AdeHub bf74f57535 Merge branch 'develop' 2020-05-28 10:49:51 +12:00
AdeHub f18334d87c Merge branch 'develop' 2020-03-07 10:30:57 +13:00
AdeHub 5283b48736 Merge branch 'develop' 2019-09-08 17:38:17 +12:00
Ade dc22bb006d Hotfix index creation from develop
Fixes #3175
2019-01-08 21:09:41 +13:00
16 changed files with 65 additions and 81 deletions
+15 -8
View File
@@ -28,7 +28,7 @@ def getAlbumArt(albumid):
# CAA # CAA
logger.info("Searching for artwork at CAA") logger.info("Searching for artwork at CAA")
artwork_path = 'http://coverartarchive.org/release-group/%s/front' % albumid artwork_path = 'https://coverartarchive.org/release-group/%s/front' % albumid
artwork = getartwork(artwork_path) artwork = getartwork(artwork_path)
if artwork: if artwork:
logger.info("Artwork found at CAA") logger.info("Artwork found at CAA")
@@ -41,7 +41,7 @@ def getAlbumArt(albumid):
'SELECT ArtistName, AlbumTitle, ReleaseID, AlbumASIN FROM albums WHERE AlbumID=?', 'SELECT ArtistName, AlbumTitle, ReleaseID, AlbumASIN FROM albums WHERE AlbumID=?',
[albumid]).fetchone() [albumid]).fetchone()
if dbalbum['AlbumASIN']: if dbalbum['AlbumASIN']:
artwork_path = 'http://ec1.images-amazon.com/images/P/%s.01.LZZZZZZZ.jpg' % dbalbum['AlbumASIN'] artwork_path = 'https://ec1.images-amazon.com/images/P/%s.01.LZZZZZZZ.jpg' % dbalbum['AlbumASIN']
artwork = getartwork(artwork_path) artwork = getartwork(artwork_path)
if artwork: if artwork:
logger.info("Artwork found at Amazon") logger.info("Artwork found at Amazon")
@@ -156,12 +156,19 @@ def getartwork(artwork_path):
break break
elif maxwidth and img_width > maxwidth: elif maxwidth and img_width > maxwidth:
# Downsize using proxy service to max width # Downsize using proxy service to max width
artwork_path = '{0}?{1}'.format('http://images.weserv.nl/', urlencode({
'url': artwork_path.replace('http://', ''),
'w': maxwidth,
}))
artwork = bytes() artwork = bytes()
r = request.request_response(artwork_path, timeout=20, stream=True, whitelist_status_code=404) url = "https://images.weserv.nl"
params = {
"url": artwork_path,
"w": maxwidth
}
r = request.request_response(
url,
params=params,
timeout=20,
stream=True,
whitelist_status_code=404
)
if r: if r:
for chunk in r.iter_content(chunk_size=1024): for chunk in r.iter_content(chunk_size=1024):
artwork += chunk artwork += chunk
@@ -182,7 +189,7 @@ def getCachedArt(albumid):
if not artwork_path: if not artwork_path:
return return
if artwork_path.startswith('http://'): if artwork_path.startswith("http"):
artwork = request.request_content(artwork_path, timeout=20) artwork = request.request_content(artwork_path, timeout=20)
if not artwork: if not artwork:
+11 -6
View File
@@ -540,12 +540,17 @@ class Cache(object):
artwork_thumb = None artwork_thumb = None
if 'fanart' in thumb_url: if 'fanart' in thumb_url:
# Create thumb using image resizing service # Create thumb using image resizing service
artwork_path = '{0}?{1}'.format('http://images.weserv.nl/', urlencode({ url = "https://images.weserv.nl"
'url': thumb_url.replace('http://', ''), params = {
'w': 300, "url": thumb_url,
})) "w": 300
artwork_thumb = request.request_content(artwork_path, timeout=20, whitelist_status_code=404) }
artwork_thumb = request.request_content(
url,
params=params,
timeout=20,
whitelist_status_code=404
)
if artwork_thumb: if artwork_thumb:
with open(thumb_path, 'wb') as f: with open(thumb_path, 'wb') as f:
f.write(artwork_thumb) f.write(artwork_thumb)
+1 -20
View File
@@ -472,32 +472,13 @@ def _add_torrent_file(result):
# content is torrent file contents that needs to be encoded to base64 # content is torrent file contents that needs to be encoded to base64
post_data = json.dumps({"method": "core.add_torrent_file", post_data = json.dumps({"method": "core.add_torrent_file",
"params": [result['name'] + '.torrent', "params": [result['name'] + '.torrent',
b64encode(result['content'].encode('utf8')), {}], b64encode(result['content']).decode(), {}],
"id": 2}) "id": 2})
response = requests.post(delugeweb_url, data=post_data.encode('utf-8'), cookies=delugeweb_auth, response = requests.post(delugeweb_url, data=post_data.encode('utf-8'), cookies=delugeweb_auth,
verify=deluge_verify_cert, headers=headers) verify=deluge_verify_cert, headers=headers)
result['hash'] = json.loads(response.text)['result'] result['hash'] = json.loads(response.text)['result']
logger.debug('Deluge: Response was %s' % str(json.loads(response.text))) logger.debug('Deluge: Response was %s' % str(json.loads(response.text)))
return json.loads(response.text)['result'] return json.loads(response.text)['result']
except UnicodeDecodeError:
try:
# content is torrent file contents that needs to be encoded to base64
# this time let's try leaving the encoding as is
logger.debug('Deluge: There was a decoding issue, let\'s try again')
post_data = json.dumps({"method": "core.add_torrent_file",
"params": [result['name'].decode('utf8') + '.torrent',
b64encode(result['content']), {}],
"id": 22})
response = requests.post(delugeweb_url, data=post_data.encode('utf-8'), cookies=delugeweb_auth,
verify=deluge_verify_cert, headers=headers)
result['hash'] = json.loads(response.text)['result']
logger.debug('Deluge: Response was %s' % str(json.loads(response.text)))
return json.loads(response.text)['result']
except Exception as e:
logger.error('Deluge: Adding torrent file failed after decode: %s' % str(e))
formatted_lines = traceback.format_exc().splitlines()
logger.error('; '.join(formatted_lines))
return False
except Exception as e: except Exception as e:
logger.error('Deluge: Adding torrent file failed: %s' % str(e)) logger.error('Deluge: Adding torrent file failed: %s' % str(e))
formatted_lines = traceback.format_exc().splitlines() formatted_lines = traceback.format_exc().splitlines()
+3
View File
@@ -32,6 +32,7 @@ import functools
import re import re
import os import os
from mediafile import MediaFile, FileTypeError, UnreadableFileError from mediafile import MediaFile, FileTypeError, UnreadableFileError
from unidecode import unidecode
import headphones import headphones
@@ -952,6 +953,8 @@ def sab_sanitize_foldername(name):
if not name: if not name:
return return
name = unidecode(name)
lst = [] lst = []
for ch in name.strip(): for ch in name.strip():
if ch in FL_ILLEGAL: if ch in FL_ILLEGAL:
+1 -1
View File
@@ -22,7 +22,7 @@ from headphones import db, logger, request
TIMEOUT = 60.0 # seconds TIMEOUT = 60.0 # seconds
REQUEST_LIMIT = 1.0 / 5 # seconds REQUEST_LIMIT = 1.0 / 5 # seconds
ENTRY_POINT = "http://ws.audioscrobbler.com/2.0/" ENTRY_POINT = "https://ws.audioscrobbler.com/2.0/"
API_KEY = "395e6ec6bb557382fc41fde867bce66f" API_KEY = "395e6ec6bb557382fc41fde867bce66f"
# Required for API request limit # Required for API request limit
+1 -1
View File
@@ -25,7 +25,7 @@ def getLyrics(artist, song):
"fmt": 'xml' "fmt": 'xml'
} }
url = 'http://lyrics.wikia.com/api.php' url = 'https://lyrics.wikia.com/api.php'
data = request.request_minidom(url, params=params) data = request.request_minidom(url, params=params)
if not data: if not data:
+7 -19
View File
@@ -124,11 +124,7 @@ def findArtist(name, limit=1):
'Cannot determine the best match from an artist/album search. Using top match instead') 'Cannot determine the best match from an artist/album search. Using top match instead')
artistlist.append({ artistlist.append({
# Just need the artist id if the limit is 1 # Just need the artist id if the limit is 1
# 'name': unicode(result['sort-name']),
# 'uniquename': uniquename,
'id': str(result['id']), 'id': str(result['id']),
# 'url': unicode("http://musicbrainz.org/artist/" + result['id']),#probably needs to be changed
# 'score': int(result['ext:score'])
}) })
else: else:
artistlist.append(artistdict) artistlist.append(artistdict)
@@ -137,7 +133,7 @@ def findArtist(name, limit=1):
'name': str(result['sort-name']), 'name': str(result['sort-name']),
'uniquename': uniquename, 'uniquename': uniquename,
'id': str(result['id']), 'id': str(result['id']),
'url': str("http://musicbrainz.org/artist/" + result['id']), 'url': str("https://musicbrainz.org/artist/" + result['id']),
# probably needs to be changed # probably needs to be changed
'score': int(result['ext:score']) 'score': int(result['ext:score'])
}) })
@@ -208,9 +204,9 @@ def findRelease(name, limit=1, artist=None):
'id': str(result['artist-credit'][0]['artist']['id']), 'id': str(result['artist-credit'][0]['artist']['id']),
'albumid': str(result['id']), 'albumid': str(result['id']),
'url': str( 'url': str(
"http://musicbrainz.org/artist/" + result['artist-credit'][0]['artist']['id']), "https://musicbrainz.org/artist/" + result['artist-credit'][0]['artist']['id']),
# probably needs to be changed # probably needs to be changed
'albumurl': str("http://musicbrainz.org/release/" + result['id']), 'albumurl': str("https://musicbrainz.org/release/" + result['id']),
# probably needs to be changed # probably needs to be changed
'score': int(result['ext:score']), 'score': int(result['ext:score']),
'date': str(result['date']) if 'date' in result else '', 'date': str(result['date']) if 'date' in result else '',
@@ -248,7 +244,7 @@ def findSeries(name, limit=1):
'name': str(result['name']), 'name': str(result['name']),
'type': str(result['type']), 'type': str(result['type']),
'id': str(result['id']), 'id': str(result['id']),
'url': str("http://musicbrainz.org/series/" + result['id']), 'url': str("https://musicbrainz.org/series/" + result['id']),
# probably needs to be changed # probably needs to be changed
'score': int(result['ext:score']) 'score': int(result['ext:score'])
}) })
@@ -295,7 +291,7 @@ def getArtist(artistid, extrasonly=False):
releasegroups.append({ releasegroups.append({
'title': str(rg['title']), 'title': str(rg['title']),
'id': str(rg['id']), 'id': str(rg['id']),
'url': "http://musicbrainz.org/release-group/" + rg['id'], 'url': "https://musicbrainz.org/release-group/" + rg['id'],
'type': str(rg['type']) 'type': str(rg['type'])
}) })
@@ -356,7 +352,7 @@ def getArtist(artistid, extrasonly=False):
releasegroups.append({ releasegroups.append({
'title': str(rg['title']), 'title': str(rg['title']),
'id': str(rg['id']), 'id': str(rg['id']),
'url': "http://musicbrainz.org/release-group/" + rg['id'], 'url': "https://musicbrainz.org/release-group/" + rg['id'],
'type': str(rg_type) 'type': str(rg_type)
}) })
artist_dict['releasegroups'] = releasegroups artist_dict['releasegroups'] = releasegroups
@@ -691,7 +687,7 @@ def getTracksFromRelease(release):
'number': totalTracks, 'number': totalTracks,
'title': track_title, 'title': track_title,
'id': str(track['recording']['id']), 'id': str(track['recording']['id']),
'url': "http://musicbrainz.org/track/" + track['recording']['id'], 'url': "https://musicbrainz.org/track/" + track['recording']['id'],
'duration': int(track['length']) if 'length' in track else 0 'duration': int(track['length']) if 'length' in track else 0
}) })
totalTracks += 1 totalTracks += 1
@@ -733,15 +729,7 @@ def findArtistbyAlbum(name):
for releaseGroup in results: for releaseGroup in results:
newArtist = releaseGroup['artist-credit'][0]['artist'] newArtist = releaseGroup['artist-credit'][0]['artist']
# Only need the artist ID if we're doing an artist+album lookup # Only need the artist ID if we're doing an artist+album lookup
# if 'disambiguation' in newArtist:
# uniquename = unicode(newArtist['sort-name'] + " (" + newArtist['disambiguation'] + ")")
# else:
# uniquename = unicode(newArtist['sort-name'])
# artist_dict['name'] = unicode(newArtist['sort-name'])
# artist_dict['uniquename'] = uniquename
artist_dict['id'] = str(newArtist['id']) artist_dict['id'] = str(newArtist['id'])
# artist_dict['url'] = u'http://musicbrainz.org/artist/' + newArtist['id']
# artist_dict['score'] = int(releaseGroup['ext:score'])
return artist_dict return artist_dict
+2 -2
View File
@@ -920,7 +920,7 @@ class BOXCAR(object):
def notify(self, title, message, rgid=None): def notify(self, title, message, rgid=None):
try: try:
if rgid: if rgid:
message += '<br></br><a href="http://musicbrainz.org/' \ message += '<br></br><a href="https://musicbrainz.org/' \
'release-group/%s">MusicBrainz</a>' % rgid 'release-group/%s">MusicBrainz</a>' % rgid
data = urllib.parse.urlencode({ data = urllib.parse.urlencode({
@@ -1019,7 +1019,7 @@ class TELEGRAM(object):
# MusicBrainz link # MusicBrainz link
if rgid: if rgid:
message += '\n\n <a href="http://musicbrainz.org/' \ message += '\n\n <a href="https://musicbrainz.org/' \
'release-group/%s">MusicBrainz</a>' % rgid 'release-group/%s">MusicBrainz</a>' % rgid
# Send image # Send image
+5 -5
View File
@@ -19,13 +19,13 @@ class Rutracker(object):
self.timeout = 60 self.timeout = 60
self.loggedin = False self.loggedin = False
self.maxsize = 0 self.maxsize = 0
self.search_referer = 'http://rutracker.org/forum/tracker.php' self.search_referer = 'https://rutracker.org/forum/tracker.php'
def logged_in(self): def logged_in(self):
return self.loggedin return self.loggedin
def still_logged_in(self, html): def still_logged_in(self, html):
if not html or "action=\"http://rutracker.org/forum/login.php\">" in html: if not html or "action=\"https://rutracker.org/forum/login.php\">" in html:
return False return False
else: else:
return True return True
@@ -35,7 +35,7 @@ class Rutracker(object):
Logs in user Logs in user
""" """
loginpage = 'http://rutracker.org/forum/login.php' loginpage = 'https://rutracker.org/forum/login.php'
post_params = { post_params = {
'login_username': headphones.CONFIG.RUTRACKER_USER, 'login_username': headphones.CONFIG.RUTRACKER_USER,
'login_password': headphones.CONFIG.RUTRACKER_PASSWORD, 'login_password': headphones.CONFIG.RUTRACKER_PASSWORD,
@@ -159,7 +159,7 @@ class Rutracker(object):
# Torrent topic page # Torrent topic page
torrent_id = dict([part.split('=') for part in urlparse(url)[4].split('&')])[ torrent_id = dict([part.split('=') for part in urlparse(url)[4].split('&')])[
't'] 't']
topicurl = 'http://rutracker.org/forum/viewtopic.php?t=' + torrent_id topicurl = 'https://rutracker.org/forum/viewtopic.php?t=' + torrent_id
rulist.append((title, size, topicurl, 'rutracker.org', 'torrent', True)) rulist.append((title, size, topicurl, 'rutracker.org', 'torrent', True))
else: else:
logger.info("%s is larger than the maxsize or has too little seeders for this category, " logger.info("%s is larger than the maxsize or has too little seeders for this category, "
@@ -179,7 +179,7 @@ class Rutracker(object):
return the .torrent data return the .torrent data
""" """
torrent_id = dict([part.split('=') for part in urlparse(url)[4].split('&')])['t'] torrent_id = dict([part.split('=') for part in urlparse(url)[4].split('&')])['t']
downloadurl = 'http://rutracker.org/forum/dl.php?t=' + torrent_id downloadurl = 'https://rutracker.org/forum/dl.php?t=' + torrent_id
cookie = {'bb_dl': torrent_id} cookie = {'bb_dl': torrent_id}
try: try:
headers = {'Referer': url} headers = {'Referer': url}
+6 -6
View File
@@ -40,7 +40,7 @@ from bencode import decode as bdecode
# Magnet to torrent services, for Black hole. Stolen from CouchPotato. # Magnet to torrent services, for Black hole. Stolen from CouchPotato.
TORRENT_TO_MAGNET_SERVICES = [ TORRENT_TO_MAGNET_SERVICES = [
'http://itorrents.org/torrent/%s.torrent', 'https://itorrents.org/torrent/%s.torrent',
'https://cache.torrentgalaxy.org/get/%s', 'https://cache.torrentgalaxy.org/get/%s',
'https://www.seedpeer.me/torrent/%s' 'https://www.seedpeer.me/torrent/%s'
] ]
@@ -611,7 +611,7 @@ def searchNZB(album, new=False, losslessOnly=False, albumlength=None,
provider = newznab_host[0] provider = newznab_host[0]
# Add a little mod for kere.ws # Add a little mod for kere.ws
if newznab_host[0] == "http://kere.ws": if newznab_host[0] == "https://kere.ws":
if categories == "3040": if categories == "3040":
categories = categories + ",4070" categories = categories + ",4070"
elif categories == "3040,3010": elif categories == "3040,3010":
@@ -682,7 +682,7 @@ def searchNZB(album, new=False, losslessOnly=False, albumlength=None,
} }
data = request.request_feed( data = request.request_feed(
url='http://beta.nzbs.org/api', url='https://beta.nzbs.org/api',
params=params, headers=headers, params=params, headers=headers,
timeout=5 timeout=5
) )
@@ -731,7 +731,7 @@ def searchNZB(album, new=False, losslessOnly=False, albumlength=None,
} }
data = request.request_json( data = request.request_json(
url='http://api.omgwtfnzbs.me/json/', url='https://api.omgwtfnzbs.me/json/',
params=params, headers=headers params=params, headers=headers
) )
@@ -1261,7 +1261,7 @@ def searchTorrent(album, new=False, losslessOnly=False, albumlength=None,
def set_proxy(proxy_url): def set_proxy(proxy_url):
if not proxy_url.startswith('http'): if not proxy_url.startswith('http'):
proxy_url = 'http://' + proxy_url proxy_url = 'https://' + proxy_url
if proxy_url.endswith('/'): if proxy_url.endswith('/'):
proxy_url = proxy_url[:-1] proxy_url = proxy_url[:-1]
@@ -1467,7 +1467,7 @@ def searchTorrent(album, new=False, losslessOnly=False, albumlength=None,
if headphones.CONFIG.ORPHEUS: if headphones.CONFIG.ORPHEUS:
provider = "Orpheus.network" provider = "Orpheus.network"
providerurl = "http://orpheus.network/" providerurl = "https://orpheus.network/"
bitrate = None bitrate = None
bitrate_string = bitrate bitrate_string = bitrate
+4 -4
View File
@@ -1677,16 +1677,16 @@ class WebInterface(object):
# Return the Cover Art Archive urls if not found on last.fm # Return the Cover Art Archive urls if not found on last.fm
if AlbumID and not image_dict: if AlbumID and not image_dict:
image_url = "http://coverartarchive.org/release/%s/front-500.jpg" % AlbumID image_url = "https://coverartarchive.org/release/%s/front-500.jpg" % AlbumID
thumb_url = "http://coverartarchive.org/release/%s/front-250.jpg" % AlbumID thumb_url = "https://coverartarchive.org/release/%s/front-250.jpg" % AlbumID
image_dict = {'artwork': image_url, 'thumbnail': thumb_url} image_dict = {'artwork': image_url, 'thumbnail': thumb_url}
elif AlbumID and (not image_dict['artwork'] or not image_dict['thumbnail']): elif AlbumID and (not image_dict['artwork'] or not image_dict['thumbnail']):
if not image_dict['artwork']: if not image_dict['artwork']:
image_dict[ image_dict[
'artwork'] = "http://coverartarchive.org/release/%s/front-500.jpg" % AlbumID 'artwork'] = "https://coverartarchive.org/release/%s/front-500.jpg" % AlbumID
if not image_dict['thumbnail']: if not image_dict['thumbnail']:
image_dict[ image_dict[
'thumbnail'] = "http://coverartarchive.org/release/%s/front-250.jpg" % AlbumID 'thumbnail'] = "https://coverartarchive.org/release/%s/front-250.jpg" % AlbumID
return image_dict return image_dict
+1 -1
View File
@@ -1,4 +1,4 @@
from collections import Iterable, Mapping from collections.abc import Iterable, Mapping
from uuid import uuid4 from uuid import uuid4
import six import six
+1 -1
View File
@@ -1,6 +1,6 @@
from abc import ABCMeta, abstractmethod from abc import ABCMeta, abstractmethod
from collections import MutableMapping from collections.abc import MutableMapping
from threading import RLock from threading import RLock
from datetime import datetime from datetime import datetime
from logging import getLogger from logging import getLogger
+1 -1
View File
@@ -32,7 +32,7 @@ __all__ = ["APEv2", "APEv2File", "Open", "delete"]
import sys import sys
import struct import struct
from collections import MutableSequence from collections.abc import MutableSequence
from ._compat import (cBytesIO, PY3, text_type, PY2, reraise, swap_to_string, from ._compat import (cBytesIO, PY3, text_type, PY2, reraise, swap_to_string,
xrange) xrange)
+3 -3
View File
@@ -5,7 +5,7 @@
# #
# Loosely based on the API implementation from 'whatbetter', by Zachary Denton # Loosely based on the API implementation from 'whatbetter', by Zachary Denton
# See https://github.com/zacharydenton/whatbetter # See https://github.com/zacharydenton/whatbetter
from html.parser import HTMLParser import html
import sys import sys
import json import json
@@ -219,10 +219,10 @@ class GazelleAPI(object):
else: else:
artist = Artist(id, self) artist = Artist(id, self)
if name: if name:
artist.name = HTMLParser().unescape(name) artist.name = html.unescape(name)
elif name: elif name:
artist = Artist(-1, self) artist = Artist(-1, self)
artist.name = HTMLParser().unescape(name) artist.name = html.unescape(name)
else: else:
raise Exception("You must specify either an ID or a Name to get an artist.") raise Exception("You must specify either an ID or a Name to get an artist.")
+3 -3
View File
@@ -1,4 +1,4 @@
from html.parser import HTMLParser import html
class InvalidArtistException(Exception): class InvalidArtistException(Exception):
pass pass
@@ -29,7 +29,7 @@ class Artist(object):
if self.id > 0: if self.id > 0:
response = self.parent_api.request(action='artist', id=self.id) response = self.parent_api.request(action='artist', id=self.id)
elif self.name: elif self.name:
self.name = HTMLParser().unescape(self.name) self.name = html.unescape(self.name)
try: try:
response = self.parent_api.request(action='artist', artistname=self.name) response = self.parent_api.request(action='artist', artistname=self.name)
except Exception: except Exception:
@@ -47,7 +47,7 @@ class Artist(object):
self.id = artist_json_response['id'] self.id = artist_json_response['id']
self.parent_api.cached_artists[self.id] = self self.parent_api.cached_artists[self.id] = self
self.name = HTMLParser().unescape(artist_json_response['name']) self.name = html.unescape(artist_json_response['name'])
self.notifications_enabled = artist_json_response['notificationsEnabled'] self.notifications_enabled = artist_json_response['notificationsEnabled']
self.has_bookmarked = artist_json_response['hasBookmarked'] self.has_bookmarked = artist_json_response['hasBookmarked']
self.image = artist_json_response['image'] self.image = artist_json_response['image']