else:
return False
-
+'''
# Temp check to avoid downloading and deleting all the videos
def check_username(rec):
username = 'pxx-vegarko'
return True
else:
return False
+'''
# Returns a dictionary of all the videos that should be moved
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
# 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)
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])
"""