importer

package
v0.1.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 24, 2026 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ImportKoitoFile added in v0.0.10

func ImportKoitoFile(ctx context.Context, store db.DB, filename string) error

func ImportLastFMFile

func ImportLastFMFile(ctx context.Context, store db.DB, mbzc mbz.MusicBrainzCaller, filename string) error

func ImportListenBrainzExport

func ImportListenBrainzExport(ctx context.Context, store db.DB, mbzc mbz.MusicBrainzCaller, filename string) error

func ImportListenBrainzFile

func ImportListenBrainzFile(ctx context.Context, store db.DB, mbzc mbz.MusicBrainzCaller, r io.Reader, filename string) error

func ImportMalojaFile

func ImportMalojaFile(ctx context.Context, store db.DB, filename string) error

func ImportSpotifyFile

func ImportSpotifyFile(ctx context.Context, store db.DB, filename string) error

Types

type LastFMDate

type LastFMDate struct {
	Unix string `json:"uts"`
	Text string `json:"#text"`
}

type LastFMExportPage

type LastFMExportPage struct {
	Track []LastFMTrack `json:"track"`
}

type LastFMImage

type LastFMImage struct {
	Size string `json:"size"`
	Url  string `json:"#text"`
}

type LastFMItem

type LastFMItem struct {
	MBID string `json:"mbid"`
	Text string `json:"#text"`
}

type LastFMTrack

type LastFMTrack struct {
	Artist LastFMItem    `json:"artist"`
	Images []LastFMImage `json:"image"`
	MBID   string        `json:"mbid"`
	Album  LastFMItem    `json:"album"`
	Name   string        `json:"name"`
	Date   LastFMDate    `json:"date"`
}

type MalojaExport

type MalojaExport struct {
	Scrobbles []MalojaExportItem `json:"scrobbles"`
}

type MalojaExportItem

type MalojaExportItem struct {
	Time  int64       `json:"time"`
	Track MalojaTrack `json:"track"`
}

type MalojaTrack

type MalojaTrack struct {
	Artists []string `json:"artists"`
	Title   string   `json:"title"`
	Album   struct {
		Title string `json:"albumtitle"`
	} `json:"album"`
}

type SpotifyExportItem

type SpotifyExportItem struct {
	Timestamp  time.Time `json:"ts"`
	TrackName  string    `json:"master_metadata_track_name"`
	ArtistName string    `json:"master_metadata_album_artist_name"`
	AlbumName  string    `json:"master_metadata_album_album_name"`
	ReasonEnd  string    `json:"reason_end"`
	MsPlayed   int32     `json:"ms_played"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL