Closed DontEatOreo closed 1 year ago
It seems like the new yt-dlp version broke the jsonreader
I'm using version 1.0.0-beta2
1.0.0-beta2
Unhandled exception. Newtonsoft.Json.JsonReaderException: Input string '1.0' is not a valid integer. Path 'formats[3].quality', line 1, position 9500. ...
Sample Code:
using YoutubeDLSharp; using YoutubeDLSharp.Options; YoutubeDL youtubeDl = new() { YoutubeDLPath = "yt-dlp", FFmpegPath = "ffmpeg", OutputFolder = Path.GetTempPath(), OutputFileTemplate = "%(id)s.%(ext)s", }; const string url = "https://youtu.be/sca4VG9b0NY"; var videoDataFetch = await youtubeDl.RunVideoDataFetch(url, flat: true); var duration = videoDataFetch.Data.Duration; var tags = videoDataFetch.Data.Tags; Console.WriteLine($"Duration: {duration}"); Console.WriteLine($"Tags: {string.Join(", ", tags)}"); await youtubeDl.RunAudioDownload(url, AudioConversionFormat.Opus);
It seems like the new yt-dlp version broke the jsonreader
I'm using version
1.0.0-beta2
Sample Code: