You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The version key in the YoutubeDL class is not working as expected on Linux systems due to its use of FileVersionInfo.GetVersionInfo, which can have undesired behavior, like returning a empty string. A stable work-around would be to get the version output from the yt-dlp binary itself by running it with the --version argument when first creating the object and then save the value to a private version key that can later be read using the public version key as a GET; only.
As a workaround for others users, you can get the current yt-dlp version using this code (not async)
// Create a temporary yt-dlp procYoutubeDLProcesstemporaryYTDLPProc=newYoutubeDLProcess("yt-dlp path here");// Create a event handler to listen to the proc outputsEventHandler<DataReceivedEventArgs>outputHandler=(o,e)=>{// e.Data is the proc output, when running --version arg, the first and only output should be in yyyy.MM.dd format.};// Attach the event handler to the proctemporaryYTDLPProc.OutputReceived+=outputHandler;// Run the proc with the --version argument and wait for proc exittemporaryYTDLPProc.RunAsync(null,newOptionSet{Version=true}).Wait();// Detach the event handler to allow the GC to free memorytemporaryYTDLPProc.OutputReceived-=outputHandler;
The text was updated successfully, but these errors were encountered:
The
version
key in the YoutubeDL class is not working as expected on Linux systems due to its use ofFileVersionInfo.GetVersionInfo
, which can have undesired behavior, like returning a empty string. A stable work-around would be to get the version output from the yt-dlp binary itself by running it with the--version
argument when first creating the object and then save the value to a privateversion
key that can later be read using the publicversion
key as aGET;
only.As a workaround for others users, you can get the current yt-dlp version using this code (not async)
The text was updated successfully, but these errors were encountered: