2016-04-29 02:54:14 +02:00
|
|
|
--- youtube_dl/__init__.py.orig 2016-04-28 23:05:35 UTC
|
|
|
|
+++ youtube_dl/__init__.py
|
|
|
|
@@ -36,7 +36,6 @@ from .utils import (
|
2014-02-24 06:28:32 +01:00
|
|
|
std_headers,
|
|
|
|
write_string,
|
|
|
|
)
|
|
|
|
-from .update import update_self
|
2014-08-19 18:51:15 +02:00
|
|
|
from .downloader import (
|
2014-02-24 06:28:32 +01:00
|
|
|
FileDownloader,
|
|
|
|
)
|
2016-04-29 02:54:14 +02:00
|
|
|
@@ -384,17 +383,13 @@ def _real_main(argv=None):
|
2015-01-28 14:48:40 +01:00
|
|
|
}
|
2014-02-24 06:28:32 +01:00
|
|
|
|
2015-01-28 14:48:40 +01:00
|
|
|
with YoutubeDL(ydl_opts) as ydl:
|
2014-02-24 06:28:32 +01:00
|
|
|
- # Update version
|
|
|
|
- if opts.update_self:
|
2015-11-24 10:17:47 +01:00
|
|
|
- update_self(ydl.to_screen, opts.verbose, ydl._opener)
|
2014-02-24 06:28:32 +01:00
|
|
|
-
|
2014-08-19 18:51:15 +02:00
|
|
|
# Remove cache dir
|
|
|
|
if opts.rm_cachedir:
|
2014-10-01 15:58:11 +02:00
|
|
|
ydl.cache.remove()
|
2014-08-19 18:51:15 +02:00
|
|
|
|
|
|
|
# Maybe do nothing
|
|
|
|
if (len(all_urls) < 1) and (opts.load_info_filename is None):
|
2014-11-25 09:23:04 +01:00
|
|
|
- if opts.update_self or opts.rm_cachedir:
|
|
|
|
+ if opts.rm_cachedir:
|
2014-08-19 18:51:15 +02:00
|
|
|
sys.exit()
|
2014-11-25 09:23:04 +01:00
|
|
|
|
|
|
|
ydl.warn_if_short_id(sys.argv[1:] if argv is None else argv)
|