StefanLobbenmeier / youtube-dl-gui

A cross-platform GUI for youtube-dl made in Electron and node.js
GNU Affero General Public License v3.0
1.4k stars 54 forks source link

Simple local path to binaries, manual update, error reporting on playlists #93

Open mnasty opened 9 months ago

mnasty commented 9 months ago

Is your feature request related to a problem? Please describe.

I spent about 2 hours reverse engineering the code from your duplicate dead repo (smh) after encountering an error due to an obsolete version of yt-dlp. Apparently google changed the way playlist ids work at some point.

The error only shows when the developer console is enabled inside the application viewer and fails silently to the user. It only shows a subset of the specific playlist that I was loading, as if it's simply missing data:

ERROR: [youtube] h8Ri_Fa6NCQ: Unable to extract uploader id; please report this issue on  https://github.com/yt-dlp/yt-dlp . Make sure you are using the latest version; type  yt-dlp -U  to update. Be sure to call yt-dlp with the --verbose flag and include its complete output.

This issue was fixed by the yt-dlp contributors hellas ago.

So here I go hunting for the location of the binaries to replace them with updated versions by tracing back everything in the code from object to object, layer of abstraction to layer of abstraction, etc..

I finally find the path at:

/Applications/Open\ Video\ Downloader.app/Contents/Resources/app.asar.unpacked/binaries

I install the updated version locally, copy the binary and update the version number in the JSON manifest

brew install yt-dlp
sudo cp /opt/homebrew/bin/yt-dlp /Applications/Open\ Video\ Downloader.app/Contents/Resources/app.asar.unpacked/binaries

Thinking I'm a real genius I go to write this issue on the old repo only to find out it was dead and a newer fixed version exists..

However it got me thinking..

Describe the solution you'd like TLDR:

It would be super helpful (and also easier to maintain) if you offer the user the ability to set the binary path to yt-dlp, ffmpeg, etc in the settings GUI directly. You wouldn't need to package them with this approach but could offer functionality to download them using the existing code to a user specified location.

It might also help to have a button in the settings to manually trigger the update process.

Additionally, if a video in a playlist fails to download for any reason, there should be some kind of notification to the user so they don't think the app just dosen't work when they try to download a playlist with 500 videos and it says the length is 147 because only a subset of the metadata provided valid download info.

Describe alternatives you've considered Manual nonsense Using developer console

StefanLobbenmeier commented 9 months ago

Yeah I agree, the current version mechanism (check for the latest, download it and use that) is a bit rudimentary. I would like there to be a version management, where you can select a version you would like to use (e.g. past 3 releases) but also includes local installations.

With electron this is quite hard though, as I am not able to find anything on the path. Not sure if there is something misconfigured in this project or if this is a general issue.

mnasty commented 7 months ago

We could solve for that simply by providing an environment variable and letting the user define the downloaded version locally with a package manager. Documentation would help bridge the gap, though most users should just be using the default anyways.

I've noticed that it really struggles with local paths. When I have some more time, I'll take a closer look at this. It's mostly polish except for the binary versions.