diff --git a/internal/importer/lastfm.go b/internal/importer/lastfm.go index 2e457cc..6a4bb93 100644 --- a/internal/importer/lastfm.go +++ b/internal/importer/lastfm.go @@ -88,7 +88,7 @@ func ImportLastFMFile(ctx context.Context, store db.DB, mbzc mbz.MusicBrainzCall if err != nil { ts, err = time.Parse("02 Jan 2006, 15:04", track.Date.Text) if err != nil { - ts = time.Now() + ts = time.Now().UTC() } } else { ts = time.Unix(unix, 0).UTC() diff --git a/internal/importer/listenbrainz.go b/internal/importer/listenbrainz.go index 7e0df1a..19c81a3 100644 --- a/internal/importer/listenbrainz.go +++ b/internal/importer/listenbrainz.go @@ -22,12 +22,6 @@ import ( "github.com/google/uuid" ) -// first, unzip zip file with name "listenbrainz_username_unix.zip" -// then, enter the listens folder -// then, recursively traverse all files in folder -// then, import all .jsonl files found in folders -// then, cleanup folder recursively -// finally, move zip to complete dir func ImportListenBrainzExport(ctx context.Context, store db.DB, mbzc mbz.MusicBrainzCaller, filename string) error { l := logger.FromContext(ctx) diff --git a/internal/importer/spotify.go b/internal/importer/spotify.go index 25f24d0..6facce1 100644 --- a/internal/importer/spotify.go +++ b/internal/importer/spotify.go @@ -58,7 +58,7 @@ func ImportSpotifyFile(ctx context.Context, store db.DB, filename string) error TrackTitle: item.TrackName, ReleaseTitle: item.AlbumName, Duration: dur / 1000, - Time: item.Timestamp, + Time: item.Timestamp.UTC(), UserID: 1, } err = catalog.SubmitListen(ctx, store, opts)