mirror of
https://github.com/rembo10/headphones.git
synced 2026-05-19 18:15:31 +01:00
autopep8 E203 whitespace before colon
This commit is contained in:
@@ -191,11 +191,11 @@ class Cache(object):
|
||||
if not db_info or not db_info['LastUpdated'] or not self._is_current(date=db_info['LastUpdated']):
|
||||
|
||||
self._update_cache()
|
||||
info_dict = { 'Summary' : self.info_summary, 'Content' : self.info_content }
|
||||
info_dict = { 'Summary': self.info_summary, 'Content': self.info_content }
|
||||
return info_dict
|
||||
|
||||
else:
|
||||
info_dict = { 'Summary' : db_info['Summary'], 'Content' : db_info['Content'] }
|
||||
info_dict = { 'Summary': db_info['Summary'], 'Content': db_info['Content'] }
|
||||
return info_dict
|
||||
|
||||
def get_image_links(self, ArtistID=None, AlbumID=None):
|
||||
@@ -240,7 +240,7 @@ class Cache(object):
|
||||
if not thumb_url:
|
||||
logger.debug('No album thumbnail image found on last.fm')
|
||||
|
||||
return {'artwork' : image_url, 'thumbnail' : thumb_url }
|
||||
return {'artwork': image_url, 'thumbnail': thumb_url }
|
||||
|
||||
def remove_from_cache(self, ArtistID=None, AlbumID=None):
|
||||
"""
|
||||
|
||||
@@ -93,7 +93,7 @@ class DBConnection:
|
||||
|
||||
changesBefore = self.connection.total_changes
|
||||
|
||||
genParams = lambda myDict : [x + " = ?" for x in myDict.keys()]
|
||||
genParams = lambda myDict: [x + " = ?" for x in myDict.keys()]
|
||||
|
||||
query = "UPDATE "+tableName+" SET " + ", ".join(genParams(valueDict)) + " WHERE " + " AND ".join(genParams(keyDict))
|
||||
|
||||
|
||||
@@ -794,9 +794,9 @@ def getHybridRelease(fullreleaselist):
|
||||
|
||||
a = helpers.multikeysort(sortable_release_list, ['-hasasin', 'country', 'format', 'trackscount_delta'])
|
||||
|
||||
release_dict = {'ReleaseDate' : sortable_release_list[0]['releasedate'],
|
||||
'Tracks' : a[0]['tracks'],
|
||||
'AlbumASIN' : a[0]['asin']
|
||||
release_dict = {'ReleaseDate': sortable_release_list[0]['releasedate'],
|
||||
'Tracks': a[0]['tracks'],
|
||||
'AlbumASIN': a[0]['asin']
|
||||
}
|
||||
|
||||
return release_dict
|
||||
|
||||
@@ -133,20 +133,20 @@ def libraryScan(dir=None, append=False, ArtistID=None, ArtistName=None, cron=Fal
|
||||
else:
|
||||
CleanName = None
|
||||
|
||||
controlValueDict = {'Location' : unicode_song_path}
|
||||
controlValueDict = {'Location': unicode_song_path}
|
||||
|
||||
newValueDict = { 'TrackID' : f.mb_trackid,
|
||||
newValueDict = { 'TrackID': f.mb_trackid,
|
||||
#'ReleaseID' : f.mb_albumid,
|
||||
'ArtistName' : f_artist,
|
||||
'AlbumTitle' : f.album,
|
||||
'ArtistName': f_artist,
|
||||
'AlbumTitle': f.album,
|
||||
'TrackNumber': f.track,
|
||||
'TrackLength': f.length,
|
||||
'Genre' : f.genre,
|
||||
'Date' : f.date,
|
||||
'TrackTitle' : f.title,
|
||||
'BitRate' : f.bitrate,
|
||||
'Format' : f.format,
|
||||
'CleanName' : CleanName
|
||||
'Genre': f.genre,
|
||||
'Date': f.date,
|
||||
'TrackTitle': f.title,
|
||||
'BitRate': f.bitrate,
|
||||
'Format': f.format,
|
||||
'CleanName': CleanName
|
||||
}
|
||||
|
||||
#song_list.append(song_dict)
|
||||
@@ -221,72 +221,72 @@ def libraryScan(dir=None, append=False, ArtistID=None, ArtistName=None, cron=Fal
|
||||
track = myDB.action('SELECT ArtistName, AlbumTitle, TrackTitle, AlbumID from tracks WHERE ArtistName LIKE ? AND AlbumTitle LIKE ? AND TrackTitle LIKE ?', [song['ArtistName'], song['AlbumTitle'], song['TrackTitle']]).fetchone()
|
||||
have_updated = False
|
||||
if track:
|
||||
controlValueDict = { 'ArtistName' : track['ArtistName'],
|
||||
'AlbumTitle' : track['AlbumTitle'],
|
||||
'TrackTitle' : track['TrackTitle'] }
|
||||
newValueDict = { 'Location' : song['Location'],
|
||||
'BitRate' : song['BitRate'],
|
||||
'Format' : song['Format'] }
|
||||
controlValueDict = { 'ArtistName': track['ArtistName'],
|
||||
'AlbumTitle': track['AlbumTitle'],
|
||||
'TrackTitle': track['TrackTitle'] }
|
||||
newValueDict = { 'Location': song['Location'],
|
||||
'BitRate': song['BitRate'],
|
||||
'Format': song['Format'] }
|
||||
myDB.upsert("tracks", newValueDict, controlValueDict)
|
||||
|
||||
controlValueDict2 = { 'Location' : song['Location']}
|
||||
newValueDict2 = { 'Matched' : track['AlbumID']}
|
||||
controlValueDict2 = { 'Location': song['Location']}
|
||||
newValueDict2 = { 'Matched': track['AlbumID']}
|
||||
myDB.upsert("have", newValueDict2, controlValueDict2)
|
||||
have_updated = True
|
||||
else:
|
||||
track = myDB.action('SELECT CleanName, AlbumID from tracks WHERE CleanName LIKE ?', [song['CleanName']]).fetchone()
|
||||
if track:
|
||||
controlValueDict = { 'CleanName' : track['CleanName']}
|
||||
newValueDict = { 'Location' : song['Location'],
|
||||
'BitRate' : song['BitRate'],
|
||||
'Format' : song['Format'] }
|
||||
controlValueDict = { 'CleanName': track['CleanName']}
|
||||
newValueDict = { 'Location': song['Location'],
|
||||
'BitRate': song['BitRate'],
|
||||
'Format': song['Format'] }
|
||||
myDB.upsert("tracks", newValueDict, controlValueDict)
|
||||
|
||||
controlValueDict2 = { 'Location' : song['Location']}
|
||||
newValueDict2 = { 'Matched' : track['AlbumID']}
|
||||
controlValueDict2 = { 'Location': song['Location']}
|
||||
newValueDict2 = { 'Matched': track['AlbumID']}
|
||||
myDB.upsert("have", newValueDict2, controlValueDict2)
|
||||
have_updated = True
|
||||
else:
|
||||
controlValueDict2 = { 'Location' : song['Location']}
|
||||
newValueDict2 = { 'Matched' : "Failed"}
|
||||
controlValueDict2 = { 'Location': song['Location']}
|
||||
newValueDict2 = { 'Matched': "Failed"}
|
||||
myDB.upsert("have", newValueDict2, controlValueDict2)
|
||||
have_updated = True
|
||||
|
||||
alltrack = myDB.action('SELECT ArtistName, AlbumTitle, TrackTitle, AlbumID from alltracks WHERE ArtistName LIKE ? AND AlbumTitle LIKE ? AND TrackTitle LIKE ?', [song['ArtistName'], song['AlbumTitle'], song['TrackTitle']]).fetchone()
|
||||
if alltrack:
|
||||
controlValueDict = { 'ArtistName' : alltrack['ArtistName'],
|
||||
'AlbumTitle' : alltrack['AlbumTitle'],
|
||||
'TrackTitle' : alltrack['TrackTitle'] }
|
||||
newValueDict = { 'Location' : song['Location'],
|
||||
'BitRate' : song['BitRate'],
|
||||
'Format' : song['Format'] }
|
||||
controlValueDict = { 'ArtistName': alltrack['ArtistName'],
|
||||
'AlbumTitle': alltrack['AlbumTitle'],
|
||||
'TrackTitle': alltrack['TrackTitle'] }
|
||||
newValueDict = { 'Location': song['Location'],
|
||||
'BitRate': song['BitRate'],
|
||||
'Format': song['Format'] }
|
||||
myDB.upsert("alltracks", newValueDict, controlValueDict)
|
||||
|
||||
controlValueDict2 = { 'Location' : song['Location']}
|
||||
newValueDict2 = { 'Matched' : alltrack['AlbumID']}
|
||||
controlValueDict2 = { 'Location': song['Location']}
|
||||
newValueDict2 = { 'Matched': alltrack['AlbumID']}
|
||||
myDB.upsert("have", newValueDict2, controlValueDict2)
|
||||
else:
|
||||
alltrack = myDB.action('SELECT CleanName, AlbumID from alltracks WHERE CleanName LIKE ?', [song['CleanName']]).fetchone()
|
||||
if alltrack:
|
||||
controlValueDict = { 'CleanName' : alltrack['CleanName']}
|
||||
newValueDict = { 'Location' : song['Location'],
|
||||
'BitRate' : song['BitRate'],
|
||||
'Format' : song['Format'] }
|
||||
controlValueDict = { 'CleanName': alltrack['CleanName']}
|
||||
newValueDict = { 'Location': song['Location'],
|
||||
'BitRate': song['BitRate'],
|
||||
'Format': song['Format'] }
|
||||
myDB.upsert("alltracks", newValueDict, controlValueDict)
|
||||
|
||||
controlValueDict2 = { 'Location' : song['Location']}
|
||||
newValueDict2 = { 'Matched' : alltrack['AlbumID']}
|
||||
controlValueDict2 = { 'Location': song['Location']}
|
||||
newValueDict2 = { 'Matched': alltrack['AlbumID']}
|
||||
myDB.upsert("have", newValueDict2, controlValueDict2)
|
||||
else:
|
||||
# alltracks may not exist if adding album manually, have should only be set to failed if not already updated in tracks
|
||||
if not have_updated:
|
||||
controlValueDict2 = { 'Location' : song['Location']}
|
||||
newValueDict2 = { 'Matched' : "Failed"}
|
||||
controlValueDict2 = { 'Location': song['Location']}
|
||||
newValueDict2 = { 'Matched': "Failed"}
|
||||
myDB.upsert("have", newValueDict2, controlValueDict2)
|
||||
|
||||
else:
|
||||
controlValueDict2 = { 'Location' : song['Location']}
|
||||
newValueDict2 = { 'Matched' : "Failed"}
|
||||
controlValueDict2 = { 'Location': song['Location']}
|
||||
newValueDict2 = { 'Matched': "Failed"}
|
||||
myDB.upsert("have", newValueDict2, controlValueDict2)
|
||||
|
||||
#######myDB.action('INSERT INTO have (ArtistName, AlbumTitle, TrackNumber, TrackTitle, TrackLength, BitRate, Genre, Date, TrackID, Location, CleanName, Format) VALUES( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)', [song['ArtistName'], song['AlbumTitle'], song['TrackNumber'], song['TrackTitle'], song['TrackLength'], song['BitRate'], song['Genre'], song['Date'], song['TrackID'], song['Location'], CleanName, song['Format']])
|
||||
@@ -379,7 +379,7 @@ def update_album_status(AlbumID=None):
|
||||
else:
|
||||
new_album_status = album['Status']
|
||||
|
||||
myDB.upsert("albums", {'Status' : new_album_status}, {'AlbumID' : album['AlbumID']})
|
||||
myDB.upsert("albums", {'Status': new_album_status}, {'AlbumID': album['AlbumID']})
|
||||
if new_album_status != album['Status']:
|
||||
logger.info('Album %s changed to %s' % (album['AlbumTitle'], new_album_status))
|
||||
logger.info('Album status update complete')
|
||||
|
||||
@@ -510,7 +510,7 @@ def get_new_releases(rgid, includeExtras=False, forcefull=False):
|
||||
# What we're doing here now is first updating the allalbums & alltracks table to the most
|
||||
# current info, then moving the appropriate release into the album table and its associated
|
||||
# tracks into the tracks table
|
||||
controlValueDict = {"ReleaseID" : release['ReleaseID']}
|
||||
controlValueDict = {"ReleaseID": release['ReleaseID']}
|
||||
|
||||
newValueDict = {"ArtistID": release['ArtistID'],
|
||||
"ArtistName": release['ArtistName'],
|
||||
|
||||
@@ -450,7 +450,7 @@ class PUSHBULLET(object):
|
||||
http_handler.request("POST",
|
||||
"/api/pushes",
|
||||
headers = {'Content-type': "application/x-www-form-urlencoded",
|
||||
'Authorization' : 'Basic %s' % base64.b64encode(headphones.CONFIG.PUSHBULLET_APIKEY + ":") },
|
||||
'Authorization': 'Basic %s' % base64.b64encode(headphones.CONFIG.PUSHBULLET_APIKEY + ":") },
|
||||
body = urlencode(data))
|
||||
response = http_handler.getresponse()
|
||||
request_status = response.status
|
||||
|
||||
@@ -129,8 +129,8 @@ def sendNZB(nzb):
|
||||
|
||||
def checkConfig():
|
||||
|
||||
params = { 'mode' : 'get_config',
|
||||
'section' : 'misc'
|
||||
params = { 'mode': 'get_config',
|
||||
'section': 'misc'
|
||||
}
|
||||
|
||||
if headphones.CONFIG.SAB_USERNAME:
|
||||
|
||||
@@ -1336,7 +1336,7 @@ def searchTorrent(album, new=False, losslessOnly=False, albumlength=None):
|
||||
# Request content
|
||||
logger.info("Searching The Pirate Bay using term: %s", tpb_term)
|
||||
|
||||
headers = {'User-Agent' : 'Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2049.0 Safari/537.36'}
|
||||
headers = {'User-Agent': 'Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2049.0 Safari/537.36'}
|
||||
data = request.request_soup(url=providerurl + category, headers=headers)
|
||||
|
||||
# Process content
|
||||
@@ -1350,8 +1350,8 @@ def searchTorrent(album, new=False, losslessOnly=False, albumlength=None):
|
||||
try:
|
||||
url = None
|
||||
rightformat = True
|
||||
title = ''.join(item.find("a", {"class" : "detLink"}))
|
||||
seeds = int(''.join(item.find("td", {"align" : "right"})))
|
||||
title = ''.join(item.find("a", {"class": "detLink"}))
|
||||
seeds = int(''.join(item.find("td", {"align": "right"})))
|
||||
|
||||
if headphones.CONFIG.TORRENT_DOWNLOADER == 0:
|
||||
try:
|
||||
|
||||
@@ -47,9 +47,9 @@ class Rutracker():
|
||||
#if self.login_counter > 1:
|
||||
# return False
|
||||
|
||||
params = urllib.urlencode({"login_username" : login,
|
||||
"login_password" : password,
|
||||
"login" : "Вход"})
|
||||
params = urllib.urlencode({"login_username": login,
|
||||
"login_password": password,
|
||||
"login": "Вход"})
|
||||
|
||||
try:
|
||||
self.opener.open("http://login.rutracker.org/forum/login.php", params)
|
||||
@@ -114,26 +114,26 @@ class Rutracker():
|
||||
#logger.debug (soup.prettify())
|
||||
|
||||
# Title
|
||||
for link in soup.find_all('a', attrs={'class' : 'med tLink hl-tags bold'}):
|
||||
for link in soup.find_all('a', attrs={'class': 'med tLink hl-tags bold'}):
|
||||
title = link.get_text()
|
||||
titles.append(title)
|
||||
|
||||
# Download URL
|
||||
for link in soup.find_all('a', attrs={'class' : 'small tr-dl dl-stub'}):
|
||||
for link in soup.find_all('a', attrs={'class': 'small tr-dl dl-stub'}):
|
||||
url = link.get('href')
|
||||
urls.append(url)
|
||||
|
||||
# Seeders
|
||||
for link in soup.find_all('b', attrs={'class' : 'seedmed'}):
|
||||
for link in soup.find_all('b', attrs={'class': 'seedmed'}):
|
||||
seeder = link.get_text()
|
||||
seeders.append(seeder)
|
||||
|
||||
# Size
|
||||
for link in soup.find_all('td', attrs={'class' : 'row4 small nowrap tor-size'}):
|
||||
for link in soup.find_all('td', attrs={'class': 'row4 small nowrap tor-size'}):
|
||||
size = link.u.string
|
||||
sizes.append(size)
|
||||
|
||||
except :
|
||||
except:
|
||||
pass
|
||||
|
||||
# Combine lists
|
||||
|
||||
@@ -460,12 +460,12 @@ class WebInterface(object):
|
||||
# else:
|
||||
# original_clean = None
|
||||
if original_clean == albums['CleanName']:
|
||||
have_dict = { 'ArtistName' : albums['ArtistName'], 'AlbumTitle' : albums['AlbumTitle'] }
|
||||
have_dict = { 'ArtistName': albums['ArtistName'], 'AlbumTitle': albums['AlbumTitle'] }
|
||||
have_album_dictionary.append(have_dict)
|
||||
headphones_albums = myDB.select('SELECT ArtistName, AlbumTitle from albums ORDER BY ArtistName')
|
||||
for albums in headphones_albums:
|
||||
if albums['ArtistName'] and albums['AlbumTitle']:
|
||||
headphones_dict = { 'ArtistName' : albums['ArtistName'], 'AlbumTitle' : albums['AlbumTitle'] }
|
||||
headphones_dict = { 'ArtistName': albums['ArtistName'], 'AlbumTitle': albums['AlbumTitle'] }
|
||||
headphones_album_dictionary.append(headphones_dict)
|
||||
#unmatchedalbums = [f for f in have_album_dictionary if f not in [x for x in headphones_album_dictionary]]
|
||||
|
||||
@@ -500,9 +500,9 @@ class WebInterface(object):
|
||||
new_clean_filename = old_clean_filename.replace(existing_artist_clean, new_artist_clean, 1)
|
||||
myDB.action('UPDATE have SET CleanName=? WHERE ArtistName=? AND CleanName=?', [new_clean_filename, existing_artist, old_clean_filename])
|
||||
controlValueDict = {"CleanName": new_clean_filename}
|
||||
newValueDict = {"Location" : entry['Location'],
|
||||
"BitRate" : entry['BitRate'],
|
||||
"Format" : entry['Format']
|
||||
newValueDict = {"Location": entry['Location'],
|
||||
"BitRate": entry['BitRate'],
|
||||
"Format": entry['Format']
|
||||
}
|
||||
#Attempt to match tracks with new CleanName
|
||||
match_alltracks = myDB.action('SELECT CleanName from alltracks WHERE CleanName=?', [new_clean_filename]).fetchone()
|
||||
@@ -538,9 +538,9 @@ class WebInterface(object):
|
||||
new_clean_filename = old_clean_filename.replace(existing_clean_string, new_clean_string, 1)
|
||||
myDB.action('UPDATE have SET CleanName=? WHERE ArtistName=? AND AlbumTitle=? AND CleanName=?', [new_clean_filename, existing_artist, existing_album, old_clean_filename])
|
||||
controlValueDict = {"CleanName": new_clean_filename}
|
||||
newValueDict = {"Location" : entry['Location'],
|
||||
"BitRate" : entry['BitRate'],
|
||||
"Format" : entry['Format']
|
||||
newValueDict = {"Location": entry['Location'],
|
||||
"BitRate": entry['BitRate'],
|
||||
"Format": entry['Format']
|
||||
}
|
||||
#Attempt to match tracks with new CleanName
|
||||
match_alltracks = myDB.action('SELECT CleanName from alltracks WHERE CleanName=?', [new_clean_filename]).fetchone()
|
||||
@@ -575,7 +575,7 @@ class WebInterface(object):
|
||||
album_status = "Ignored"
|
||||
elif albums['Matched'] == "Manual" or albums['CleanName'] != original_clean:
|
||||
album_status = "Matched"
|
||||
manual_dict = { 'ArtistName' : albums['ArtistName'], 'AlbumTitle' : albums['AlbumTitle'], 'AlbumStatus' : album_status }
|
||||
manual_dict = { 'ArtistName': albums['ArtistName'], 'AlbumTitle': albums['AlbumTitle'], 'AlbumStatus': album_status }
|
||||
if manual_dict not in manual_albums:
|
||||
manual_albums.append(manual_dict)
|
||||
manual_albums_sorted = sorted(manual_albums, key=itemgetter('ArtistName', 'AlbumTitle'))
|
||||
@@ -936,127 +936,127 @@ class WebInterface(object):
|
||||
interface_list = [ name for name in os.listdir(interface_dir) if os.path.isdir(os.path.join(interface_dir, name)) ]
|
||||
|
||||
config = {
|
||||
"http_host" : headphones.CONFIG.HTTP_HOST,
|
||||
"http_user" : headphones.CONFIG.HTTP_USERNAME,
|
||||
"http_port" : headphones.CONFIG.HTTP_PORT,
|
||||
"http_pass" : headphones.CONFIG.HTTP_PASSWORD,
|
||||
"launch_browser" : checked(headphones.CONFIG.LAUNCH_BROWSER),
|
||||
"enable_https" : checked(headphones.CONFIG.ENABLE_HTTPS),
|
||||
"https_cert" : headphones.CONFIG.HTTPS_CERT,
|
||||
"https_key" : headphones.CONFIG.HTTPS_KEY,
|
||||
"api_enabled" : checked(headphones.CONFIG.API_ENABLED),
|
||||
"api_key" : headphones.CONFIG.API_KEY,
|
||||
"download_scan_interval" : headphones.CONFIG.DOWNLOAD_SCAN_INTERVAL,
|
||||
"update_db_interval" : headphones.CONFIG.UPDATE_DB_INTERVAL,
|
||||
"mb_ignore_age" : headphones.CONFIG.MB_IGNORE_AGE,
|
||||
"search_interval" : headphones.CONFIG.SEARCH_INTERVAL,
|
||||
"libraryscan_interval" : headphones.CONFIG.LIBRARYSCAN_INTERVAL,
|
||||
"sab_host" : headphones.CONFIG.SAB_HOST,
|
||||
"sab_user" : headphones.CONFIG.SAB_USERNAME,
|
||||
"sab_api" : headphones.CONFIG.SAB_APIKEY,
|
||||
"sab_pass" : headphones.CONFIG.SAB_PASSWORD,
|
||||
"sab_cat" : headphones.CONFIG.SAB_CATEGORY,
|
||||
"nzbget_host" : headphones.CONFIG.NZBGET_HOST,
|
||||
"nzbget_user" : headphones.CONFIG.NZBGET_USERNAME,
|
||||
"nzbget_pass" : headphones.CONFIG.NZBGET_PASSWORD,
|
||||
"nzbget_cat" : headphones.CONFIG.NZBGET_CATEGORY,
|
||||
"nzbget_priority" : headphones.CONFIG.NZBGET_PRIORITY,
|
||||
"transmission_host" : headphones.CONFIG.TRANSMISSION_HOST,
|
||||
"transmission_user" : headphones.CONFIG.TRANSMISSION_USERNAME,
|
||||
"transmission_pass" : headphones.CONFIG.TRANSMISSION_PASSWORD,
|
||||
"utorrent_host" : headphones.CONFIG.UTORRENT_HOST,
|
||||
"utorrent_user" : headphones.CONFIG.UTORRENT_USERNAME,
|
||||
"utorrent_pass" : headphones.CONFIG.UTORRENT_PASSWORD,
|
||||
"utorrent_label" : headphones.CONFIG.UTORRENT_LABEL,
|
||||
"nzb_downloader_sabnzbd" : radio(headphones.CONFIG.NZB_DOWNLOADER, 0),
|
||||
"nzb_downloader_nzbget" : radio(headphones.CONFIG.NZB_DOWNLOADER, 1),
|
||||
"nzb_downloader_blackhole" : radio(headphones.CONFIG.NZB_DOWNLOADER, 2),
|
||||
"torrent_downloader_blackhole" : radio(headphones.CONFIG.TORRENT_DOWNLOADER, 0),
|
||||
"torrent_downloader_transmission" : radio(headphones.CONFIG.TORRENT_DOWNLOADER, 1),
|
||||
"torrent_downloader_utorrent" : radio(headphones.CONFIG.TORRENT_DOWNLOADER, 2),
|
||||
"download_dir" : headphones.CONFIG.DOWNLOAD_DIR,
|
||||
"use_blackhole" : checked(headphones.CONFIG.BLACKHOLE),
|
||||
"blackhole_dir" : headphones.CONFIG.BLACKHOLE_DIR,
|
||||
"usenet_retention" : headphones.CONFIG.USENET_RETENTION,
|
||||
"headphones_indexer" : checked(headphones.CONFIG.HEADPHONES_INDEXER),
|
||||
"use_newznab" : checked(headphones.CONFIG.NEWZNAB),
|
||||
"newznab_host" : headphones.CONFIG.NEWZNAB_HOST,
|
||||
"newznab_api" : headphones.CONFIG.NEWZNAB_APIKEY,
|
||||
"newznab_enabled" : checked(headphones.CONFIG.NEWZNAB_ENABLED),
|
||||
"extra_newznabs" : headphones.CONFIG.get_extra_newznabs(),
|
||||
"use_nzbsorg" : checked(headphones.CONFIG.NZBSORG),
|
||||
"nzbsorg_uid" : headphones.CONFIG.NZBSORG_UID,
|
||||
"nzbsorg_hash" : headphones.CONFIG.NZBSORG_HASH,
|
||||
"use_omgwtfnzbs" : checked(headphones.CONFIG.OMGWTFNZBS),
|
||||
"omgwtfnzbs_uid" : headphones.CONFIG.OMGWTFNZBS_UID,
|
||||
"omgwtfnzbs_apikey" : headphones.CONFIG.OMGWTFNZBS_APIKEY,
|
||||
"preferred_words" : headphones.CONFIG.PREFERRED_WORDS,
|
||||
"ignored_words" : headphones.CONFIG.IGNORED_WORDS,
|
||||
"required_words" : headphones.CONFIG.REQUIRED_WORDS,
|
||||
"torrentblackhole_dir" : headphones.CONFIG.TORRENTBLACKHOLE_DIR,
|
||||
"download_torrent_dir" : headphones.CONFIG.DOWNLOAD_TORRENT_DIR,
|
||||
"numberofseeders" : headphones.CONFIG.NUMBEROFSEEDERS,
|
||||
"use_kat" : checked(headphones.CONFIG.KAT),
|
||||
"kat_proxy_url" : headphones.CONFIG.KAT_PROXY_URL,
|
||||
"http_host": headphones.CONFIG.HTTP_HOST,
|
||||
"http_user": headphones.CONFIG.HTTP_USERNAME,
|
||||
"http_port": headphones.CONFIG.HTTP_PORT,
|
||||
"http_pass": headphones.CONFIG.HTTP_PASSWORD,
|
||||
"launch_browser": checked(headphones.CONFIG.LAUNCH_BROWSER),
|
||||
"enable_https": checked(headphones.CONFIG.ENABLE_HTTPS),
|
||||
"https_cert": headphones.CONFIG.HTTPS_CERT,
|
||||
"https_key": headphones.CONFIG.HTTPS_KEY,
|
||||
"api_enabled": checked(headphones.CONFIG.API_ENABLED),
|
||||
"api_key": headphones.CONFIG.API_KEY,
|
||||
"download_scan_interval": headphones.CONFIG.DOWNLOAD_SCAN_INTERVAL,
|
||||
"update_db_interval": headphones.CONFIG.UPDATE_DB_INTERVAL,
|
||||
"mb_ignore_age": headphones.CONFIG.MB_IGNORE_AGE,
|
||||
"search_interval": headphones.CONFIG.SEARCH_INTERVAL,
|
||||
"libraryscan_interval": headphones.CONFIG.LIBRARYSCAN_INTERVAL,
|
||||
"sab_host": headphones.CONFIG.SAB_HOST,
|
||||
"sab_user": headphones.CONFIG.SAB_USERNAME,
|
||||
"sab_api": headphones.CONFIG.SAB_APIKEY,
|
||||
"sab_pass": headphones.CONFIG.SAB_PASSWORD,
|
||||
"sab_cat": headphones.CONFIG.SAB_CATEGORY,
|
||||
"nzbget_host": headphones.CONFIG.NZBGET_HOST,
|
||||
"nzbget_user": headphones.CONFIG.NZBGET_USERNAME,
|
||||
"nzbget_pass": headphones.CONFIG.NZBGET_PASSWORD,
|
||||
"nzbget_cat": headphones.CONFIG.NZBGET_CATEGORY,
|
||||
"nzbget_priority": headphones.CONFIG.NZBGET_PRIORITY,
|
||||
"transmission_host": headphones.CONFIG.TRANSMISSION_HOST,
|
||||
"transmission_user": headphones.CONFIG.TRANSMISSION_USERNAME,
|
||||
"transmission_pass": headphones.CONFIG.TRANSMISSION_PASSWORD,
|
||||
"utorrent_host": headphones.CONFIG.UTORRENT_HOST,
|
||||
"utorrent_user": headphones.CONFIG.UTORRENT_USERNAME,
|
||||
"utorrent_pass": headphones.CONFIG.UTORRENT_PASSWORD,
|
||||
"utorrent_label": headphones.CONFIG.UTORRENT_LABEL,
|
||||
"nzb_downloader_sabnzbd": radio(headphones.CONFIG.NZB_DOWNLOADER, 0),
|
||||
"nzb_downloader_nzbget": radio(headphones.CONFIG.NZB_DOWNLOADER, 1),
|
||||
"nzb_downloader_blackhole": radio(headphones.CONFIG.NZB_DOWNLOADER, 2),
|
||||
"torrent_downloader_blackhole": radio(headphones.CONFIG.TORRENT_DOWNLOADER, 0),
|
||||
"torrent_downloader_transmission": radio(headphones.CONFIG.TORRENT_DOWNLOADER, 1),
|
||||
"torrent_downloader_utorrent": radio(headphones.CONFIG.TORRENT_DOWNLOADER, 2),
|
||||
"download_dir": headphones.CONFIG.DOWNLOAD_DIR,
|
||||
"use_blackhole": checked(headphones.CONFIG.BLACKHOLE),
|
||||
"blackhole_dir": headphones.CONFIG.BLACKHOLE_DIR,
|
||||
"usenet_retention": headphones.CONFIG.USENET_RETENTION,
|
||||
"headphones_indexer": checked(headphones.CONFIG.HEADPHONES_INDEXER),
|
||||
"use_newznab": checked(headphones.CONFIG.NEWZNAB),
|
||||
"newznab_host": headphones.CONFIG.NEWZNAB_HOST,
|
||||
"newznab_api": headphones.CONFIG.NEWZNAB_APIKEY,
|
||||
"newznab_enabled": checked(headphones.CONFIG.NEWZNAB_ENABLED),
|
||||
"extra_newznabs": headphones.CONFIG.get_extra_newznabs(),
|
||||
"use_nzbsorg": checked(headphones.CONFIG.NZBSORG),
|
||||
"nzbsorg_uid": headphones.CONFIG.NZBSORG_UID,
|
||||
"nzbsorg_hash": headphones.CONFIG.NZBSORG_HASH,
|
||||
"use_omgwtfnzbs": checked(headphones.CONFIG.OMGWTFNZBS),
|
||||
"omgwtfnzbs_uid": headphones.CONFIG.OMGWTFNZBS_UID,
|
||||
"omgwtfnzbs_apikey": headphones.CONFIG.OMGWTFNZBS_APIKEY,
|
||||
"preferred_words": headphones.CONFIG.PREFERRED_WORDS,
|
||||
"ignored_words": headphones.CONFIG.IGNORED_WORDS,
|
||||
"required_words": headphones.CONFIG.REQUIRED_WORDS,
|
||||
"torrentblackhole_dir": headphones.CONFIG.TORRENTBLACKHOLE_DIR,
|
||||
"download_torrent_dir": headphones.CONFIG.DOWNLOAD_TORRENT_DIR,
|
||||
"numberofseeders": headphones.CONFIG.NUMBEROFSEEDERS,
|
||||
"use_kat": checked(headphones.CONFIG.KAT),
|
||||
"kat_proxy_url": headphones.CONFIG.KAT_PROXY_URL,
|
||||
"kat_ratio": headphones.CONFIG.KAT_RATIO,
|
||||
"use_piratebay" : checked(headphones.CONFIG.PIRATEBAY),
|
||||
"piratebay_proxy_url" : headphones.CONFIG.PIRATEBAY_PROXY_URL,
|
||||
"use_piratebay": checked(headphones.CONFIG.PIRATEBAY),
|
||||
"piratebay_proxy_url": headphones.CONFIG.PIRATEBAY_PROXY_URL,
|
||||
"piratebay_ratio": headphones.CONFIG.PIRATEBAY_RATIO,
|
||||
"use_mininova" : checked(headphones.CONFIG.MININOVA),
|
||||
"use_mininova": checked(headphones.CONFIG.MININOVA),
|
||||
"mininova_ratio": headphones.CONFIG.MININOVA_RATIO,
|
||||
"use_waffles" : checked(headphones.CONFIG.WAFFLES),
|
||||
"waffles_uid" : headphones.CONFIG.WAFFLES_UID,
|
||||
"use_waffles": checked(headphones.CONFIG.WAFFLES),
|
||||
"waffles_uid": headphones.CONFIG.WAFFLES_UID,
|
||||
"waffles_passkey": headphones.CONFIG.WAFFLES_PASSKEY,
|
||||
"waffles_ratio": headphones.CONFIG.WAFFLES_RATIO,
|
||||
"use_rutracker" : checked(headphones.CONFIG.RUTRACKER),
|
||||
"rutracker_user" : headphones.CONFIG.RUTRACKER_USER,
|
||||
"use_rutracker": checked(headphones.CONFIG.RUTRACKER),
|
||||
"rutracker_user": headphones.CONFIG.RUTRACKER_USER,
|
||||
"rutracker_password": headphones.CONFIG.RUTRACKER_PASSWORD,
|
||||
"rutracker_ratio": headphones.CONFIG.RUTRACKER_RATIO,
|
||||
"use_whatcd" : checked(headphones.CONFIG.WHATCD),
|
||||
"whatcd_username" : headphones.CONFIG.WHATCD_USERNAME,
|
||||
"use_whatcd": checked(headphones.CONFIG.WHATCD),
|
||||
"whatcd_username": headphones.CONFIG.WHATCD_USERNAME,
|
||||
"whatcd_password": headphones.CONFIG.WHATCD_PASSWORD,
|
||||
"whatcd_ratio": headphones.CONFIG.WHATCD_RATIO,
|
||||
"pref_qual_0" : radio(headphones.CONFIG.PREFERRED_QUALITY, 0),
|
||||
"pref_qual_1" : radio(headphones.CONFIG.PREFERRED_QUALITY, 1),
|
||||
"pref_qual_2" : radio(headphones.CONFIG.PREFERRED_QUALITY, 2),
|
||||
"pref_qual_3" : radio(headphones.CONFIG.PREFERRED_QUALITY, 3),
|
||||
"pref_bitrate" : headphones.CONFIG.PREFERRED_BITRATE,
|
||||
"pref_bitrate_high" : headphones.CONFIG.PREFERRED_BITRATE_HIGH_BUFFER,
|
||||
"pref_bitrate_low" : headphones.CONFIG.PREFERRED_BITRATE_LOW_BUFFER,
|
||||
"pref_bitrate_allow_lossless" : checked(headphones.CONFIG.PREFERRED_BITRATE_ALLOW_LOSSLESS),
|
||||
"detect_bitrate" : checked(headphones.CONFIG.DETECT_BITRATE),
|
||||
"lossless_bitrate_from" : headphones.CONFIG.LOSSLESS_BITRATE_FROM,
|
||||
"lossless_bitrate_to" : headphones.CONFIG.LOSSLESS_BITRATE_TO,
|
||||
"freeze_db" : checked(headphones.CONFIG.FREEZE_DB),
|
||||
"move_files" : checked(headphones.CONFIG.MOVE_FILES),
|
||||
"rename_files" : checked(headphones.CONFIG.RENAME_FILES),
|
||||
"correct_metadata" : checked(headphones.CONFIG.CORRECT_METADATA),
|
||||
"cleanup_files" : checked(headphones.CONFIG.CLEANUP_FILES),
|
||||
"keep_nfo" : checked(headphones.CONFIG.KEEP_NFO),
|
||||
"add_album_art" : checked(headphones.CONFIG.ADD_ALBUM_ART),
|
||||
"album_art_format" : headphones.CONFIG.ALBUM_ART_FORMAT,
|
||||
"embed_album_art" : checked(headphones.CONFIG.EMBED_ALBUM_ART),
|
||||
"embed_lyrics" : checked(headphones.CONFIG.EMBED_LYRICS),
|
||||
"replace_existing_folders" : checked(headphones.CONFIG.REPLACE_EXISTING_FOLDERS),
|
||||
"dest_dir" : headphones.CONFIG.DESTINATION_DIR,
|
||||
"lossless_dest_dir" : headphones.CONFIG.LOSSLESS_DESTINATION_DIR,
|
||||
"folder_format" : headphones.CONFIG.FOLDER_FORMAT,
|
||||
"file_format" : headphones.CONFIG.FILE_FORMAT,
|
||||
"file_underscores" : checked(headphones.CONFIG.FILE_UNDERSCORES),
|
||||
"include_extras" : checked(headphones.CONFIG.INCLUDE_EXTRAS),
|
||||
"autowant_upcoming" : checked(headphones.CONFIG.AUTOWANT_UPCOMING),
|
||||
"autowant_all" : checked(headphones.CONFIG.AUTOWANT_ALL),
|
||||
"autowant_manually_added" : checked(headphones.CONFIG.AUTOWANT_MANUALLY_ADDED),
|
||||
"keep_torrent_files" : checked(headphones.CONFIG.KEEP_TORRENT_FILES),
|
||||
"prefer_torrents_0" : radio(headphones.CONFIG.PREFER_TORRENTS, 0),
|
||||
"prefer_torrents_1" : radio(headphones.CONFIG.PREFER_TORRENTS, 1),
|
||||
"prefer_torrents_2" : radio(headphones.CONFIG.PREFER_TORRENTS, 2),
|
||||
"magnet_links_0" : radio(headphones.CONFIG.MAGNET_LINKS, 0),
|
||||
"magnet_links_1" : radio(headphones.CONFIG.MAGNET_LINKS, 1),
|
||||
"magnet_links_2" : radio(headphones.CONFIG.MAGNET_LINKS, 2),
|
||||
"log_dir" : headphones.CONFIG.LOG_DIR,
|
||||
"cache_dir" : headphones.CONFIG.CACHE_DIR,
|
||||
"interface_list" : interface_list,
|
||||
"pref_qual_0": radio(headphones.CONFIG.PREFERRED_QUALITY, 0),
|
||||
"pref_qual_1": radio(headphones.CONFIG.PREFERRED_QUALITY, 1),
|
||||
"pref_qual_2": radio(headphones.CONFIG.PREFERRED_QUALITY, 2),
|
||||
"pref_qual_3": radio(headphones.CONFIG.PREFERRED_QUALITY, 3),
|
||||
"pref_bitrate": headphones.CONFIG.PREFERRED_BITRATE,
|
||||
"pref_bitrate_high": headphones.CONFIG.PREFERRED_BITRATE_HIGH_BUFFER,
|
||||
"pref_bitrate_low": headphones.CONFIG.PREFERRED_BITRATE_LOW_BUFFER,
|
||||
"pref_bitrate_allow_lossless": checked(headphones.CONFIG.PREFERRED_BITRATE_ALLOW_LOSSLESS),
|
||||
"detect_bitrate": checked(headphones.CONFIG.DETECT_BITRATE),
|
||||
"lossless_bitrate_from": headphones.CONFIG.LOSSLESS_BITRATE_FROM,
|
||||
"lossless_bitrate_to": headphones.CONFIG.LOSSLESS_BITRATE_TO,
|
||||
"freeze_db": checked(headphones.CONFIG.FREEZE_DB),
|
||||
"move_files": checked(headphones.CONFIG.MOVE_FILES),
|
||||
"rename_files": checked(headphones.CONFIG.RENAME_FILES),
|
||||
"correct_metadata": checked(headphones.CONFIG.CORRECT_METADATA),
|
||||
"cleanup_files": checked(headphones.CONFIG.CLEANUP_FILES),
|
||||
"keep_nfo": checked(headphones.CONFIG.KEEP_NFO),
|
||||
"add_album_art": checked(headphones.CONFIG.ADD_ALBUM_ART),
|
||||
"album_art_format": headphones.CONFIG.ALBUM_ART_FORMAT,
|
||||
"embed_album_art": checked(headphones.CONFIG.EMBED_ALBUM_ART),
|
||||
"embed_lyrics": checked(headphones.CONFIG.EMBED_LYRICS),
|
||||
"replace_existing_folders": checked(headphones.CONFIG.REPLACE_EXISTING_FOLDERS),
|
||||
"dest_dir": headphones.CONFIG.DESTINATION_DIR,
|
||||
"lossless_dest_dir": headphones.CONFIG.LOSSLESS_DESTINATION_DIR,
|
||||
"folder_format": headphones.CONFIG.FOLDER_FORMAT,
|
||||
"file_format": headphones.CONFIG.FILE_FORMAT,
|
||||
"file_underscores": checked(headphones.CONFIG.FILE_UNDERSCORES),
|
||||
"include_extras": checked(headphones.CONFIG.INCLUDE_EXTRAS),
|
||||
"autowant_upcoming": checked(headphones.CONFIG.AUTOWANT_UPCOMING),
|
||||
"autowant_all": checked(headphones.CONFIG.AUTOWANT_ALL),
|
||||
"autowant_manually_added": checked(headphones.CONFIG.AUTOWANT_MANUALLY_ADDED),
|
||||
"keep_torrent_files": checked(headphones.CONFIG.KEEP_TORRENT_FILES),
|
||||
"prefer_torrents_0": radio(headphones.CONFIG.PREFER_TORRENTS, 0),
|
||||
"prefer_torrents_1": radio(headphones.CONFIG.PREFER_TORRENTS, 1),
|
||||
"prefer_torrents_2": radio(headphones.CONFIG.PREFER_TORRENTS, 2),
|
||||
"magnet_links_0": radio(headphones.CONFIG.MAGNET_LINKS, 0),
|
||||
"magnet_links_1": radio(headphones.CONFIG.MAGNET_LINKS, 1),
|
||||
"magnet_links_2": radio(headphones.CONFIG.MAGNET_LINKS, 2),
|
||||
"log_dir": headphones.CONFIG.LOG_DIR,
|
||||
"cache_dir": headphones.CONFIG.CACHE_DIR,
|
||||
"interface_list": interface_list,
|
||||
"music_encoder": checked(headphones.CONFIG.MUSIC_ENCODER),
|
||||
"encoder": headphones.CONFIG.ENCODER,
|
||||
"xldprofile": headphones.CONFIG.XLDPROFILE,
|
||||
@@ -1311,7 +1311,7 @@ class WebInterface(object):
|
||||
if AlbumID and not image_dict:
|
||||
image_url = "http://coverartarchive.org/release/%s/front-500.jpg" % AlbumID
|
||||
thumb_url = "http://coverartarchive.org/release/%s/front-250.jpg" % AlbumID
|
||||
image_dict = {'artwork' : image_url, 'thumbnail' : thumb_url}
|
||||
image_dict = {'artwork': image_url, 'thumbnail': thumb_url}
|
||||
elif AlbumID and (not image_dict['artwork'] or not image_dict['thumbnail']):
|
||||
if not image_dict['artwork']:
|
||||
image_dict['artwork'] = "http://coverartarchive.org/release/%s/front-500.jpg" % AlbumID
|
||||
|
||||
Reference in New Issue
Block a user