dsymbol / yt-dlp-gui

A cross-platform GUI wrapper for yt-dlp written in PySide6
The Unlicense
472 stars 48 forks source link

Please add a feature to make presets for custom arguments #37

Open CraftyDuck100 opened 2 weeks ago

CraftyDuck100 commented 2 weeks ago

For the command line version, I have a few different presets I use, for example -o "Music\%(channel)s\%(title)s" -x --embed-thumbnail --audio-format mp3 for music -o "Videos/%(channel)s/%(title)s.%(ext)s" --embed-thumbnail --embed-chapters -f "bv*[height<=720]+ba/b[height<=720]" for videos and looking in the config.json file, I feel like it wouldn't be hard to add a preset feature

CraftyDuck100 commented 2 weeks ago

Additionally, a thing where we can just use arguments instead of the presets given by the dropdowns and checkboxes would be nice, for custom formats at least

GuyMicciche commented 2 weeks ago

Hello @CraftyDuck100. I did a little test, added in a few new features and improvements. Let me know how this work:

https://github.com/GuyMicciche/yt-dlp-gui/releases/tag/2024.08.27

CraftyDuck100 commented 2 weeks ago

Looks good, the only small issue I see is that you can save multiple of the same named preset so there's multiple of identically named presets in the drop-down. I cloned the repo so I can make some contributions

GuyMicciche commented 2 weeks ago

@CraftyDuck100 Thank you!

dsymbol commented 1 week ago

@CraftyDuck100 I really liked this idea. At first, I wasn't sure how to implement it without losing the program's simplicity and changing the experience for older users. However, I was able to keep both aspects, so it can be used out of the box or customized for more advanced users.

All the customization options are in the config.json file. I will write a more detailed README to explain everything once I merge it into the main branch. For now, each preset only needs one required field called "args" which can be a list or a string, the rest are optional. This field contains the yt-dlp command arguments that will be executed. to add your music example I'll simply add a music preset after the mp3 preset:

...
"mp3": {
  ...
},
"music": {
  "args": "-o \"C:/Users/user/Desktop/Music/%(channel)s/%(title)s\" -x --embed-thumbnail --audio-format mp3"
}

You'll notice that all fields that aren't present in the config.json for the preset will be disabled in the gui.

I'd appreciate if you could do some testing on the config branch (refer to the log file if you have problems) if it works as expected I'll merge.

CraftyDuck100 commented 1 week ago

Alright I'll test it a bit

CraftyDuck100 commented 1 day ago

I apologize, I completely forgot about this. I will take a look as soon as I have time, which will be sometime tomorrow