]> gitweb.fluxo.info Git - grab-queue.git/commitdiff
Log: download start/finish messages
authorSilvio Rhatto <rhatto@riseup.net>
Mon, 8 Jul 2019 17:14:27 +0000 (14:14 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Mon, 8 Jul 2019 17:14:27 +0000 (14:14 -0300)
grab-queue

index 54bad32d1a9a55f67f5e83e39573c3ba8d57375e..e50a688c3bf06e2bc1f04f72acedea7898257e60 100755 (executable)
@@ -78,7 +78,7 @@ class DownloadMultiple:
             self.ensuredir(folder)
 
             with open(logdir + 'grab-queue.log', "a") as log:
-                log.write('Downloading ' + url + '...')
+                log.write('Downloading started: ' + url + "\n")
 
             # Set opts
             # Other opts: -q --show-progress -O
@@ -118,6 +118,9 @@ class DownloadMultiple:
             output.write(str(datetime.datetime.now()) + '\n')
             output.close()
 
+            with open(logdir + 'grab-queue.log', "a") as log:
+                log.write('Downloading finished: ' + url + "\n")
+
             if os.path.isfile(local_filename):
                 # File might be too big, so we're not computing it's inside the script
                 #content = open(local_filename, 'rb')