Skip to content

Commit 9ccd380

Browse files
committed
Travis CI fixes
1 parent ac50641 commit 9ccd380

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

headphones/cache.py

+5-3
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,14 @@
1616
import os
1717

1818
import headphones
19-
from headphones import db, helpers, logger, lastfm, request, mb, os
19+
from headphones import db, helpers, logger, lastfm, request, mb
2020
from fanart.music import Artist
2121

2222
LASTFM_API_KEY = "690e1ed3bc00bc91804cd8f7fe5ed6d4"
2323

2424
os.environ.setdefault('FANART_APIKEY', '1f081b32bcd780219f4e6d519f78e37e')
2525

26+
2627
class Cache(object):
2728
"""
2829
This class deals with getting, storing and serving up artwork (album art,
@@ -412,7 +413,7 @@ def _update_cache(self):
412413
artwork = request.request_content(image_url, timeout=20)
413414

414415
if image_url and self.query_type == 'artwork':
415-
#artwork = request.request_content(image_url, timeout=20)
416+
# artwork = request.request_content(image_url, timeout=20)
416417

417418
if artwork:
418419
# Make sure the artwork dir exists:
@@ -451,7 +452,7 @@ def _update_cache(self):
451452
# as it's missing/outdated.
452453
if thumb_url and self.query_type in ['thumb', 'artwork'] and not (
453454
self.thumb_files and self._is_current(self.thumb_files[0])):
454-
#artwork = request.request_content(thumb_url, timeout=20)
455+
# artwork = request.request_content(thumb_url, timeout=20)
455456

456457
if artwork:
457458
# Make sure the artwork dir exists:
@@ -540,6 +541,7 @@ def _update_cache(self):
540541

541542
myDB.upsert("descriptions", newValueDict, controlValueDict)
542543

544+
543545
def getArtwork(ArtistID=None, AlbumID=None):
544546
c = Cache()
545547
artwork_path = c.get_artwork_from_cache(ArtistID, AlbumID)

headphones/lastfm.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,12 @@ def request_lastfm(method, **kwargs):
5353
if not data:
5454
logger.error("Error calling Last.FM method: %s", method)
5555
# when there is a last.fm api fail, this return prevents artist artwork from loading
56-
#return
56+
# return
5757

5858
if "error" in data:
5959
logger.debug("Last.FM returned an error: %s", data["message"])
6060
# when there is a last.fm api fail, this return prevents artist artwork from loading
61-
#return
61+
# return
6262

6363
return data
6464

0 commit comments

Comments
 (0)