From fd98828cd19a74326989acac7360cfbda5c7e72e Mon Sep 17 00:00:00 2001 From: Remy Date: Mon, 11 Jul 2011 12:56:59 -0700 Subject: [PATCH] Fixed redirect issues when http_root is specified --- webServer.py | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/webServer.py b/webServer.py index f1654abf..72b23118 100644 --- a/webServer.py +++ b/webServer.py @@ -173,7 +173,7 @@ class Headphones: page.append('''Search returned multiple artists. Click the artist you want to add:

''') for result in artistResults: artist = result.artist - page.append('''%s (more info)
''' % (u.extractUuid(artist.id), artist.name, u.extractUuid(artist.id))) + page.append('''%s (more info)
''' % (u.extractUuid(artist.id), artist.name, u.extractUuid(artist.id))) return page else: for result in artistResults: @@ -239,7 +239,7 @@ class Headphones: conn.commit() c.close() - raise cherrypy.HTTPRedirect("/") + raise cherrypy.HTTPRedirect("home") addArtist.exposed = True @@ -251,7 +251,7 @@ class Headphones: c.execute('UPDATE artists SET status = "Paused" WHERE ArtistId="%s"' % ArtistID) conn.commit() c.close() - raise cherrypy.HTTPRedirect("/") + raise cherrypy.HTTPRedirect("home") pauseArtist.exposed = True @@ -262,7 +262,7 @@ class Headphones: c.execute('UPDATE artists SET status = "Active" WHERE ArtistId="%s"' % ArtistID) conn.commit() c.close() - raise cherrypy.HTTPRedirect("/") + raise cherrypy.HTTPRedirect("home") resumeArtist.exposed = True @@ -275,7 +275,7 @@ class Headphones: c.execute('''DELETE from tracks WHERE ArtistID="%s"''' % ArtistID) conn.commit() c.close() - raise cherrypy.HTTPRedirect("/") + raise cherrypy.HTTPRedirect("home") deleteArtist.exposed = True @@ -288,7 +288,7 @@ class Headphones: c.close() import searcher searcher.searchNZB(AlbumID) - raise cherrypy.HTTPRedirect("/artistPage?ArtistID=%s" % ArtistID) + raise cherrypy.HTTPRedirect("artistPage?ArtistID=%s" % ArtistID) queueAlbum.exposed = True @@ -299,7 +299,7 @@ class Headphones: c.execute('UPDATE albums SET status = "Skipped" WHERE AlbumID="%s"' % AlbumID) conn.commit() c.close() - raise cherrypy.HTTPRedirect("/artistPage?ArtistID=%s" % ArtistID) + raise cherrypy.HTTPRedirect("artistPage?ArtistID=%s" % ArtistID) unqueueAlbum.exposed = True @@ -377,19 +377,19 @@ class Headphones: config.write() import itunesimport itunesimport.itunesImport(path) - raise cherrypy.HTTPRedirect("/") + raise cherrypy.HTTPRedirect("home") importItunes.exposed = True def forceUpdate(self): import updater updater.dbUpdate() - raise cherrypy.HTTPRedirect("/") + raise cherrypy.HTTPRedirect("home") forceUpdate.exposed = True def forceSearch(self): import searcher searcher.searchNZB() - raise cherrypy.HTTPRedirect("/") + raise cherrypy.HTTPRedirect("home") forceSearch.exposed = True @@ -491,7 +491,7 @@ class Headphones: configs.write() reload(config) - raise cherrypy.HTTPRedirect("/config") + raise cherrypy.HTTPRedirect("config") configUpdate.exposed = True