]> git.uio.no Git - u/vegarko/korvald.git/commitdiff
hotfix
authorVegard Korvald <vegard.korvald@usit.uio.no>
Tue, 5 May 2015 07:47:32 +0000 (09:47 +0200)
committerVegard Korvald <vegard.korvald@usit.uio.no>
Tue, 5 May 2015 07:47:32 +0000 (09:47 +0200)
fetchReplays.py

index 9e613032feb9ee6a3f8497176280a3a8b3eb3412..a6878f537b9eaa6759f367d3fac1b9b323a71f16 100755 (executable)
@@ -49,7 +49,7 @@ def check_tag_comment(rec):
     else:
         return False
 
-
+'''
 # Temp check to avoid downloading and deleting all the videos
 def check_username(rec):
     username = 'pxx-vegarko'
@@ -58,6 +58,7 @@ def check_username(rec):
         return True
     else:
         return False
+'''
 
 
 # Returns a dictionary of all the videos that should be moved
@@ -71,7 +72,7 @@ def list_vids(src, dest, delete, h):
         copy_v = []
         new_fname = rename(record, '.flv')
 
-        if not os.path.isfile(pj(dest, new_fname)) and check_username(record):
+        if not os.path.isfile(pj(dest, new_fname)):  # and check_username(record):
             copy_v.append((pj(src, record.guid+'.flv')).encode('utf-8'))
             copy_v.append(pj(dest, new_fname+'.inflight'))
             copy_rv[record] = copy_v
@@ -96,7 +97,6 @@ def run(src, dest, client, delete, hashfunc):
     # start = time.time()
 
     for rec, copy_v in d.iteritems():
-        print rec
         no_dot = copy_v[1].split('.')[0]
         video_count = copy_files(copy_v, video_count)
         checks, boo = checksum(copy_v, hashfunc)
@@ -107,8 +107,7 @@ def run(src, dest, client, delete, hashfunc):
             print "Copied: {}".format(copy_v[1])
             tot_size += os.path.getsize(copy_v[1])
             if delete is True:
-                retval = client.service.DeleteRecord(id=rec.id)
-                print("retval: {}").format(retval)
+                client.service.DeleteRecord(id=rec.id)
         else:
             os.remove(copy_v[1])
     """