Open rudyryk opened 4 years ago
Problem:
Newer GoPro models (now sure what models are capable exactly) provide date and time in status. But there's no method to get it via inteface naturally.
Details:
Here's the snippet to get the date and time:
import json import datetime from goprocam import GoProCamera, constants goproCamera = GoProCamera.GoPro() status = json.loads(goproCamera.getStatusRaw()).get('status') status_time = status.get('40', [])[1:].split('%') time_parts = [int(item, 16) for item in status_time] if time_parts: time_parts[0] += 2000 print(datetime.datetime(*time_parts))
So, we actually can parse the key '40' from status in a specific manner to get the date & time.
status
It would be great to have an interface method for that.
Thank you for developing and maintaining this great project!
I think status_time[0...2] are base 16, [3...5] are base 10.
status_time[0...2]
[3...5]
Problem:
Newer GoPro models (now sure what models are capable exactly) provide date and time in status. But there's no method to get it via inteface naturally.
Details:
Here's the snippet to get the date and time:
So, we actually can parse the key '40' from
status
in a specific manner to get the date & time.It would be great to have an interface method for that.
Thank you for developing and maintaining this great project!