mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-06-04 20:43:04 +00:00
Fix: All scrobbles were applied to the Last.fm account associated with user ID 1 (#434)
This commit is contained in:
committed by
GitHub
parent
7eb5c6bbc6
commit
ea76cf5dc2
@@ -78,7 +78,7 @@ def create_lastfm_session(body: LastFmSessionBody):
|
||||
if not body.token:
|
||||
return {"error": "Missing token"}, 400
|
||||
|
||||
lastfm = LastFmPlugin()
|
||||
lastfm = LastFmPlugin(current_userid=get_current_userid())
|
||||
session_key = lastfm.get_session_key(body.token)
|
||||
|
||||
if session_key:
|
||||
|
||||
@@ -37,6 +37,8 @@ from swingmusic.utils.stats import (
|
||||
get_artists_in_period,
|
||||
get_tracks_in_period,
|
||||
)
|
||||
from swingmusic.utils.auth import get_current_userid
|
||||
|
||||
|
||||
bp_tag = Tag(name="Logger", description="Log item plays")
|
||||
api = APIBlueprint("logger", __name__, url_prefix="/logger", abp_tags=[bp_tag])
|
||||
@@ -101,7 +103,7 @@ def log_track(body: LogTrackBody):
|
||||
trackentry.increment_playcount(duration, timestamp)
|
||||
track = trackentry.tracks[0]
|
||||
|
||||
lastfm = LastFmPlugin()
|
||||
lastfm = LastFmPlugin(current_userid=get_current_userid())
|
||||
|
||||
if (
|
||||
lastfm.enabled
|
||||
|
||||
Reference in New Issue
Block a user