logo

youtube-dl

[mirror] Download/Watch videos from video hosters
commit: 2736595628392257a43a226c34bfce4fd7858ce8
parent 7b1a2bbe178d0eb35f92242223558ba9ccef581b
Author: Philipp Hagemeister <phihag@phihag.de>
Date:   Thu, 15 Sep 2011 20:09:30 +0200

Do not update if already up-to-date (Closes #166)

Diffstat:

Myoutube-dl5+++++
1 file changed, 5 insertions(+), 0 deletions(-)

diff --git 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: