Update headphones/webserve.py

This commit is contained in:
coolbombom
2011-11-04 17:57:40 +13:00
parent d6aeabdac2
commit 1ff0e7588f
+4 -4
View File
@@ -140,9 +140,9 @@ class WebInterface(object):
newValueDict = {'Status': newaction} newValueDict = {'Status': newaction}
myDB.upsert("albums", newValueDict, controlValueDict) myDB.upsert("albums", newValueDict, controlValueDict)
if action == 'Wanted': if action == 'Wanted':
searcher.searchNZB(mbid, new=False) searcher.searchforalbum(mbid, new=False)
if action == 'WantedNew': if action == 'WantedNew':
searcher.searchNZB(mbid, new=True) searcher.searchforalbum(mbid, new=True)
if ArtistID: if ArtistID:
raise cherrypy.HTTPRedirect("artistPage?ArtistID=%s" % ArtistID) raise cherrypy.HTTPRedirect("artistPage?ArtistID=%s" % ArtistID)
else: else:
@@ -161,7 +161,7 @@ class WebInterface(object):
controlValueDict = {'AlbumID': AlbumID} controlValueDict = {'AlbumID': AlbumID}
newValueDict = {'Status': 'Wanted'} newValueDict = {'Status': 'Wanted'}
myDB.upsert("albums", newValueDict, controlValueDict) myDB.upsert("albums", newValueDict, controlValueDict)
searcher.searchNZB(AlbumID, new) searcher.searchforalbum(AlbumID, new)
if ArtistID: if ArtistID:
raise cherrypy.HTTPRedirect("artistPage?ArtistID=%s" % ArtistID) raise cherrypy.HTTPRedirect("artistPage?ArtistID=%s" % ArtistID)
else: else:
@@ -271,7 +271,7 @@ class WebInterface(object):
def forceSearch(self): def forceSearch(self):
from headphones import searcher from headphones import searcher
threading.Thread(target=searcher.searchNZB).start() threading.Thread(target=searcher.searchforalbum).start()
time.sleep(5) time.sleep(5)
raise cherrypy.HTTPRedirect("home") raise cherrypy.HTTPRedirect("home")
forceSearch.exposed = True forceSearch.exposed = True