def post(self):
to = self.get_body_argument("to", False)
if to:
destination_uri = os.path.join(self.config['auto']['base_path'], to)
destination_path = urllib.url2pathname(urlparse.urlparse(destination_uri.split('file://')[1]).path)
logger.info("Moving '{}' to '{}'".format(self.album_path, destination_path))
self.core.tracklist.clear()
try:
shutil.move(self.album_path, destination_path)
logger.info("Moved album '{}' to '{}'".format(self.album_path, destination_path))
except shutil.Error:
logger.error("Could not move album '{}' to '{}'".format(self.album_path, destination_path), exc_info=1)
else:
logger.error('Destination not supplied, move canceled')
return self.redirect('/auto')
评论列表
文章目录