Refactor common code from listenbrainz and lastfm scrobblers (#2042)
authorIan Campbell <ijc@users.noreply.github.com>
Sun, 16 Mar 2025 10:40:55 +0000 (10:40 +0000)
committerGitHub <noreply@github.com>
Sun, 16 Mar 2025 10:40:55 +0000 (11:40 +0100)
commitcefac1aee31254ee5eb6ec8458e782c80b35de6d
tree097eaff20cc259d8e250c905867311b38225dcef
parentdfd51b9e2c0c2e8b8b0cd7fa2fe3ac69d94d50c1
Refactor common code from listenbrainz and lastfm scrobblers (#2042)

Pull the common code from `LastFMEventHandler` into a common base class and use
it for `ListenBrainzEventHandler` too.

This puts all the logic for deciding when to scrobble into a single place.
music_assistant/helpers/__init__.py
music_assistant/helpers/scrobbler.py [new file with mode: 0644]
music_assistant/providers/lastfm_scrobble/__init__.py
music_assistant/providers/listenbrainz_scrobble/__init__.py
tests/core/test_scrobbler.py [new file with mode: 0644]
tests/providers/lastfm_scrobble/test_events.py [deleted file]