Skip to content
This repository has been archived by the owner on Dec 30, 2020. It is now read-only.

Commit

Permalink
Merge pull request #82 from Alaanor/fix-playlist-thumbnail-on-adding-…
Browse files Browse the repository at this point in the history
…song

Do no remove the playlist thumbnail when adding songs
  • Loading branch information
Alaanor committed Dec 30, 2020
2 parents 1dd962f + e1968c9 commit 60e67be
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/libraries/playlist/loader/PlaylistLoader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ export default class PlaylistLoader {
const noPathError = new Error("this playlist doesn't contain a path");
if (playlist.path === undefined) throw noPathError;

if (playlist.cover === null) {
playlist.cover = await PlaylistLoader.LoadCover(playlist.path);
}

format = format ?? playlist.format;
await this.SaveAt(playlist.path, playlist, format);

Expand Down

0 comments on commit 60e67be

Please sign in to comment.