aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--README.md8
-rw-r--r--yt_dlp/__init__.py22
-rw-r--r--yt_dlp/options.py6
3 files changed, 11 insertions, 25 deletions
diff --git a/README.md b/README.md
index 2c231f847..ca69aef04 100644
--- a/README.md
+++ b/README.md
@@ -1317,15 +1317,15 @@ These options may no longer work as intended
--include-ads No longer supported
--no-include-ads Default
--youtube-print-sig-code No longer supported
+
+#### Removed
+These options were deprecated since 2014 and have now been entirely removed
+
--id -o "%(id)s.%(ext)s"
-A, --auto-number -o "%(autonumber)s-%(id)s.%(ext)s"
-t, --title -o "%(title)s-%(id)s.%(ext)s"
-l, --literal -o accepts literal names
-#### Removed
-Currently, there are no options that have been completely removed. But there are plans to remove the old output options `-A`,`-t`, `-l`, `--id` (which have been deprecated since 2014) in the near future. If you are still using these, please move to using `--output` instead
-
-
# MORE
For FAQ, Developer Instructions etc., see the [original README](https://github.com/ytdl-org/youtube-dl#faq)
diff --git a/yt_dlp/__init__.py b/yt_dlp/__init__.py
index c88cca7ae..6cc4f2f8c 100644
--- a/yt_dlp/__init__.py
+++ b/yt_dlp/__init__.py
@@ -129,16 +129,12 @@ def _real_main(argv=None):
parser.error('account username missing\n')
if opts.ap_password is not None and opts.ap_username is None:
parser.error('TV Provider account username missing\n')
- if opts.outtmpl is not None and (opts.usetitle or opts.autonumber or opts.useid):
- parser.error('using output template conflicts with using title, video ID or auto number')
if opts.autonumber_size is not None:
if opts.autonumber_size <= 0:
parser.error('auto number size must be positive')
if opts.autonumber_start is not None:
if opts.autonumber_start < 0:
parser.error('auto number start must be positive or 0')
- if opts.usetitle and opts.useid:
- parser.error('using title conflicts with using video ID')
if opts.username is not None and opts.password is None:
opts.password = compat_getpass('Type account password and press [Return]: ')
if opts.ap_username is not None and opts.ap_password is None:
@@ -178,8 +174,7 @@ def _real_main(argv=None):
parser.error('requests sleep interval must be positive or 0')
if opts.ap_mso and opts.ap_mso not in MSO_INFO:
parser.error('Unsupported TV Provider, use --ap-list-mso to get a list of supported TV Providers')
- if opts.overwrites:
- # --yes-overwrites implies --no-continue
+ if opts.overwrites: # --yes-overwrites implies --no-continue
opts.continue_dl = False
if opts.concurrent_fragment_downloads <= 0:
raise ValueError('Concurrent fragments must be positive')
@@ -244,17 +239,7 @@ def _real_main(argv=None):
if opts.extractaudio and not opts.keepvideo and opts.format is None:
opts.format = 'bestaudio/best'
- outtmpl = opts.outtmpl
- if not outtmpl:
- outtmpl = {'default': (
- '%(title)s-%(id)s-%(format)s.%(ext)s' if opts.format == '-1' and opts.usetitle
- else '%(id)s-%(format)s.%(ext)s' if opts.format == '-1'
- else '%(autonumber)s-%(title)s-%(id)s.%(ext)s' if opts.usetitle and opts.autonumber
- else '%(title)s-%(id)s.%(ext)s' if opts.usetitle
- else '%(id)s.%(ext)s' if opts.useid
- else '%(autonumber)s-%(id)s.%(ext)s' if opts.autonumber
- else None)}
- outtmpl_default = outtmpl.get('default')
+ outtmpl_default = opts.outtmpl.get('default')
if outtmpl_default is not None and not os.path.splitext(outtmpl_default)[1] and opts.extractaudio:
parser.error('Cannot download a video and extract audio into the same'
' file! Use "{0}.%(ext)s" instead of "{0}" as the output'
@@ -474,7 +459,7 @@ def _real_main(argv=None):
'check_formats': opts.check_formats,
'listformats': opts.listformats,
'listformats_table': opts.listformats_table,
- 'outtmpl': outtmpl,
+ 'outtmpl': opts.outtmpl,
'outtmpl_na_placeholder': opts.outtmpl_na_placeholder,
'paths': opts.paths,
'autonumber_size': opts.autonumber_size,
@@ -593,6 +578,7 @@ def _real_main(argv=None):
'warnings': warnings,
'autonumber': opts.autonumber or None,
'usetitle': opts.usetitle or None,
+ 'useid': opts.useid or None,
}
with YoutubeDL(ydl_opts) as ydl:
diff --git a/yt_dlp/options.py b/yt_dlp/options.py
index 7505e8c78..3c103f6da 100644
--- a/yt_dlp/options.py
+++ b/yt_dlp/options.py
@@ -937,15 +937,15 @@ def parseOpts(overrideArguments=None):
dest='trim_file_name', default=0, type=int,
help='Limit the filename length (excluding extension) to the specified number of characters')
filesystem.add_option(
- '-A', '--auto-number',
+ '--auto-number',
action='store_true', dest='autonumber', default=False,
help=optparse.SUPPRESS_HELP)
filesystem.add_option(
- '-t', '--title',
+ '--title',
action='store_true', dest='usetitle', default=False,
help=optparse.SUPPRESS_HELP)
filesystem.add_option(
- '-l', '--literal', default=False,
+ '--literal', default=False,
action='store_true', dest='usetitle',
help=optparse.SUPPRESS_HELP)
filesystem.add_option(