mirror of
https://github.com/rembo10/headphones.git
synced 2026-07-21 00:14:02 +01:00
Return empty list instead of None. It's not necessary to only subset the list if there are items
This commit is contained in:
+2
-12
@@ -552,13 +552,7 @@ def searchNZB(album, new=False, losslessOnly=False):
|
|||||||
#
|
#
|
||||||
# Also will filter flac & remix albums if not specifically looking for it
|
# Also will filter flac & remix albums if not specifically looking for it
|
||||||
# This code also checks the ignored words and required words
|
# This code also checks the ignored words and required words
|
||||||
|
return [result for result in resultlist if verifyresult(result[0], artistterm, term, losslessOnly)]
|
||||||
if len(resultlist):
|
|
||||||
resultlist[:] = [result for result in resultlist if verifyresult(result[0], artistterm, term, losslessOnly)]
|
|
||||||
|
|
||||||
if len(resultlist):
|
|
||||||
return resultlist
|
|
||||||
|
|
||||||
|
|
||||||
def send_to_downloader(data, bestqual, album):
|
def send_to_downloader(data, bestqual, album):
|
||||||
|
|
||||||
@@ -1286,11 +1280,7 @@ def searchTorrent(album, new=False, losslessOnly=False):
|
|||||||
#attempt to verify that this isn't a substring result
|
#attempt to verify that this isn't a substring result
|
||||||
#when looking for "Foo - Foo" we don't want "Foobar"
|
#when looking for "Foo - Foo" we don't want "Foobar"
|
||||||
#this should be less of an issue when it isn't a self-titled album so we'll only check vs artist
|
#this should be less of an issue when it isn't a self-titled album so we'll only check vs artist
|
||||||
if len(resultlist):
|
return [result for result in resultlist if verifyresult(result[0], artistterm, term, losslessOnly)]
|
||||||
resultlist[:] = [result for result in resultlist if verifyresult(result[0], artistterm, term, losslessOnly)]
|
|
||||||
if len(resultlist):
|
|
||||||
return resultlist
|
|
||||||
|
|
||||||
|
|
||||||
# THIS IS KIND OF A MESS AND PROBABLY NEEDS TO BE CLEANED UP
|
# THIS IS KIND OF A MESS AND PROBABLY NEEDS TO BE CLEANED UP
|
||||||
def preprocess(resultlist):
|
def preprocess(resultlist):
|
||||||
|
|||||||
Reference in New Issue
Block a user