Fixed some stuff

This commit is contained in:
Remy
2011-08-16 15:02:06 -07:00
parent c866316c09
commit 91576e3f63
3 changed files with 8 additions and 4 deletions

View File

@@ -178,9 +178,9 @@ div#albumheader { padding-top: 48px; height: 200px; }
div#track_wrapper { margin-left: -50px; padding-top: 20px; font-size: 16px; width: 100%; }
table#track_table th#number { text-align: right; min-width: 10px; }
table#track_table th#name { text-align: center; min-width: 320px; }
table#track_table th#name { text-align: center; min-width: 300px; }
table#track_table th#duration { width: 175px; text-align: center; min-width: 100px; }
table#track_table th#location { text-align: center; min-width: 200px; }
table#track_table th#location { text-align: center; width: 200px; }
table#track_table th#bitrate { text-align: center; min-width: 75px; }
table#track_table td#number { vertical-align: middle; text-align: right; }

View File

@@ -5,6 +5,7 @@
<%def name="body()">
<div id="paddingheader">
<h1>Manage New Artists<h1>
<h3><a href="musicScan?path=${headphones.MUSIC_DIR}&redirect=manageNew">Scan Music Library</a></h3>
</div>
<form action="addArtists" method="get">
<p class="indented">

View File

@@ -236,7 +236,7 @@ class WebInterface(object):
raise cherrypy.HTTPRedirect("home")
importItunes.exposed = True
def musicScan(self, path):
def musicScan(self, path, redirect=None):
headphones.MUSIC_DIR = path
headphones.config_write()
try:
@@ -244,7 +244,10 @@ class WebInterface(object):
except Exception, e:
logger.error('Unable to complete the scan: %s' % e)
time.sleep(10)
raise cherrypy.HTTPRedirect("home")
if redirect:
raise cherrypy.HTTPRedirect(redirect)
else:
raise cherrypy.HTTPRedirect("home")
musicScan.exposed = True
def forceUpdate(self):