Commit 51d8f57e authored by Mikhail Karpenko's avatar Mikhail Karpenko

Fix a couple of errors in processing scripts

parent b2d9df7c
......@@ -57,7 +57,8 @@ $files = scandir("$path");
if (!is_dir("$path/$destination")) mkdir("$path/$destination",0777);
foreach ($files as $file) {
if (get_file_extension($file)=="bin") {
$ext = get_file_extension($file);
if ($ext == "img" || $ext == "bin" || $ext == "mov") {
echo "Splitting $path/$file into {$extension}s\n";
split_mov("$path",$file,$destination,$extension,$startMarkerWithExif,$chunksize);
}
......@@ -121,8 +122,10 @@ function split_mov($path,$mov_file,$dest,$ext,$startMarkerWithExif,$chunksize) {
}else if ($model==1003) {
$k=$chn+6;
}
$new_file_name = $DateTimeOriginal_local."_".$exif_data['SubSecTimeOriginal']."_".$k.".".$ext;
} else {
$k = intval($exif_data['PageNumber'])+1;
}
$new_file_name = $DateTimeOriginal_local."_".$exif_data['SubSecTimeOriginal']."_".$k.".".$ext;
rename($old_file_name,"$path/$dest/$new_file_name");
}
......
......@@ -130,8 +130,8 @@ for i in range(len(cams)):
for d in dirs:
for p in plist:
if d==p[0]:
pc.download(args.dest,"/dev/"+p[1],d,args.bs,args.bc,args.skip,args.n)
dirs.delete(d)
pc.download(args.dest,"/dev/"+p[1],args.bs,args.bc,args.skip,args.n)
dirs.remove(d)
if len(dirs)!=0:
print("wait for the next ssd")
else:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment