diff options
author | Philipp Hagemeister <phihag@phihag.de> | 2014-03-30 15:57:31 +0200 |
---|---|---|
committer | Philipp Hagemeister <phihag@phihag.de> | 2014-03-30 15:57:35 +0200 |
commit | 9c1fc022ae3e1232a31f79dbde1e85783f26fa6d (patch) | |
tree | b9173a069428a66769feb5ff0c1739c22528c604 /youtube_dl/__init__.py | |
parent | 83d548ef0fc451947806c7f21c542e0cd40b4e9d (diff) |
[generic] Warn before fallback to automatic search
Diffstat (limited to 'youtube_dl/__init__.py')
-rw-r--r-- | youtube_dl/__init__.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/youtube_dl/__init__.py b/youtube_dl/__init__.py index 4d3d6caed..7c135db32 100644 --- a/youtube_dl/__init__.py +++ b/youtube_dl/__init__.py @@ -256,9 +256,10 @@ def parseOpts(overrideArguments=None): general.add_option( '--bidi-workaround', dest='bidi_workaround', action='store_true', help=u'Work around terminals that lack bidirectional text support. Requires bidiv or fribidi executable in PATH') - general.add_option('--default-search', - dest='default_search', metavar='PREFIX', - help='Use this prefix for unqualified URLs. For example "gvsearch2:" downloads two videos from google videos for youtube-dl "large apple". By default (with value "auto") youtube-dl guesses.') + general.add_option( + '--default-search', + dest='default_search', metavar='PREFIX', + help='Use this prefix for unqualified URLs. For example "gvsearch2:" downloads two videos from google videos for youtube-dl "large apple". By default (with value "auto") youtube-dl guesses.') general.add_option( '--ignore-config', action='store_true', @@ -676,7 +677,7 @@ def _real_main(argv=None): date = DateRange.day(opts.date) else: date = DateRange(opts.dateafter, opts.datebefore) - if opts.default_search not in ('auto', None) and ':' not in opts.default_search: + if opts.default_search not in ('auto', 'auto_warning', None) and ':' not in opts.default_search: parser.error(u'--default-search invalid; did you forget a colon (:) at the end?') # Do not download videos when there are audio-only formats |