diff --git a/data/interfaces/default/album.html b/data/interfaces/default/album.html index 06ac7e10..13223743 100644 --- a/data/interfaces/default/album.html +++ b/data/interfaces/default/album.html @@ -14,15 +14,15 @@ Delete Album %if album['Status'] == 'Skipped' or album['Status'] == 'Ignored': - Mark Album as Wanted + Mark Album as Wanted %elif album['Status'] == 'Wanted': - Force Check - Mark Album as Skipped + Force Check + Mark Album as Skipped %else: - Retry Download - Try New Version + Retry Download + Try New Version %endif - Choose Alternate Release + Choose Alternate Release - Edit Search Term + Edit Search Term - Choose Specific Download + Choose Specific Download @@ -66,7 +66,7 @@
- + @@ -78,7 +78,7 @@
Are you sure you want to ignore Local Album: ${album['AlbumTitle']} from future matching?

- +
@@ -97,7 +97,7 @@
- + diff --git a/data/interfaces/default/upcoming.html b/data/interfaces/default/upcoming.html index dbe7b254..97046f1c 100644 --- a/data/interfaces/default/upcoming.html +++ b/data/interfaces/default/upcoming.html @@ -3,7 +3,7 @@ <%def name="headerIncludes()">
- Force Check + Force Check
diff --git a/headphones/config.py b/headphones/config.py index 85f49799..8362b934 100644 --- a/headphones/config.py +++ b/headphones/config.py @@ -164,7 +164,7 @@ _CONFIG_DEFINITIONS = { 'OMGWTFNZBS': (int, 'omgwtfnzbs', 0), 'OMGWTFNZBS_APIKEY': (str, 'omgwtfnzbs', ''), 'OMGWTFNZBS_UID': (str, 'omgwtfnzbs', ''), - 'OPEN_MAGNET_LINKS': (int, 'General', 0), # 0: Ignore, 1: Open, 2: Convert + 'OPEN_MAGNET_LINKS': (int, 'General', 0), # 0: Ignore, 1: Open, 2: Convert, 3: Embed (rtorrent) 'MAGNET_LINKS': (int, 'General', 0), 'OSX_NOTIFY_APP': (str, 'OSX_Notify', '/Applications/Headphones'), 'OSX_NOTIFY_ENABLED': (int, 'OSX_Notify', 0), diff --git a/headphones/searcher.py b/headphones/searcher.py index aa07442b..91489a23 100644 --- a/headphones/searcher.py +++ b/headphones/searcher.py @@ -845,6 +845,9 @@ def send_to_downloader(data, bestqual, album): logger.warning("Unable to convert magnet with hash " \ "'%s' into a torrent file.", torrent_hash) return + elif headphones.CONFIG.MAGNET_LINKS == 3: + torrent_to_file(download_path, data) + return else: logger.error("Cannot save magnet link in blackhole. " \ "Please switch your torrent downloader to " \ @@ -988,7 +991,7 @@ def send_to_downloader(data, bestqual, album): logger.info(u"Sending Email notification") email = notifiers.Email() message = 'Snatched from ' + provider + '. ' + name - email.notify(title, message) + email.notify("Snatched: " + title, message) def verifyresult(title, artistterm, term, lossless): @@ -1749,6 +1752,10 @@ def preprocess(resultlist): 'User-Agent'] = 'Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2243.2 Safari/537.36' return request.request_content(url=result[2], headers=headers), result + if result[4] == 'magnet': + magnet_link = result[2] + return "d10:magnet-uri%d:%se" % (len(magnet_link), magnet_link), result + else: headers = {'User-Agent': USER_AGENT} diff --git a/headphones/webserve.py b/headphones/webserve.py index e6b66ac8..561dea0e 100644 --- a/headphones/webserve.py +++ b/headphones/webserve.py @@ -1265,6 +1265,7 @@ class WebInterface(object): "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), + "magnet_links_3": radio(headphones.CONFIG.MAGNET_LINKS, 3), "log_dir": headphones.CONFIG.LOG_DIR, "cache_dir": headphones.CONFIG.CACHE_DIR, "interface_list": interface_list,