From 673acf3ac4a5d3ea069c0fdcc7486c1fae973d98 Mon Sep 17 00:00:00 2001 From: Anonymus Raccoon <32224410+AnonymusRaccoon@users.noreply.github.com> Date: Wed, 26 Jun 2019 13:47:46 +0200 Subject: [PATCH] Solving a bug with the add to playlist for local items witch have also a youtube id. --- Opus/Code/Api/PlaylistManager.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Opus/Code/Api/PlaylistManager.cs b/Opus/Code/Api/PlaylistManager.cs index 2910128..cd7f4b5 100644 --- a/Opus/Code/Api/PlaylistManager.cs +++ b/Opus/Code/Api/PlaylistManager.cs @@ -928,7 +928,7 @@ namespace Opus.Api { AddToLocalPlaylist(playlistID, items); //Will only add files already downloaded #pragma warning disable CS4014 // Because this call is not awaited, execution of the current method continues before the call is completed - YoutubeManager.DownloadFiles(items.ToList().ConvertAll(x => DownloadFile.From(x, name))); //Will download missing files and add them (if there was youtube songs in the items array. + YoutubeManager.DownloadFiles(items.Where(x => x.LocalID == -1 || x.LocalID == 0).ToList().ConvertAll(x => DownloadFile.From(x, name))); //Will download missing files and add them (if there was youtube songs in the items array). #pragma warning restore CS4014 // Because this call is not awaited, execution of the current method continues before the call is completed } }