Skip to content

Commit e6d0412

Browse files
committed
Actually I don't care about srt subtitles any more
The yt-dlp default is vtt, which is what I want for HTML video - srt was only for Plex, which I no longer use
1 parent dabb707 commit e6d0412

File tree

1 file changed

+0
-32
lines changed

1 file changed

+0
-32
lines changed

web/yt-dlp.py

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -51,41 +51,9 @@ def download_parallel_playlist(youtube_url: str, remaining_args: list[str]) -> N
5151
get_ids_proc.wait()
5252

5353

54-
def check_arguments(argv: list[str]) -> None:
55-
"""
56-
Validate the arguments I'm using.
57-
58-
This will never modify the arguments, but it might give an error
59-
message telling me to use arguments differently.
60-
"""
61-
# I always want subtitles in srt format, so make sure that if I'm
62-
# downloading subtitles I'm doing that conversion.
63-
#
64-
# I could do this after the fact, but it's slightly quicker to do
65-
# it on the initial download, especially if I'm invoking `yt-dlp`
66-
# with some sort of dynamic variable e.g. `pbpaste` or `furl`.
67-
download_subtitle_args = (
68-
"--write-sub",
69-
"--write-subs",
70-
"--write-auto-sub",
71-
"--write-auto-subs",
72-
)
73-
74-
if (
75-
any(dsa in argv for dsa in download_subtitle_args)
76-
and "--convert-subtitles=srt" not in argv
77-
):
78-
sys.exit("Did you forget to add --convert-subtitles=srt?")
79-
80-
if any("bbc.co.uk" in u for u in argv) and "--output=%(title)s.%(ext)s" not in argv:
81-
sys.exit('Did you forget to add --output="%(title)s.%(ext)s"?')
82-
83-
8454
if __name__ == "__main__":
8555
argv = sys.argv[1:]
8656

87-
check_arguments(argv)
88-
8957
# Where is yt-dlp?
9058
#
9159
# sys.executable returns the path to the currently running Python,

0 commit comments

Comments
 (0)