Add methods to Playlist model

Also, don't load genres for Playlists tracks (not necessary for now)
This commit is contained in:
Deluan 2021-10-16 22:44:44 -04:00 committed by Deluan Quintão
parent d200933b68
commit c72add516a
7 changed files with 102 additions and 53 deletions

View file

@ -59,7 +59,7 @@ func (a *archiver) ZipPlaylist(ctx context.Context, id string, out io.Writer) er
log.Error(ctx, "Error loading mediafiles from playlist", "id", id, err)
return err
}
return a.zipTracks(ctx, id, out, pls.Tracks, a.createPlaylistHeader)
return a.zipTracks(ctx, id, out, pls.MediaFiles(), a.createPlaylistHeader)
}
func (a *archiver) zipTracks(ctx context.Context, id string, out io.Writer, mfs model.MediaFiles, ch createHeader) error {