marcopeocchi / yt-dlp-web-ui

A terrible web ui and RPC server for yt-dlp. Designed to be self-hosted.
GNU General Public License v3.0
820 stars 85 forks source link

Is it possible to pass custom options to yt-dlp via settings? #7

Closed wy580477 closed 2 years ago

wy580477 commented 2 years ago

Your awesome project looks more advanced than other yt-dlp web frontends.

There is one missing feature which prevents me from switch over, settings.json only has download_path option.

Is there any way to pass additional options to yt-dlp?

marcopeocchi commented 2 years ago

Hello! If you mean cli arguments to yt-dlp, yes it's totally doable. I will provide a way to do that.

wy580477 commented 2 years ago

Hello! If you mean cli arguments to yt-dlp, yes it's totally doable. I will provide a way to do that.

Yeah, cli arguments support would be awesome.

marcopeocchi commented 2 years ago

image

Would a format like this be sufficient?

Each array entry is effectively a yt-dlp cli argument

wy580477 commented 2 years ago

I know little about coding, so if the following suggestion would take too much effort, please ignore it.

If there are multiple profiles which can be switched via WebUI, this would be a very flexible way for users to extend WebUI functions.

{
    "port": 3000,
    "profile": [
        {
            "tag": "profile_mp4",
            "download_path": "/data1",
            "cliArgs": [
                "-f mp4",
                "--exec script.sh"
            ]
        },
        {
            "tag": "profile_mkv",
            "download_path": "/data2",
            "cliArgs": [
                "-f mkv",
                "--exec script2.sh"
            ]
        }
    ]
}
marcopeocchi commented 2 years ago

I understand the idea but I think it's a little bit out of scope. It will surely applicable in a context where there's multiple separate yt-dlp instances but this is not the case (or at least not what I've designed at the beginning)

wy580477 commented 2 years ago

Thx.