Skip to content

Commit

Permalink
Added types to youtube-dl flags.
Browse files Browse the repository at this point in the history
Flag info pulled from 'youtube-dl --help' (version 2021.06.06)
  • Loading branch information
Samu698 committed Nov 16, 2021
1 parent 4d7db24 commit 5800d23
Showing 1 changed file with 157 additions and 4 deletions.
161 changes: 157 additions & 4 deletions src/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,163 @@ declare module 'youtube-dl-exec' {
_filename: string
}

export default function(url: string, flags?: unknown, options?: Options<string>): Promise<YtResponse>;
export function raw(url: string, flags?: unknown, options?: Options<string>): ExecaChildProcess;
type YtFlags = {
help?: boolean,
version?: boolean,
update?: boolean,
ignoreErrors?: boolean,
abortOnError?: boolean,
dumpUserAgent?: boolean,
listExtractors?: boolean,
extractorDescriptions?: boolean,
forceGenericExtractor?: boolean,
defaultSearch?: string,
igonreConfig?: boolean,
configLocation?: string,
flatPlaylist?: boolean,
markWatched?: boolean,
noColor?: boolean,
proxy?: string,
socketTimeout?: number,
sourceAddress?: string,
forceIpv4?: boolean,
forceIpv6?: boolean,
geoVerificationProxy?: string,
geoBypass?: boolean,
geoBypassCountry?: string,
geoBypassIpBlock?: string,
playlistStart?: number,
playlistEnd?: number | 'last',
playlistItems?: string,
matchTitle?: string,
rejectTitle?: string,
maxDownloads?: number,
minFilesize?: string,
maxFilesize?: string,
date?: string,
datebefore?: string,
dateafter?: string,
minViews?: number,
maxViews?: number,
matchFilter?: string,
noPlaylist?: boolean,
yesPlaylist?: boolean,
ageLimit?: number,
dowloadArchive?: string,
includeAds?: boolean,
limitRate?: string,
retries?: number | 'infinite',
skipUnavailableFragments?: boolean,
abortOnUnavailableFragment?: boolean,
keepFragments?: boolean,
bufferSize?: string,
noResizeBuffer?: boolean,
httpChunkSize?: string,
playlistReverse?: boolean,
playlistRandom?: boolean,
xattrSetFilesize?: boolean,
hlsPreferNative?: boolean,
hlsPreferFfmpeg?: boolean,
hlsUseMpegts?: boolean,
externalDownloader?: string,
externalDownloaderArgs?: string,
batchFile?: string,
id?: boolean,
output?: string,
outputNaPlaceholder?: string,
autonumberStart?: number,
restrictFilenames?: boolean,
noOverwrites?: boolean,
continue?: boolean,
noPart?: boolean,
noMtime?: boolean,
writeDescription?: boolean,
writeInfoJson?: boolean,
writeAnnotations?: boolean,
loadInfoJson?: string,
cookies?: string,
cacheDir?: string,
noCacheDir?: boolean,
rmCacheDir?: boolean,
writeThumbnail?: boolean,
writeAllThumbnails?: boolean,
listThumbnails?: boolean,
quiet?: boolean,
noWarnings?: boolean,
simulate?: boolean,
skipDownload?: boolean,
getUrl?: boolean,
getTitle?: boolean,
getId?: boolean,
getThumbnail?: boolean,
getDuration?: boolean,
getFilename?: boolean,
getFormat?: boolean,
dumpJson?: boolean,
dumpSingleJson?: boolean,
printJson?: boolean,
newline?: boolean,
noProgress?: boolean,
consoleTitle?: boolean,
verbose?: boolean,
dumpPages?: boolean,
writePages?: boolean,
printTraffic?: boolean,
callHome?: boolean,
encoding?: string,
noCheckCertificate?: boolean,
preferInsecure?: boolean,
userAgent?: string,
referer?: string,
addHeader?: string,
bidiWorkaround?: boolean,
sleepInterval?: number,
maxSleepInterval?: number,
format?: string,
allFormats?: boolean,
preferFreeFormats?: boolean,
listFormats?: boolean,
youtubeSkipDashManifest?: boolean,
mergeOutputFormat?: string,
writeSub?: boolean,
writeAutoSub?: boolean,
allSubs?: boolean,
listSubs?: boolean,
subFormat?: string,
subLang?: string,
username?: string,
password?: string,
twofactor?: string,
netrc?: boolean,
videoPassword?: string,
apMso?: string,
apUsername?: string,
apPassword?: string,
apListMso?: boolean,
extractAudio?: boolean,
audioFormat?: string,
audioQuality?: number,
recodeVideo?: string,
postprocessorArgs?: string,
keepVideo?: boolean,
noPostOverwrites?: boolean,
embedSubs?: boolean,
embedThumbnail?: boolean,
addMetadata?: boolean,
metadataFromFile?: string,
xattrs?: boolean,
fixup?: string,
preferAvconv?: boolean,
preferFfmpeg?: boolean,
ffmpegLocation?: string,
exec?: string,
convertSubs?: string
}

export default function(url: string, flags?: YtFlags, options?: Options<string>): Promise<YtResponse>;
export function raw(url: string, flags?: YtFlags, options?: Options<string>): ExecaChildProcess;
export function create(binaryPath?: string): {
(url: string, flags?: unknown, options?: Options<string>): Promise<YtResponse>;
raw(url: string, flags?: unknown, options?: Options<string>): ExecaChildProcess;
(url: string, flags?: YtFlags, options?: Options<string>): Promise<YtResponse>;
raw(url: string, flags?: YtFlags, options?: Options<string>): ExecaChildProcess;
}
}

0 comments on commit 5800d23

Please sign in to comment.