Skip to content
Snippets Groups Projects
Commit f0c89b75 authored by ale's avatar ale
Browse files

show album art / fixes

parent 67a9aa15
Branches
No related tags found
No related merge requests found
......@@ -223,11 +223,12 @@ def download_song(sha1):
return response
def run_frontend(port, storage_dir, solr_url, db_url, lastfm_api_key):
def run_frontend(port, storage_dir, solr_url, db_url, lastfm_api_key,
album_art_dir):
global storage_root, searcher, album_images
storage_root = storage_dir
searcher = search.Searcher(solr_url)
album_images = AlbumImageRetriever(lastfm_api_key)
album_images = AlbumImageRetriever(lastfm_api_key, album_art_dir)
init_db(db_url)
from gevent.wsgi import WSGIServer
......@@ -242,6 +243,7 @@ def main():
parser.add_option('--storage_dir')
parser.add_option('--db_url')
parser.add_option('--lastfm_api_key')
parser.add_option('--album_art_dir', default='/var/tmp/album-image-cache')
daemonize.add_standard_options(parser)
utils.read_config_defaults(
parser, os.getenv('DJRANDOM_CONF', '/etc/djrandom.conf'))
......@@ -255,7 +257,7 @@ def main():
daemonize.daemonize(opts, run_frontend,
(opts.port, opts.storage_dir, opts.solr_url,
opts.db_url, opts.lastfm_api_key),
opts.db_url, opts.lastfm_api_key, opts.album_art_dir),
support_gevent=True)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment