From 2736595628392257a43a226c34bfce4fd7858ce8 Mon Sep 17 00:00:00 2001 From: Philipp Hagemeister Date: Thu, 15 Sep 2011 20:09:30 +0200 Subject: [PATCH] Do not update if already up-to-date (Closes #166) --- youtube-dl | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/youtube-dl b/youtube-dl index fa1e482ba..34e86e027 100755 --- a/youtube-dl +++ b/youtube-dl @@ -3409,6 +3409,11 @@ def updateSelf(downloader, filename): try: urlh = urllib.urlopen(UPDATE_URL) newcontent = urlh.read() + + vmatch = re.search("__version__ = '([^']+)'", newcontent) + if vmatch is not None and vmatch.group(1) == __version__: + downloader.to_screen('youtube-dl is up-to-date (' + __version__ + ')') + return finally: urlh.close() except (IOError, OSError), err: -- 2.22.2