Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
djrandom-py
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ale
djrandom-py
Commits
f0c89b75
Commit
f0c89b75
authored
13 years ago
by
ale
Browse files
Options
Downloads
Patches
Plain Diff
show album art / fixes
parent
67a9aa15
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
server/djrandom/frontend/frontend.py
+5
-3
5 additions, 3 deletions
server/djrandom/frontend/frontend.py
with
5 additions
and
3 deletions
server/djrandom/frontend/frontend.py
+
5
−
3
View file @
f0c89b75
...
...
@@ -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
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment