PreCache Playlists CoverArt

This commit is contained in:
Deluan
2022-12-28 13:37:13 -05:00
committed by Deluan Quintão
parent 14032a524b
commit 0c7c6ba020
5 changed files with 34 additions and 12 deletions
+7
View File
@@ -73,3 +73,10 @@ func artworkIDFromMediaFile(mf MediaFile) ArtworkID {
ID: mf.ID,
}
}
func artworkIDFromPlaylist(pls Playlist) ArtworkID {
return ArtworkID{
Kind: KindPlaylistArtwork,
ID: pls.ID,
}
}
+4
View File
@@ -94,6 +94,10 @@ func (pls *Playlist) AddMediaFiles(mfs MediaFiles) {
}
}
func (pls Playlist) CoverArtID() ArtworkID {
return artworkIDFromPlaylist(pls)
}
type Playlists []Playlist
type PlaylistRepository interface {