added a debug for rotate code, and put quotes in the right spots so paths with spaces are covered - D'oh!

This commit is contained in:
2023-11-11 22:25:26 +11:00
parent 1005acb339
commit 0ed56d6a1a
2 changed files with 6 additions and 5 deletions

View File

@@ -1915,7 +1915,8 @@ def JobTransformImage(job):
out.save( e.FullPathOnFS() ) out.save( e.FullPathOnFS() )
else: else:
AddLogForJob(job, f"INFO: Rotating {e.FullPathOnFS()} by {amt} degrees" ) AddLogForJob(job, f"INFO: Rotating {e.FullPathOnFS()} by {amt} degrees" )
p = subprocess.run([PA_EXIF_ROTATER, e.FullPathOnFS(), amt ] ) p = subprocess.run([PA_EXIF_ROTATER, e.FullPathOnFS(), amt ], capture_output=True )
print(p)
settings = session.query(Settings).first() settings = session.query(Settings).first()
e.file_details.thumbnail, _ , _ = GenThumb( e.FullPathOnFS(), settings.auto_rotate ) e.file_details.thumbnail, _ , _ = GenThumb( e.FullPathOnFS(), settings.auto_rotate )
e.file_details.hash = md5( job, e ) e.file_details.hash = md5( job, e )

View File

@@ -1,9 +1,9 @@
#!/bin/sh #!/bin/sh
echo "start" echo "start"
b=`basename $1` b=`basename "$1"`
echo "b=$b" echo "b=$b"
mv $1 /tmp/$b mv "$1" "/tmp/$b"
echo "mv $1 to /tmp/$b" echo "mv '$1' to /tmp/$b"
jpegtran -outfile $1 -rotate $2 /tmp/$b jpegtran -outfile "$1" -rotate "$2" "/tmp/$b"
echo "done jpegtran" echo "done jpegtran"