mirror of
https://github.com/rembo10/headphones.git
synced 2026-07-22 08:53:59 +01:00
Allow the use of apikey with GazelleAPI & Redacted
This commit is contained in:
@@ -306,6 +306,7 @@ _CONFIG_DEFINITIONS = {
|
||||
'VERIFY_SSL_CERT': (bool_int, 'Advanced', 1),
|
||||
'WAIT_UNTIL_RELEASE_DATE': (int, 'General', 0),
|
||||
'REDACTED': (int, 'Redacted', 0),
|
||||
'REDACTED_APIKEY': (str, 'Redacted', ''),
|
||||
'REDACTED_USERNAME': (str, 'Redacted', ''),
|
||||
'REDACTED_PASSWORD': (str, 'Redacted', ''),
|
||||
'REDACTED_RATIO': (str, 'Redacted', ''),
|
||||
|
||||
@@ -1590,9 +1590,9 @@ def searchTorrent(album, new=False, losslessOnly=False, albumlength=None,
|
||||
if not orpheusobj or not orpheusobj.logged_in():
|
||||
try:
|
||||
logger.info("Attempting to log in to Orpheus.network...")
|
||||
orpheusobj = gazelleapi.GazelleAPI(headphones.CONFIG.ORPHEUS_USERNAME,
|
||||
headphones.CONFIG.ORPHEUS_PASSWORD,
|
||||
headphones.CONFIG.ORPHEUS_URL)
|
||||
orpheusobj = gazelleapi.GazelleAPI(username=headphones.CONFIG.ORPHEUS_USERNAME,
|
||||
password=headphones.CONFIG.ORPHEUS_PASSWORD,
|
||||
url=headphones.CONFIG.ORPHEUS_URL)
|
||||
orpheusobj._login()
|
||||
except Exception as e:
|
||||
orpheusobj = None
|
||||
@@ -1726,9 +1726,8 @@ def searchTorrent(album, new=False, losslessOnly=False, albumlength=None,
|
||||
if not redobj or not redobj.logged_in():
|
||||
try:
|
||||
logger.info("Attempting to log in to Redacted...")
|
||||
redobj = gazelleapi.GazelleAPI(headphones.CONFIG.REDACTED_USERNAME,
|
||||
headphones.CONFIG.REDACTED_PASSWORD,
|
||||
providerurl)
|
||||
redobj = gazelleapi.GazelleAPI(apikey=headphones.CONFIG.REDACTED_APIKEY,
|
||||
url=providerurl)
|
||||
redobj._login()
|
||||
except Exception as e:
|
||||
redobj = None
|
||||
|
||||
@@ -1242,6 +1242,7 @@ class WebInterface(object):
|
||||
"orpheus_ratio": headphones.CONFIG.ORPHEUS_RATIO,
|
||||
"orpheus_url": headphones.CONFIG.ORPHEUS_URL,
|
||||
"use_redacted": checked(headphones.CONFIG.REDACTED),
|
||||
"redacted_apikey": headphones.CONFIG.REDACTED_APIKEY,
|
||||
"redacted_username": headphones.CONFIG.REDACTED_USERNAME,
|
||||
"redacted_password": headphones.CONFIG.REDACTED_PASSWORD,
|
||||
"redacted_ratio": headphones.CONFIG.REDACTED_RATIO,
|
||||
|
||||
Reference in New Issue
Block a user