diff --git a/README.md b/README.md index 185e2df..0f75059 100644 --- a/README.md +++ b/README.md @@ -50,7 +50,7 @@ I can support you with issues best if you use **Alpine Linux**. In my experience 1) Make sure you have Python 3.5 or higher installed. You also need some basic packages that should be present on most systems, but I've provided simple shell scripts for Alpine and Ubuntu to get everything you need. -2) If you'd like to display images, you will need API keys for [Last.fm](https://www.last.fm/api/account/create) and [Fanart.tv](https://fanart.tv/get-an-api-key/) (you need a project key, not a personal one). These are free of charge! +2) If you'd like to display images, you will need some free API keys - check the settings for details! 3) Download Maloja with the command `pip install malojaserver`. Make sure to use the correct python version (Use `pip3` if necessary). @@ -74,6 +74,8 @@ I can support you with issues best if you use **Alpine Linux**. In my experience There is a Dockerfile in the repo that should work by itself. You can also use the unofficial [Dockerhub repository](https://hub.docker.com/r/foxxmd/maloja) kindly provided by FoxxMD. +You might want to set the environment variables `MALOJA_DEFAULT_PASSWORD`, `MALOJA_SKIP_SETUP` and `MALOJA_DATA_DIRECTORY`. + ## How to use @@ -141,7 +143,7 @@ It is recommended to define a different API key for every scrobbler you use in ` ### Manual -If you can't automatically scrobble your music, you can always do it manually on the `/manual` page of your Maloja server. +If you can't automatically scrobble your music, you can always do it manually on the `/admin_manual` page of your Maloja server. ## How to extend diff --git a/maloja/__pkginfo__.py b/maloja/__pkginfo__.py index 317c320..dae82f8 100644 --- a/maloja/__pkginfo__.py +++ b/maloja/__pkginfo__.py @@ -15,7 +15,7 @@ links = { requires = [ "bottle>=0.12.16", "waitress>=1.3", - "doreah>=1.6.8", + "doreah>=1.6.9", "nimrodel>=0.6.3", "setproctitle>=1.1.10", "wand>=0.5.4", diff --git a/maloja/proccontrol/setup.py b/maloja/proccontrol/setup.py index c123a78..7f1343c 100644 --- a/maloja/proccontrol/setup.py +++ b/maloja/proccontrol/setup.py @@ -23,11 +23,12 @@ def copy_initial_local_files(): #shutil.copy(folder,DATA_DIR) dir_util.copy_tree(folder,datadir(),update=False) +charset = list(range(10)) + list("abcdefghijklmnopqrstuvwxyz") + list("ABCDEFGHIJKLMNOPQRSTUVWXYZ") def randomstring(length=32): import random key = "" for i in range(length): - key += str(random.choice(list(range(10)) + list("abcdefghijklmnopqrstuvwxyz") + list("ABCDEFGHIJKLMNOPQRSTUVWXYZ"))) + key += str(random.choice(charset)) return key def setup(): diff --git a/maloja/server.py b/maloja/server.py index 66d1b80..7d28c97 100755 --- a/maloja/server.py +++ b/maloja/server.py @@ -178,6 +178,10 @@ def static(name,ext): return response +aliases = { + "admin": "admin_overview", + "manual": "admin_manual" +} @@ -231,6 +235,7 @@ def static_html_public(name): return static_html(name) def static_html(name): + if name in aliases: redirect(aliases[name]) linkheaders = ["; rel=preload; as=style"] keys = remove_identical(FormsDict.decode(request.query))