diff --git a/maloja/apis/native_v1.py b/maloja/apis/native_v1.py index 5e18da6..ac3cd98 100644 --- a/maloja/apis/native_v1.py +++ b/maloja/apis/native_v1.py @@ -227,9 +227,10 @@ def post_scrobble(artist:Multi,**keys): album = keys.get("album") duration = keys.get("seconds") time = keys.get("time") + nofix = keys.get("nofix") is not None if time is not None: time = int(time) - return incoming_scrobble(artists,title,album=album,duration=duration,time=time) + return incoming_scrobble(artists,title,album=album,duration=duration,time=time,fix=not nofix) diff --git a/maloja/database.py b/maloja/database.py index c0c82e8..544a2a4 100644 --- a/maloja/database.py +++ b/maloja/database.py @@ -566,13 +566,13 @@ def compare(remoteurl): } -def incoming_scrobble(artists,title,album=None,duration=None,time=None): - artists = "/".join(artists) +def incoming_scrobble(artists,title,album=None,duration=None,time=None,fix=True): if time is None: time = int(datetime.datetime.now(tz=datetime.timezone.utc).timestamp()) log("Incoming scrobble (): ARTISTS: " + str(artists) + ", TRACK: " + title,module="debug") - (artists,title) = cla.fullclean(artists,title) + if fix: + (artists,title) = cla.fullclean("/".join(artists),title) trackdict = createScrobble(artists,title,time,album,duration) sync() diff --git a/maloja/web/jinja/track.jinja b/maloja/web/jinja/track.jinja index 8da962f..56b6561 100644 --- a/maloja/web/jinja/track.jinja +++ b/maloja/web/jinja/track.jinja @@ -7,7 +7,7 @@ {% endblock %}