KonradIT / mmt

Media Management Tool - make importing videos/photos from GoPro and other action cameras/drones a little bit more bearable.
http://mmt.camera
Apache License 2.0
109 stars 12 forks source link

Fix regex expression #106

Closed inode64 closed 1 year ago

inode64 commented 1 year ago

[Fix regex expression]

It can happen that you directly modify the storage with any program and it adds or alters the structure by adding new files that can be treated incorrectly. It happened to me when I used the draktable directly on the SD where the images of my gopro were that it had added .xml to the JPG and GRP files And by the way, it does not allow it to be stricter in the file names so that there are no combinations such as the following:

GOPR0964.GPR.xmp GX011014-MP4 GX011014.MP4.old

Type:

Camera:

Component:

Checklist before approval:

KonradIT commented 1 year ago

Note that .MP4 .JPG etc... are hardcoded thru the program and those .old etc... files would be incorrectly parsed.

inode64 commented 1 year ago

I didn't understand what you meant before look at the execution of a test

~/mmt $ ./mmt import -v -c gopro -i /mnt/datos/test/ -o /mnt/datos/test.out

🎥 [HERO11 Black]: 📹 FW: H22.01.02.10.00 SN: C3471324581852 💾 485 GB/1.1 TB (44.17%) Looking at 100GOPRO GOPR0964.GPR: 17.44 MB / 17.44 MB [==========================================================] ✔️ GOPR0964.GPR.xmp: 7.29 KB / 7.29 KB [==========================================================] ✔️ GX011024.MP4.bak: 74.31 MB / 84.26 MB [==================================================>-------] 0s

+----------------+---------------+--------+
| FILES IMPORTED | FILES SKIPPED | ERRORS |
+----------------+---------------+--------+
|              3 |             0 |      0 |
+----------------+---------------+--------+

there are files that are processed and should not be

KonradIT commented 1 year ago

When dealing with chaptered video the code looks at GP\d+.MP4 vs GP\d+.MP4$.

inode64 commented 1 year ago

echo "GP231120.MP4" |grep -P "GP\d+.MP4$"

run ok

What exactly is the problem?

See GoPro Camera File Naming Convention https://community.gopro.com/s/article/GoPro-Camera-File-Naming-Convention?language=en_US

KonradIT commented 1 year ago

Thought the chaptered regex looked until the end, no problem then.

Thanks!

inode64 commented 1 year ago

Do you want me to make any changes to this code? something else is missing

KonradIT commented 1 year ago

What's missing?

inode64 commented 1 year ago

Me referia si faltaba algo por añadir o corregir en este pull para fusionarlo en la rama principal. El traductor lo carga el diablo :-(

KonradIT commented 1 year ago

No creo que no.