diff --git a/README.md b/README.md index 6a82797..f90742f 100644 --- a/README.md +++ b/README.md @@ -165,7 +165,6 @@ These solutions allow you to directly setup scrobbling to your Maloja server: * [Multi Scrobbler](https://github.com/FoxxMD/multi-scrobbler) Desktop Application * [Cmus-maloja-scrobbler](https://git.sr.ht/~xyank/cmus-maloja-scrobbler) Script * [OngakuKiroku](https://github.com/Atelier-Shiori/OngakuKiroku) Desktop Application (Mac) -* [Albula](https://github.com/krateng/albula) Music Server * [Maloja Scrobbler](https://chrome.google.com/webstore/detail/maloja-scrobbler/cfnbifdmgbnaalphodcbandoopgbfeeh) Chromium Extension (also included in the repository) for Plex Web, Spotify, Bandcamp, Soundcloud or Youtube Music ### Native API diff --git a/maloja/apis/native_v1.py b/maloja/apis/native_v1.py index d554731..4a53219 100644 --- a/maloja/apis/native_v1.py +++ b/maloja/apis/native_v1.py @@ -17,7 +17,7 @@ from ..globalconf import malojaconfig, data_dir from ..__pkginfo__ import VERSION from ..malojauri import uri_to_internal, compose_querystring, internal_to_uri -from .. import utilities +from .. import images from ._apikeys import api_key_correct, checkAPIkey from . import apikeystore @@ -343,7 +343,7 @@ def add_picture(b64,artist:Multi=[],title=None): if title is not None: keys.append("title",title) k_filter, _, _, _, _ = uri_to_internal(keys) if "track" in k_filter: k_filter = k_filter["track"] - utilities.set_image(b64,**k_filter) + images.set_image(b64,**k_filter) @api.post("newrule") diff --git a/maloja/cleanup.py b/maloja/cleanup.py index ff313f9..18420ea 100644 --- a/maloja/cleanup.py +++ b/maloja/cleanup.py @@ -1,5 +1,5 @@ import re -#from . import utilities +#from . import images from doreah import tsv from .globalconf import data_dir, malojaconfig diff --git a/maloja/database/__init__.py b/maloja/database/__init__.py index 41d1e26..dbd4211 100644 --- a/maloja/database/__init__.py +++ b/maloja/database/__init__.py @@ -3,7 +3,7 @@ from bottle import request, response, FormsDict, HTTPError # rest of the project from ..cleanup import CleanerAgent, CollectorAgent -from .. import utilities +from .. import images from ..malojatime import register_scrobbletime, time_stamps, ranges, alltime from ..malojauri import uri_to_internal, internal_to_uri, compose_querystring from ..thirdparty import proxy_scrobble_all diff --git a/maloja/globalconf.py b/maloja/globalconf.py index 895944d..135da01 100644 --- a/maloja/globalconf.py +++ b/maloja/globalconf.py @@ -272,8 +272,11 @@ data_directories = { "clients":pthj(dir_settings['config']), "settings":pthj(dir_settings['config']), "css":pthj(dir_settings['config'],"custom_css"), - "logs":pthj(dir_settings['logs']), - "cache":pthj(dir_settings['cache']), + + "config":dir_settings['config'], + "state":dir_settings['state'], + "logs":dir_settings['logs'], + "cache":dir_settings['cache'], } diff --git a/maloja/utilities/images.py b/maloja/images.py similarity index 98% rename from maloja/utilities/images.py rename to maloja/images.py index d0603a0..bb39ac7 100644 --- a/maloja/utilities/images.py +++ b/maloja/images.py @@ -1,6 +1,6 @@ -from ..globalconf import data_dir, malojaconfig -from .. import thirdparty -from .. import database +from .globalconf import data_dir, malojaconfig +from . import thirdparty +from . import database from doreah import caching from doreah.logging import log diff --git a/maloja/jinjaenv/context.py b/maloja/jinjaenv/context.py index 08e38f7..b818dde 100644 --- a/maloja/jinjaenv/context.py +++ b/maloja/jinjaenv/context.py @@ -1,7 +1,7 @@ from . import filters from ..globalconf import malojaconfig -from .. import database, malojatime, utilities, malojauri, thirdparty, __pkginfo__ +from .. import database, malojatime, images, malojauri, thirdparty, __pkginfo__ from ..database import jinjaview from doreah.regular import repeatdaily @@ -28,7 +28,7 @@ def update_jinja_environment(): "db": database, #TODO: move these to connection manager as well #"dbp":dbp, "malojatime": malojatime, - "utilities": utilities, + "images": images, "mlj_uri": malojauri, "settings": malojaconfig, "thirdparty": thirdparty, diff --git a/maloja/proccontrol/tasks/import_scrobbles.py b/maloja/proccontrol/tasks/import_scrobbles.py index 7a9a2a2..8520e1c 100644 --- a/maloja/proccontrol/tasks/import_scrobbles.py +++ b/maloja/proccontrol/tasks/import_scrobbles.py @@ -7,7 +7,7 @@ from doreah.io import col, ask from ...globalconf import data_dir from ...database.sqldb import add_scrobbles -#from ...utilities import * +#from ...images import * diff --git a/maloja/server.py b/maloja/server.py index 7eaaf03..2a16cff 100644 --- a/maloja/server.py +++ b/maloja/server.py @@ -19,7 +19,7 @@ from doreah import auth # rest of the project from . import database from .database.jinjaview import JinjaDBConnection -from .utilities import resolve_track_image, resolve_artist_image +from .images import resolve_track_image, resolve_artist_image from .malojauri import uri_to_internal, remove_identical from .globalconf import malojaconfig, data_dir from .jinjaenv.context import jinja_environment diff --git a/maloja/utilities/__init__.py b/maloja/utilities/__init__.py deleted file mode 100644 index a3bce12..0000000 --- a/maloja/utilities/__init__.py +++ /dev/null @@ -1 +0,0 @@ -from .images import * diff --git a/maloja/web/jinja/artist.jinja b/maloja/web/jinja/artist.jinja index 10439d7..f738c8b 100644 --- a/maloja/web/jinja/artist.jinja +++ b/maloja/web/jinja/artist.jinja @@ -39,10 +39,10 @@ {% if adminmode %}
{% else %} -