diff --git a/auxiliary/malojalib/pyproject.toml b/auxiliary/malojalib/pyproject.toml index 0b2eb1a..de4ca35 100644 --- a/auxiliary/malojalib/pyproject.toml +++ b/auxiliary/malojalib/pyproject.toml @@ -21,7 +21,6 @@ dependencies = [ "requests" ] -[project.scripts] [build-system] requires = ["flit_core >=3.2,<4"] diff --git a/maloja/database/sqldb.py b/maloja/database/sqldb.py index 549d06a..39957ed 100644 --- a/maloja/database/sqldb.py +++ b/maloja/database/sqldb.py @@ -201,7 +201,6 @@ def artist_db_to_dict(row): ### DICT -> DB -# TODO def scrobble_dict_to_db(info): return { diff --git a/maloja/images.py b/maloja/images.py index 757be39..ba399f7 100644 --- a/maloja/images.py +++ b/maloja/images.py @@ -58,7 +58,7 @@ def get_image_from_cache(id,table): return None # no cache entry def set_image_in_cache(id,table,url): - #remove_image_from_cache(id,table) + remove_image_from_cache(id,table) now = int(datetime.datetime.now().timestamp()) if url is None: expire = now + (malojaconfig["CACHE_EXPIRE_NEGATIVE"] * 24 * 3600) @@ -73,7 +73,7 @@ def set_image_in_cache(id,table,url): url=url, expire=expire, raw=raw - ).on_conflict_do_update() + ) result = conn.execute(op) def remove_image_from_cache(id,table): diff --git a/maloja/jinjaenv/context.py b/maloja/jinjaenv/context.py index b818dde..48356e7 100644 --- a/maloja/jinjaenv/context.py +++ b/maloja/jinjaenv/context.py @@ -36,7 +36,6 @@ def update_jinja_environment(): # external "urllib": urllib, "math":math, - "print":print, # TODO: remove this # config "ranges": [ ('day','7 days',malojatime.today().next(-6),'day',7), diff --git a/maloja/web/static/js/manualscrobble.js b/maloja/web/static/js/manualscrobble.js index 70211cc..1ae55de 100644 --- a/maloja/web/static/js/manualscrobble.js +++ b/maloja/web/static/js/manualscrobble.js @@ -83,8 +83,8 @@ function scrobble(artists,title) { function scrobbledone(req) { result = req.response; - txt = result["scrobble"]["track"]["title"] + " by " + result["scrobble"]["track"]["artists"][0]; - if (result["scrobble"]["track"]["artists"].length > 1) { + txt = result["track"]["title"] + " by " + result["track"]["artists"][0]; + if (result["track"]["artists"].length > 1) { txt += " et al."; } document.getElementById("notification").innerHTML = "Scrobbled " + txt + "!";