Last active
February 16, 2018 15:24
-
-
Save KonradIT/8da33b818b2171342676d01c18c0acfc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from goprocam import GoProCamera, constants | |
gopro = GoProCamera.GoPro(constants.gpcontrol) | |
import os.path | |
import time | |
while True: | |
if gopro.IsRecording() == 0: | |
last_media_item = gopro.getMediaInfo("folder") + "-" + gopro.getMediaInfo("file") | |
if os.path.isfile(last_media_item): | |
time.sleep(1) | |
else: | |
gopro.downloadLastMedia() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment