Skip to content

Fix regex expression #106

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 27, 2023
Merged

Fix regex expression #106

merged 1 commit into from
Apr 27, 2023

Conversation

inode64
Copy link
Contributor

@inode64 inode64 commented Apr 10, 2023

[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:

  • Bug fix
  • New feature
  • Breaking change
  • Documentation

Camera:

  • GoPro
  • Insta360
  • DJI
  • Android
  • This PR adds a new camera

Component:

  • Core logic
  • Import
  • Merging
  • Firmware Update
  • Video Manipulation

Checklist before approval:

  • Linter pass
  • Build pass

@KonradIT
Copy link
Owner

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

@inode64
Copy link
Contributor Author

inode64 commented Apr 10, 2023

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
Copy link
Owner

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

@inode64
Copy link
Contributor Author

inode64 commented Apr 10, 2023

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
Copy link
Owner

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

Thanks!

@inode64
Copy link
Contributor Author

inode64 commented Apr 14, 2023

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

@KonradIT
Copy link
Owner

What's missing?

@inode64
Copy link
Contributor Author

inode64 commented Apr 14, 2023

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
Copy link
Owner

No creo que no.

@KonradIT KonradIT merged commit d9af870 into KonradIT:development Apr 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants