From a3d203323b9773a0dac696ef9a80cd81c4574de4 Mon Sep 17 00:00:00 2001 From: Narazaka Date: Sun, 15 Oct 2023 18:53:49 +0900 Subject: [PATCH] avoid deleted / private video (fetch YouTube playlist) --- .../idv.jlchntoz.vvmw/Editor/VVMW/PlayListEditorWindow.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Packages/idv.jlchntoz.vvmw/Editor/VVMW/PlayListEditorWindow.cs b/Packages/idv.jlchntoz.vvmw/Editor/VVMW/PlayListEditorWindow.cs index e861d94..f66193e 100644 --- a/Packages/idv.jlchntoz.vvmw/Editor/VVMW/PlayListEditorWindow.cs +++ b/Packages/idv.jlchntoz.vvmw/Editor/VVMW/PlayListEditorWindow.cs @@ -701,7 +701,7 @@ void LoadEntries(JsonData entries) { async UniTask FetchPlayList(string url) { var ytPlaylist = await YtdlpResolver.GetPlayLists(url); var playList = GetOrCreatePlayList("Imported Play List"); - foreach (var entry in ytPlaylist) + foreach (var entry in ytPlaylist.Where(e => e.title != "[Deleted video]" && e.title != "[Private video]")) playList.entries.Add(new PlayListEntry { title = entry.title, url = entry.url, @@ -742,4 +742,4 @@ struct PlayListEntry { public int playerIndex; } } -} \ No newline at end of file +}