Is your feature request related to a problem? Please describe.
Requiring the use of API subcommands is kinda weird so it would be good to allow using yt-dlp commands directly:
To distinguish from library arguments the double dash would need to be removed. Not sure how to handle single-dash arguments
import yt_dlp
def cli_to_api(*opts):
default = yt_dlp.parse_options([]).ydl_opts
diff = {k: v for k, v in yt_dlp.parse_options(opts).ydl_opts.items() if default[k] != v}
diff['postprocessors'] = [pp for pp in diff['postprocessors'] if pp not in default['postprocessors']]
return diff
from pprint import pprint
pprint(cli_to_api('--embed-metadata', '--embed-thumbnail')) # Change according to your need
Is your feature request related to a problem? Please describe.
Requiring the use of API subcommands is kinda weird so it would be good to allow using yt-dlp commands directly:
To distinguish from
library
arguments the double dash would need to be removed. Not sure how to handle single-dash argumentsOutput
Stolen from https://discord.com/channels/807245652072857610/1023190793491599391/1023190796826066974