Skip to content

Commit

Permalink
Merge pull request #15 from Narazaka/patch-1
Browse files Browse the repository at this point in the history
avoid deleted / private video (fetch YouTube playlist)
  • Loading branch information
JLChnToZ authored Oct 15, 2023
2 parents 7422611 + a3d2033 commit e7ce5d0
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 e7ce5d0

Please sign in to comment.