mirror of
https://github.com/rembo10/headphones.git
synced 2026-07-20 16:03:59 +01:00
Fixed: force search for wanted albums only searching for the first album
This commit is contained in:
+23
-5
@@ -60,12 +60,30 @@ def url_fix(s, charset='utf-8'):
|
|||||||
|
|
||||||
|
|
||||||
def searchforalbum(albumid=None, new=False):
|
def searchforalbum(albumid=None, new=False):
|
||||||
foundNZB = "none"
|
|
||||||
if (headphones.NZBMATRIX or headphones.NEWZNAB or headphones.NZBSORG or headphones.NEWZBIN) and (headphones.SAB_HOST or headphones.BLACKHOLE):
|
if not albumid:
|
||||||
foundNZB = searchNZB(albumid, new)
|
|
||||||
|
|
||||||
if foundNZB == "none":
|
myDB = db.DBConnection()
|
||||||
searchTorrent(albumid, new)
|
|
||||||
|
results = myDB.select('SELECT AlbumID from albums WHERE Status="Wanted"')
|
||||||
|
new = True
|
||||||
|
|
||||||
|
for result in results:
|
||||||
|
foundNZB = "none"
|
||||||
|
if (headphones.NZBMATRIX or headphones.NEWZNAB or headphones.NZBSORG or headphones.NEWZBIN) and (headphones.SAB_HOST or headphones.BLACKHOLE):
|
||||||
|
foundNZB = searchNZB(result['AlbumID'], new)
|
||||||
|
|
||||||
|
if foundNZB == "none":
|
||||||
|
searchTorrent(result['AlbumID'], new)
|
||||||
|
|
||||||
|
else:
|
||||||
|
|
||||||
|
foundNZB = "none"
|
||||||
|
if (headphones.NZBMATRIX or headphones.NEWZNAB or headphones.NZBSORG or headphones.NEWZBIN) and (headphones.SAB_HOST or headphones.BLACKHOLE):
|
||||||
|
foundNZB = searchNZB(albumid, new)
|
||||||
|
|
||||||
|
if foundNZB == "none":
|
||||||
|
searchTorrent(albumid, new)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user