Merge branch 'random-fixes' into develop

This commit is contained in:
rembo10
2013-07-31 21:57:42 +05:30
3 changed files with 5 additions and 3 deletions

View File

@@ -102,7 +102,7 @@
<td>
<fieldset>
<legend>Usenet</legend>
<input type="radio" name="nzb_downloader" id="nzb_downloader_sabnzbd" value="0" ${config['nzb_downloader_sabnzbd']}>Sabnzbd <input type="radio" name="nzb_downloader" id="nzb_downloader_nzbget" value="1" ${config['nzb_downloader_nzbget']}> NZBget <input type="radio" name="nzb_downloader" id="nzb_downloader_blackhole" value="2" ${config['nzb_downloader_blackhole']}> Blackhole
<input type="radio" name="nzb_downloader" id="nzb_downloader_sabnzbd" value="0" ${config['nzb_downloader_sabnzbd']}>Sabnzbd <input type="radio" name="nzb_downloader" id="nzb_downloader_nzbget" value="1" ${config['nzb_downloader_nzbget']}> NZBget <input type="radio" name="nzb_downloader" id="nzb_downloader_blackhole" value="2" ${config['nzb_downloader_blackhole']}>Black Hole
</fieldset>
<fieldset id="sabnzbd_options">
<div class="row">

View File

@@ -372,7 +372,7 @@ def initialize():
MOVE_FILES = bool(check_setting_int(CFG, 'General', 'move_files', 0))
RENAME_FILES = bool(check_setting_int(CFG, 'General', 'rename_files', 0))
FOLDER_FORMAT = check_setting_str(CFG, 'General', 'folder_format', 'Artist/Album [Year]')
FILE_FORMAT = check_setting_str(CFG, 'General', 'file_format', 'Track Artist - Album [Year]- Title')
FILE_FORMAT = check_setting_str(CFG, 'General', 'file_format', 'Track Artist - Album [Year] - Title')
CLEANUP_FILES = bool(check_setting_int(CFG, 'General', 'cleanup_files', 0))
ADD_ALBUM_ART = bool(check_setting_int(CFG, 'General', 'add_album_art', 0))
ALBUM_ART_FORMAT = check_setting_str(CFG, 'General', 'album_art_format', 'folder')

View File

@@ -1073,6 +1073,8 @@ def searchTorrent(albumid=None, new=False, losslessOnly=False):
provider))
# Pirate Bay
if headphones.PIRATEBAY and headphones.TORRENT_DOWNLOADER == 0:
logger.warn("Cannot search Pirate Bay with Blackhole option set")
if headphones.PIRATEBAY and headphones.TORRENT_DOWNLOADER != 0:
provider = "The Pirate Bay"
providerurl = url_fix("http://thepiratebay.sx/search/" + term + "/0/99/")
@@ -1437,7 +1439,7 @@ def preprocesstorrent(resultlist, pre_sorted_list=False):
return True, result
try:
request = urllib2.Request(selresult[2])
request = urllib2.Request(result[2])
request.add_header('Accept-encoding', 'gzip')
if result[3] == 'Kick Ass Torrent':