From 0524a8d97d4c5a0d1e2c45a3a2a31cd304ee4937 Mon Sep 17 00:00:00 2001 From: Romain Bignon Date: Fri, 25 Mar 2011 09:55:41 +0100 Subject: [PATCH] default filename to save video is ID.EXT --- weboob/applications/videoob/videoob.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/weboob/applications/videoob/videoob.py b/weboob/applications/videoob/videoob.py index 32e4807d..8b7e72e2 100644 --- a/weboob/applications/videoob/videoob.py +++ b/weboob/applications/videoob/videoob.py @@ -118,10 +118,13 @@ class Videoob(ReplApplication): print >>sys.stderr, 'Please install "wget"' return 1 - if dest is not None: - os.system('wget %s -O %s' % (video.url, dest)) - else: - os.system('wget %s' % (video.url)) + if dest is None: + ext = video.ext + if not ext: + ext = 'avi' + dest = '%s.%s' % (video.id, ext) + + os.system('wget "%s" -O "%s"' % (video.url, dest)) def complete_play(self, text, line, *ignored): args = line.split(' ')