diff --git a/headphones/albumart.py b/headphones/albumart.py index 3d0ff7fc..77f19f53 100644 --- a/headphones/albumart.py +++ b/headphones/albumart.py @@ -132,8 +132,12 @@ def get_image_data(bites): def getartwork(artwork_path): artwork = bytes() - minwidth = int(headphones.CONFIG.ALBUM_ART_MIN_WIDTH) - maxwidth = int(headphones.CONFIG.ALBUM_ART_MAX_WIDTH) + minwidth = 0 + maxwidth = 0 + if headphones.CONFIG.ALBUM_ART_MIN_WIDTH: + minwidth = int(headphones.CONFIG.ALBUM_ART_MIN_WIDTH) + if headphones.CONFIG.ALBUM_ART_MAX_WIDTH: + maxwidth = int(headphones.CONFIG.ALBUM_ART_MAX_WIDTH) resp = request.request_response(artwork_path, timeout=20, stream=True, whitelist_status_code=404) diff --git a/headphones/postprocessor.py b/headphones/postprocessor.py index 7879ec20..7b0f8a41 100755 --- a/headphones/postprocessor.py +++ b/headphones/postprocessor.py @@ -68,7 +68,7 @@ def checkFolder(): if os.path.exists(album_path): logger.info('Found "' + folder_name + '" in ' + album[ 'Kind'] + ' download folder. Verifying....') - verify(album['AlbumID'], album_path, album['Kind'],single=single) + verify(album['AlbumID'], album_path, album['Kind'], single=single) else: logger.info("No folder name found for " + album['Title']) diff --git a/headphones/rutracker.py b/headphones/rutracker.py index fbe20763..b48301fb 100644 --- a/headphones/rutracker.py +++ b/headphones/rutracker.py @@ -6,7 +6,7 @@ from urlparse import urlparse import re import requests as requests -#from requests.auth import HTTPDigestAuth +# from requests.auth import HTTPDigestAuth from bs4 import BeautifulSoup import headphones @@ -230,11 +230,15 @@ class Rutracker(object): host = host[:-4] base_url = host - #self.session.auth = HTTPDigestAuth(headphones.CONFIG.QBITTORRENT_USERNAME, headphones.CONFIG.QBITTORRENT_PASSWORD) + # self.session.auth = HTTPDigestAuth(headphones.CONFIG.QBITTORRENT_USERNAME, headphones.CONFIG.QBITTORRENT_PASSWORD) url = base_url + '/login' - r = self.session.post(url, data={'username': headphones.CONFIG.QBITTORRENT_USERNAME, + try: + self.session.post(url, data={'username': headphones.CONFIG.QBITTORRENT_USERNAME, 'password': headphones.CONFIG.QBITTORRENT_PASSWORD}) + except Exception as e: + logger.exception('Error adding file to qbittorrent %s', e) + return url = base_url + '/command/upload'