Skip to content

Instantly share code, notes, and snippets.

@KonradIT
Last active February 16, 2018 15:24
Show Gist options
  • Save KonradIT/8da33b818b2171342676d01c18c0acfc to your computer and use it in GitHub Desktop.
Save KonradIT/8da33b818b2171342676d01c18c0acfc to your computer and use it in GitHub Desktop.
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