Skip to content

Commit

Permalink
avoid deleted / private video (fetch YouTube playlist)
Browse files Browse the repository at this point in the history
  • Loading branch information
Narazaka authored Oct 15, 2023
1 parent 7bca7d2 commit a3d2033
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -742,4 +742,4 @@ struct PlayListEntry {
public int playerIndex;
}
}
}
}

0 comments on commit a3d2033

Please sign in to comment.