libvideo icon indicating copy to clipboard operation
libvideo copied to clipboard

GetAllVideos not working

Open noammaoz508 opened this issue 7 months ago • 2 comments

I have upgraded to the new version the GetAllVideos function is not working. The following is my code: var url = "https://www.youtube.com/watch?v=Sf5XYmNlhpY"; var youtube = YouTube.Default; var videos = youtube.GetAllVideos(url).ToList(); var audios = videos.Where(video => video.AdaptiveKind == AdaptiveKind.Audio).OrderByDescending(video => video.AudioBitrate).ToList(); var audio = audios.First();

    if (audio != null && audio.Format == VideoFormat.Mp4) {
        var bSong = audio.GetBytes();
        MessageBox.Show("Audio File");
    } else {
        var video = youtube.GetVideo(url);
        var bSong = video.GetBytes();
        MessageBox.Show("video File");
    }

Getting the video only is working fine: var video = youtube.GetVideo(url); var bSong = video.GetBytes();

Any idea why it's not working?

noammaoz508 avatar Jul 10 '24 14:07 noammaoz508