From 8e1a6dd74c48768b9c60005338cd00f6c90d08c5 Mon Sep 17 00:00:00 2001 From: Florent Date: Sun, 20 Sep 2015 16:47:18 +0200 Subject: [PATCH] downloadboob: fix new file detection Since the filename generation is based on the video.ext field, we have to fill it before to check if the file is downloaded. Also do a little code factorisation --- contrib/downloadboob/downloadboob.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/contrib/downloadboob/downloadboob.py b/contrib/downloadboob/downloadboob.py index a864b1a2..8f4d7991 100755 --- a/contrib/downloadboob/downloadboob.py +++ b/contrib/downloadboob/downloadboob.py @@ -102,14 +102,13 @@ class Downloadboob(object): if i == max_results: break + self.backend.fill_video(video, ('url', 'title', 'url', 'duration', 'ext')) if not self.is_downloaded(video): - self.backend.fill_video(video, ('url','title', 'url', 'duration')) if not(self.is_excluded(video.title, title_exclude)) and self.id_regexp_matched(video.id, id_regexp): print(" %s\n Id:%s\n Duration:%s" % (video.title, video.id, video.duration)) videos.append(video) else: print("Already downloaded, check %s" % video.id) - self.backend.fill_video(video, ('url','title', 'url', 'duration')) linkname = self.get_linkname(video) if not os.path.exists(linkname): self.remove_download(video)