mirror of
https://github.com/rembo10/headphones.git
synced 2026-04-05 12:39:26 +01:00
@@ -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)
|
||||
|
||||
|
||||
@@ -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'])
|
||||
|
||||
|
||||
@@ -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'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user