mirror of
https://github.com/rembo10/headphones.git
synced 2026-07-21 08:24:00 +01:00
Minor code adjustments
This commit is contained in:
@@ -256,14 +256,14 @@ class WebInterface(object):
|
|||||||
|
|
||||||
@cherrypy.expose
|
@cherrypy.expose
|
||||||
def scanArtist(self, ArtistID):
|
def scanArtist(self, ArtistID):
|
||||||
logger.info(u"Scanning artist: " + ArtistID)
|
logger.info(u"Scanning artist: %s", ArtistID)
|
||||||
myDB = db.DBConnection()
|
myDB = db.DBConnection()
|
||||||
artistname=myDB.select('select distinct ArtistName from artists WHERE ArtistID=?', [ArtistID])
|
artistname = myDB.select('SELECT DISTINCT ArtistName FROM artists WHERE ArtistID=?', [ArtistID])
|
||||||
artistfolder= os.path.join(headphones.CONFIG.DESTINATION_DIR,artistname[0][0])
|
artistfolder = os.path.join(headphones.CONFIG.DESTINATION_DIR, artistname[0][0])
|
||||||
try:
|
try:
|
||||||
threading.Thread(target=librarysync.libraryScan(dir=artistfolder)).start()
|
threading.Thread(target=librarysync.libraryScan(dir=artistfolder)).start()
|
||||||
except Exception, e:
|
except Exception as e:
|
||||||
logger.error('Unable to complete the scan: %s' % e)
|
logger.error('Unable to complete the scan: %s', e)
|
||||||
raise cherrypy.HTTPRedirect("artistPage?ArtistID=%s" % ArtistID)
|
raise cherrypy.HTTPRedirect("artistPage?ArtistID=%s" % ArtistID)
|
||||||
|
|
||||||
@cherrypy.expose
|
@cherrypy.expose
|
||||||
|
|||||||
Reference in New Issue
Block a user