mirror of
https://github.com/rembo10/headphones.git
synced 2026-05-09 05:09:27 +01:00
pep8
This commit is contained in:
@@ -152,7 +152,6 @@ def getartwork(artwork_path):
|
||||
break
|
||||
elif maxwidth and img_width > maxwidth:
|
||||
# Downsize using proxy service to max width
|
||||
logger.info("Artwork is greater than the maximum width, downsizing using proxy service")
|
||||
artwork_path = '{0}?{1}'.format('http://images.weserv.nl/', urlencode({
|
||||
'url': artwork_path.replace('http://', ''),
|
||||
'w': maxwidth,
|
||||
@@ -163,6 +162,7 @@ def getartwork(artwork_path):
|
||||
for chunk in r.iter_content(chunk_size=1024):
|
||||
artwork += chunk
|
||||
r.close()
|
||||
logger.info("Artwork is greater than the maximum width, downsized using proxy service")
|
||||
break
|
||||
resp.close()
|
||||
|
||||
@@ -186,4 +186,4 @@ def getCachedArt(albumid):
|
||||
return
|
||||
else:
|
||||
with open(artwork_path, "r") as fp:
|
||||
return fp.read()
|
||||
return fp.read()
|
||||
|
||||
@@ -17,7 +17,6 @@ import urllib
|
||||
import urllib2
|
||||
import cookielib
|
||||
import json
|
||||
import os
|
||||
import time
|
||||
import mimetypes
|
||||
import random
|
||||
|
||||
@@ -1437,8 +1437,8 @@ def searchTorrent(album, new=False, losslessOnly=False, albumlength=None,
|
||||
|
||||
query_items.extend(['format:(%s)' % format,
|
||||
'size:[0 TO %d]' % maxsize])
|
||||
# (25/03/2017 Waffles back up after 5 months, all torrents have no seeders, remove for now)
|
||||
#'-seeders:0']) # cut out dead torrents
|
||||
# (25/03/2017 Waffles back up after 5 months, all torrents currently have no seeders, remove for now)
|
||||
# '-seeders:0']) cut out dead torrents
|
||||
|
||||
if bitrate:
|
||||
query_items.append('bitrate:"%s"' % bitrate)
|
||||
|
||||
Reference in New Issue
Block a user