jesseward / jellyfin-plugin-lastfm

LastFM plugin for the Jellyfin media system. Fork of the Emby Last.FM plug-in
178 stars 11 forks source link

Fix LastFM Loved Tracks Sync #48

Closed jesseward closed 1 year ago

jesseward commented 1 year ago

Related

Summary

Moved from System.Runtime.Serialization to System.Text.json.Serialization json handling in API model responses.

This allows the scheduled task to fetch the my set of Last.FM loved tracks and matches against my JF library.

Also changed the way that the lovedtracks from LastFM are matched to the JellyFin library. There is an explicit check against the MusicbrainzID now. The existing logic that used the linq query was too greedy when matching songs.

[2023-06-04 16:53:08.713 -07:00] [INF] [23] Jellyfin.Plugin.Lastfm.ScheduledTasks.ImportLastfmData: Retrieved 214 lovedTracks from LastFM for user "..."
[2023-06-04 16:56:10.315 -07:00] [INF] [23] Jellyfin.Plugin.Lastfm.ScheduledTasks.ImportLastfmData: Finished Last.fm lovedTracks sync for "...". Matched Songs: 268
[2023-06-04 16:56:10.315 -07:00] [INF] [23] Emby.Server.Implementations.ScheduledTasks.TaskManager: "Import Last.fm Loved Tracks" Completed after 3 minute(s) and 2 seconds
[2023-06-04 16:56:10.316 -07:00] [INF] [23] Emby.Server.Implementations.ScheduledTasks.TaskManager: ExecuteQueuedTasks
jesseward commented 1 year ago

changed some behaviour to ensure that matching of the artist maps to the MusicBrainz ID. This fixes the problem(s) described in https://github.com/jesseward/jellyfin-plugin-lastfm/issues/40

[2023-06-10 20:50:41.694 +00:00] [INF] [28] Emby.Server.Implementations.ScheduledTasks.TaskManager: Executing "Import Last.fm Loved Tracks"
[2023-06-10 20:50:41.694 +00:00] [INF] [28] Jellyfin.Plugin.Lastfm.ScheduledTasks.ImportLastfmData: Syncing LastFM favourties for "test"
[2023-06-10 20:50:42.275 +00:00] [INF] [17] Jellyfin.Plugin.Lastfm.ScheduledTasks.ImportLastfmData: Retrieved 216 lovedTracks from LastFM for user "jw76"
[2023-06-10 20:50:42.275 +00:00] [INF] [17] Jellyfin.Plugin.Lastfm.ScheduledTasks.ImportLastfmData: User "test" has 171 loved tracks in last.fm that have an associated musicbrainz Artist id
[2023-06-10 20:50:42.278 +00:00] [INF] [17] Jellyfin.Plugin.Lastfm.ScheduledTasks.ImportLastfmData: Match Found: "Echomen"-"Orient" <== LastFM :: Library ==> "Echomen"-"Orient"
[2023-06-10 20:50:42.401 +00:00] [INF] [17] Jellyfin.Plugin.Lastfm.ScheduledTasks.ImportLastfmData: Finished Last.fm lovedTracks sync for "test". Matched Songs: 1
[2023-06-10 20:50:42.402 +00:00] [INF] [17] Emby.Server.Implementations.ScheduledTasks.TaskManager: "Import Last.fm Loved Tracks" Completed after 0 minute(s) and 0 seconds