Skip to content

Commit

Permalink
Fix bug in deleteFile where it would not accept full URLs
Browse files Browse the repository at this point in the history
  • Loading branch information
KonradIT committed Apr 22, 2017
1 parent 4a000fd commit 0ca38bc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 5 additions & 4 deletions goprocam/GoProCamera.py
Original file line number Diff line number Diff line change
Expand Up @@ -309,11 +309,12 @@ def delete(self, option):
if option == "all":
print(self.sendCamera("DA"))
def deleteFile(self, folder,file):
if folder.startwith("http://10.5.5.9/"):
if folder.startswith("http://10.5.5.9"):
self.getInfoFromURL(folder)
if self.whichCam() == "gpcontrol":
print(self.gpControlCommand("storage/delete?p=" + folder + "/" + file))
print(self.gpControlCommand("storage/delete?p=" + self.getInfoFromURL(folder)[0] + "/" + self.getInfoFromURL(folder)[1]))
else:
print(self.sendCamera("DA",folder+"/"+file))
print(self.sendCamera("DA",self.getInfoFromURL(folder)[0]+"/"+self.getInfoFromURL(folder)[1]))
else:
if self.whichCam() == "gpcontrol":
print(self.gpControlCommand("storage/delete?p=" + folder + "/" + file))
Expand Down Expand Up @@ -718,7 +719,7 @@ def stream(self, addr):
subprocess.Popen("ffmpeg -f mpegts -i udp://" + self.ip_addr + ":8554 -b 800k -r 30 -f mpegts " + addr, shell=True)
self.KeepAlive()
elif self.whichCam() == "auth":
subprocess.Popen("ffmpeg -f mpegts -i http://" + self.ip_addr + ":8080/live/amba.m3u8 -b 800k -r 30 -f mpegts " + addr, shell=True)
subprocess.Popen("ffmpeg -i http://" + self.ip_addr + ":8080/live/amba.m3u8 -f mpegts " + addr, shell=True)

def parse_value(self, param,value):
if param == "video_left":
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from setuptools import setup

setup(name='goprocam',
version='1.8',
version='1.8.1',
description='GoPro WiFi API Wrapper for Python - Compatible with HERO3, HERO3+, HERO4, HERO5, HERO+',
url='http://github.com/konradit/gopro-py-api',
author='Konrad Iturbe',
Expand Down

0 comments on commit 0ca38bc

Please sign in to comment.