feat(import): keep the artist and the time of plays of artists I do not have

The plays of songs that are not in the library were only counted. Now, when
such a play counts as listened (not a skip, long enough), its artist and its
time are kept in a new table (migration 0031, outside_plays), so a model can
later learn which artists are played together, also those not in the library.
No title, album, IP address, country or platform is stored. The same play is
kept once however many times the export is imported, and the report says how
many were kept (history.kept_outside).
This commit is contained in:
tgiachi 2026-11-15 10:50:29 +01:00
commit 3ba087bcc5

View file

@ -312,7 +312,7 @@ func run() error {
Discover: discover.NewService(tasteService, discoveries, tags, tasteRepo, userSettings, feedbacks, weights),
Feedback: feedbacks,
Playlists: playlistSvc,
SpotifyImport: spotifyimport.NewService(storage.NewCatalogRepo(db), storage.NewListeningRepo(db), playlistSvc, storage.NewSpotifyImportRepo(db), storage.SearchKey, cfg.Listening.MinListen()),
SpotifyImport: spotifyimport.NewService(storage.NewCatalogRepo(db), storage.NewListeningRepo(db), playlistSvc, storage.NewSpotifyImportRepo(db), storage.NewOutsidePlayRepo(db), storage.SearchKey, cfg.Listening.MinListen()),
Mixes: mixes.NewService(storage.NewMixRepo(db), tasteService, cfg.Listening.MinListen()),
Smart: smart.NewService(storage.NewSmartRepo(db), tasteService, cfg.Listening.MinListen()),
Naming: namingService,