Compare commits

...
3 Commits
Author SHA1 Message Date
rembo10 abac9b5a15 Merge branch 'develop' 2024-05-26 21:12:22 +05:30
rembo10 ace2b4f26a Update changelog for v0.6.3 2024-05-26 21:12:09 +05:30
rembo10 ebba115443 Fix for searcher not returning results 2024-05-26 19:58:45 +05:30
2 changed files with 31 additions and 29 deletions
+8
View File
@@ -1,5 +1,13 @@
# Changelog # Changelog
## v0.6.3
Released 26 May 2024
Highlights:
* Hotfix for searcher not returning results
The full list of commits can be found [here](https://github.com/rembo10/headphones/compare/v0.6.2...v0.6.3).
## v0.6.2 ## v0.6.2
Released 26 May 2024 Released 26 May 2024
+23 -29
View File
@@ -38,13 +38,13 @@ from unidecode import unidecode
import headphones import headphones
from headphones.common import USER_AGENT from headphones.common import USER_AGENT
from headphones.helpers import ( from headphones.helpers import (
bytes_to_mb, bytes_to_mb,
has_token, has_token,
piratesize, piratesize,
replace_all, replace_all,
replace_illegal_chars, replace_illegal_chars,
sab_replace_dots, sab_replace_dots,
sab_replace_spaces, sab_replace_spaces,
sab_sanitize_foldername, sab_sanitize_foldername,
split_string split_string
) )
@@ -52,13 +52,13 @@ from headphones.types import Result
from headphones import logger, db, classes, sab, nzbget, request from headphones import logger, db, classes, sab, nzbget, request
from headphones import ( from headphones import (
bandcamp, bandcamp,
deluge, deluge,
notifiers, notifiers,
qbittorrent, qbittorrent,
rutracker, rutracker,
soulseek, soulseek,
transmission, transmission,
utorrent, utorrent
) )
# Magnet to torrent services, for Black hole. Stolen from CouchPotato. # Magnet to torrent services, for Black hole. Stolen from CouchPotato.
@@ -329,26 +329,21 @@ def do_sorted_search(album, new, losslessOnly, choose_specific_download=False):
else: else:
nzb_results = None nzb_results = []
torrent_results = None torrent_results = []
bandcamp_results = None bandcamp_results = []
if NZB_PROVIDERS and NZB_DOWNLOADERS: if NZB_PROVIDERS and NZB_DOWNLOADERS:
nzb_results = searchNZB(album, new, losslessOnly, albumlength, choose_specific_download) nzb_results = searchNZB(album, new, losslessOnly,
albumlength, choose_specific_download)
if TORRENT_PROVIDERS: if TORRENT_PROVIDERS:
torrent_results = searchTorrent(album, new, losslessOnly, albumlength, torrent_results = searchTorrent(album, new, losslessOnly,
choose_specific_download) albumlength, choose_specific_download)
if headphones.CONFIG.BANDCAMP: if headphones.CONFIG.BANDCAMP:
bandcamp_results = searchBandcamp(album, new, albumlength) bandcamp_results = searchBandcamp(album, new, albumlength)
if not nzb_results:
nzb_results = []
if not torrent_results:
torrent_results = []
results = nzb_results + torrent_results + bandcamp_results results = nzb_results + torrent_results + bandcamp_results
if choose_specific_download: if choose_specific_download:
@@ -370,7 +365,6 @@ def do_sorted_search(album, new, losslessOnly, choose_specific_download=False):
(data, result) = preprocess(sorted_search_results) (data, result) = preprocess(sorted_search_results)
if data and result: if data and result:
#print(f'going to send stuff to downloader. data: {data}, album: {album}')
send_to_downloader(data, result, album) send_to_downloader(data, result, album)
@@ -876,15 +870,15 @@ def send_to_downloader(data, result, album):
except Exception as e: except Exception as e:
logger.error('Couldn\'t write NZB file: %s', e) logger.error('Couldn\'t write NZB file: %s', e)
return return
elif kind == 'bandcamp': elif kind == 'bandcamp':
folder_name = bandcamp.download(album, result) folder_name = bandcamp.download(album, result)
logger.info("Setting folder_name to: {}".format(folder_name)) logger.info("Setting folder_name to: {}".format(folder_name))
elif kind == 'soulseek': elif kind == 'soulseek':
soulseek.download(user=result.user, filelist=result.files) soulseek.download(user=result.user, filelist=result.files)
folder_name = result.folder folder_name = result.folder
else: else:
folder_name = '%s - %s [%s]' % ( folder_name = '%s - %s [%s]' % (
unidecode(album['ArtistName']).replace('/', '_'), unidecode(album['ArtistName']).replace('/', '_'),
@@ -1983,7 +1977,7 @@ def preprocess(resultlist):
if result.kind == 'soulseek': if result.kind == 'soulseek':
return True, result return True, result
if result.kind == 'torrent': if result.kind == 'torrent':
# rutracker always needs the torrent data # rutracker always needs the torrent data