Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

redacted and orpheus sort results by seeders #3212

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions headphones/searcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,6 @@ def sort_search_results(resultlist, album, new, albumlength):

resultlist = temp_list

# if headphones.CONFIG.PREFERRED_QUALITY == 2 and headphones.CONFIG.PREFERRED_BITRATE and result[3] != 'Orpheus.network':
if headphones.CONFIG.PREFERRED_QUALITY == 2 and headphones.CONFIG.PREFERRED_BITRATE:

try:
Expand Down Expand Up @@ -484,15 +483,16 @@ def sort_search_results(resultlist, album, new, albumlength):

finallist = sorted(resultlist, key=lambda title: (title[5], int(title[1])), reverse=True)

# keep number of seeders order for Orpheus.network
# if result[3] == 'Orpheus.network':
# finallist = resultlist

if not len(finallist):
logger.info('No appropriate matches found for %s - %s', album['ArtistName'],
album['AlbumTitle'])
return None

if result[3]:
if (result[3] == 'Orpheus.network') or (result[3] == 'Redacted'):
logger.info('Keeping torrents ordered by seeders for %s' % result[3])
finallist = resultlist

return finallist


Expand Down