mirror of
https://github.com/gabehf/Koito.git
synced 2026-04-22 12:01:52 -07:00
fix: nil pointer panic
This commit is contained in:
parent
0ec7b458cc
commit
13566e58a2
2 changed files with 3 additions and 3 deletions
|
|
@ -12,7 +12,7 @@ import (
|
|||
"github.com/gabehf/koito/internal/cfg"
|
||||
"github.com/gabehf/koito/internal/db"
|
||||
"github.com/gabehf/koito/internal/logger"
|
||||
"github.com/gabehf/koito/internal/mbz"
|
||||
mbz "github.com/gabehf/koito/internal/mbz"
|
||||
)
|
||||
|
||||
type SpotifyExportItem struct {
|
||||
|
|
@ -24,7 +24,7 @@ type SpotifyExportItem struct {
|
|||
MsPlayed int32 `json:"ms_played"`
|
||||
}
|
||||
|
||||
func ImportSpotifyFile(ctx context.Context, store db.DB, filename string) error {
|
||||
func ImportSpotifyFile(ctx context.Context, store db.DB, mbzc mbz.MusicBrainzCaller, filename string) error {
|
||||
l := logger.FromContext(ctx)
|
||||
l.Info().Msgf("Beginning spotify import on file: %s", filename)
|
||||
file, err := os.Open(path.Join(cfg.ConfigDir(), "import", filename))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue