sonda/internal/storage
Repository files (latest commit first)
Filename Latest commit message Latest commit date
tgiachi c08a234159 feat(import): bring my Spotify history and playlists in
I want my listening history and my playlists from Spotify in Sonda, so that Mixes, Discover and the smart playlists know what I listened to before.

- POST /me/import/spotify takes the zip of a Spotify data export, or the JSON files in it (extended streaming history, the older StreamingHistory files, the playlists), as a multipart form. A request may be up to 512 MB; the zip is limited in how much it may inflate and how many files it may hold, and only the history and playlist files are opened.
- Everything is read on the server and nothing is sent anywhere. The files are not kept, and of each play only the song, artist, album, time and how it ended are read: never the IP addresses, the country or the platform.
- A play is matched to a song of the library by artist and title (no case, accents or punctuation; a "Remastered" note on either side; any credited artist; a compilation by its album). A match is recorded as a listen at the time of the play: complete, skip or play. Nothing is posted to Mastodon.
- Importing the same files again records nothing twice, and the same play in the two shapes of history file is counted once. One import per person at a time.
- A playlist becomes a playlist of mine with the songs that were found; one with a name I already have is left alone, and one with none of its songs found is not made.
- The report counts what was added, what was already there and what is not in the library, and lists the missing artists, most played first.
- Settings gets an Import from Spotify section; the API client can send files.
- English and Italian.
2026-11-14 16:25:58 +01:00
..
about_test.go feat(about): artist descriptions from Wikipedia 2026-11-11 21:36:27 +01:00
artist_jobs.go feat(jobs): background jobs for artist photos and descriptions 2026-11-12 09:58:45 +01:00
artist_jobs_test.go feat(jobs): background jobs for artist photos and descriptions 2026-11-12 09:58:45 +01:00
auth_test.go feat(auth): accounts are identified by an email address 2026-11-12 14:40:33 +01:00
catalog.go feat(import): bring my Spotify history and playlists in 2026-11-14 16:25:58 +01:00
catalog_test.go feat: Recently added on Home, with a newest-first order for albums 2026-11-14 10:29:08 +01:00
discovery.go feat(search): search ignores accents 2026-11-12 10:17:21 +01:00
discovery_test.go fix(discovery): purge lock, cleanup chains and rescans that cannot read 2026-11-11 17:36:14 +01:00
duplicates.go fix(duplicates): move the playlist items of a removed copy to the one that stays 2026-11-12 17:01:36 +01:00
duplicates_test.go fix(duplicates): move the playlist items of a removed copy to the one that stays 2026-11-12 17:01:36 +01:00
federation.go feat(federation): shared libraries and the signed read API for friends 2026-11-13 15:04:07 +01:00
federation_test.go feat(federation): shared libraries and the signed read API for friends 2026-11-13 15:04:07 +01:00
feedback.go fix(feedback): purge only what the provider named, no leak between users 2026-11-11 20:18:04 +01:00
feedback_test.go fix(feedback): purge only what the provider named, no leak between users 2026-11-11 20:18:04 +01:00
images.go feat(images): find the cover of an album that has no MusicBrainz id 2026-11-12 16:22:02 +01:00
images_test.go feat(images): find the cover of an album that has no MusicBrainz id 2026-11-12 16:22:02 +01:00
library.go feat(player): play every song at a similar volume with ReplayGain 2026-11-14 16:02:23 +01:00
library_test.go feat(player): play every song at a similar volume with ReplayGain 2026-11-14 16:02:23 +01:00
listening.go feat(import): bring my Spotify history and playlists in 2026-11-14 16:25:58 +01:00
mastodon.go feat(mastodon): say in Settings when the instance no longer accepts the token 2026-11-14 10:04:07 +01:00
mastodon_test.go feat(mastodon): say in Settings when the instance no longer accepts the token 2026-11-14 10:04:07 +01:00
mixes.go feat(mixes): a picture for each mix, a collage of album covers 2026-11-13 09:58:04 +01:00
mixes_test.go feat(mixes): a picture for each mix, a collage of album covers 2026-11-13 09:58:04 +01:00
naming.go feat(naming): an admin section that shows what Claude costs 2026-11-13 11:14:45 +01:00
naming_test.go feat(naming): an admin section that shows what Claude costs 2026-11-13 11:14:45 +01:00
playlists.go feat: playlists with a cover, a collage of the covers of their albums 2026-11-13 11:32:01 +01:00
playlists_test.go feat: playlists with a cover, a collage of the covers of their albums 2026-11-13 11:32:01 +01:00
providers.go feat(lidarr): set up Lidarr as a provider and read what it offers 2026-11-12 11:04:53 +01:00
providers_test.go feat(lidarr): set up Lidarr as a provider and read what it offers 2026-11-12 11:04:53 +01:00
refresh.go fix(auth): close session races found in review 2026-11-11 12:45:06 +01:00
repos_test.go feat(auth): accounts are identified by an email address 2026-11-12 14:40:33 +01:00
search_key.go feat(import): bring my Spotify history and playlists in 2026-11-14 16:25:58 +01:00
search_keys_test.go perf(storage): fix stale match and search keys in batches on PostgreSQL 2026-11-12 14:08:40 +01:00
sharing_test.go feat(federation): shared libraries and the signed read API for friends 2026-11-13 15:04:07 +01:00
smart.go feat(smart): smart playlists by the year a song came out 2026-11-14 10:19:39 +01:00
smart_test.go feat(smart): smart playlists by the year a song came out 2026-11-14 10:19:39 +01:00
spotify_import_test.go feat(import): bring my Spotify history and playlists in 2026-11-14 16:25:58 +01:00
storage.go fix(discovery): concurrent writes, adopted artists and a client that leaves 2026-11-11 16:47:33 +01:00
storage_test.go feat(player): play every song at a similar volume with ReplayGain 2026-11-14 16:02:23 +01:00
taste.go fix(taste): order by the score, clamp future events, keep tags short 2026-11-11 18:52:08 +01:00
taste_test.go fix(taste): order by the score, clamp future events, keep tags short 2026-11-11 18:52:08 +01:00
upgrade_test.go fix(library): make the libraries upgrade and validation robust 2026-11-11 13:34:44 +01:00
users.go feat(auth): accounts are identified by an email address 2026-11-12 14:40:33 +01:00
usersettings.go fix(settings): strict body, deleted-account race, doc wording 2026-11-11 19:20:42 +01:00
usersettings_test.go fix(settings): strict body, deleted-account race, doc wording 2026-11-11 19:20:42 +01:00
waveform.go feat: the seek bar shows the waveform of the track 2026-11-13 17:35:00 +01:00
waveform_test.go feat: the seek bar shows the waveform of the track 2026-11-13 17:35:00 +01:00