mirror of
https://github.com/rembo10/headphones.git
synced 2026-05-02 09:49:36 +01:00
@@ -132,7 +132,11 @@ def get_image_data(bites):
|
||||
|
||||
def getartwork(artwork_path):
|
||||
artwork = bytes()
|
||||
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)
|
||||
|
||||
@@ -233,8 +233,12 @@ class Rutracker(object):
|
||||
# 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'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user