-
Notifications
You must be signed in to change notification settings - Fork 19
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
Script does not handle impact recording types #3
Comments
Thank you for your report! I made the necessary changes pretty much as you suggested. I would appreciate it if you were able to test it out on a real cam and let me know how that goes. (I tested this on the emulator, and it'll be a bit before I drive.) |
No problem, I'll give it a try when I can - seems like you, not sure when
I'll get chance next.
Thanks
…On Sat, May 15, 2021 at 7:08 PM Alessandro Colomba ***@***.***> wrote:
Thank you for your report!
I made the necessary changes pretty much as you suggested.
I would appreciate it if you were able to test it out on a real cam and
let me know how that goes. (I tested this on the emulator, and it'll be a
bit before I drive.)
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#3 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADHK7GYKKHMPU3QG7NTY3LDTN22CTANCNFSM444MRZ7Q>
.
|
I created a github account just to thank you both, and to let you know that this resolved the issue for me on my DR900x. I've been using this script for a few months and then it broke yesterday - it may or may not have been due to upgrading to firmware 1.006. Huge thanks to acolomba for writing this script, and thanks to ThinkSteve74 for fixing this issue! |
Great, I believe I can close this issue then. Thank you both very much! |
The script currently does not handle impact recording types ('I') which causes an exception when sorting the files after getting the list from the dashcam:
ERROR 'NoneType' object has no attribute 'datetime'
I think there will be more types of filenames according to: https://blackvue.com/major-update-improved-blackvue-app-ui-dark-mode-live-event-upload-and-more/.
The ones not metioned on that page are MNP.
The solution seems to be simple:
filename_re = re.compile(r"""(?P<base_filename>(?P\d\d\d\d)(?P\d\d)(?P\d\d)
_(?P\d\d)(?P\d\d)(?P\d\d))
_(?P[NEPM])
(?P[FR])
.(?Pmp4)""", re.VERBOSE)
Becomes:
filename_re = re.compile(r"""(?P<base_filename>(?P\d\d\d\d)(?P\d\d)(?P\d\d)
_(?P\d\d)(?P\d\d)(?P\d\d))
_(?P[MEATBOIRXGNP])
(?P[FR])
.(?Pmp4)""", re.VERBOSE)
And manual_event_sort_key gets updarted to something like:
def manual_event_sort_key(recording):
"""sorts by recording type, then datetime, then front/rear direction"""
return "MEATBOIRXGNP".find(recording.type), recording.datetime, "FR".find(recording.direction)
Thanks,
The text was updated successfully, but these errors were encountered: