Compare commits

...

10 Commits

Author SHA1 Message Date
Alano Terblanche
f15171147b Merge pull request #64 from Helias/patch-1
chore: add RLC-510A in supported cameras list
2022-09-07 00:05:38 +02:00
Stefano Borzì
7999ce8108 chore: add RLC-510A in supported cameras list 2022-08-21 19:22:15 +02:00
Alano Terblanche
59945861b0 Merge pull request #63 from ReolinkCameraAPI/bump-version
chore: bump version to 0.1.5
2022-08-20 12:44:34 +02:00
Alano Terblanche
a61e86cfa4 chore: bump version to 0.1.5 2022-08-20 12:43:57 +02:00
Alano Terblanche
77eaff9edf Merge pull request #59 from deadc0de6/fix-no-value
fix KeyError: value
2022-08-20 12:40:45 +02:00
Alano Terblanche
23209f47f4 Merge pull request #62 from ReolinkCameraAPI/bump-version
chore: bump version to 0.1.4
2022-08-20 12:34:27 +02:00
Alano Terblanche
37dd49f936 chore: bump version to 0.1.4 2022-08-20 12:33:39 +02:00
deadc0de6
d59cefff52 fix KeyError: value 2022-07-31 14:46:06 +02:00
Alano Terblanche
8b6049bb26 Merge pull request #53 from AmmarKothari/use_proxy_for_downlading_files
Add proxy arg to get for downloading files
2021-12-12 23:10:17 +01:00
ammar
936c43b6fa Add proxy arg to get for downloading files 2021-12-03 16:42:52 -08:00
4 changed files with 9 additions and 3 deletions

View File

@@ -149,6 +149,7 @@ do not work and is not supported here.
- RLC-423
- RLC-420-5MP
- RLC-410-5MP
- RLC-510A
- RLC-520
- C1-Pro
- D400

View File

@@ -1,4 +1,4 @@
from reolinkapi.handlers.api_handler import APIHandler
from .camera import Camera
__version__ = "0.1.3"
__version__ = "0.1.5"

View File

@@ -124,7 +124,7 @@ class APIHandler(AlarmAPIMixin,
tgt_filepath = data[0].pop('filepath')
# Apply the data to the params
params.update(data[0])
with requests.get(self.url, params=params, stream=True, verify=False, timeout=(1, None)) as req:
with requests.get(self.url, params=params, stream=True, verify=False, timeout=(1, None), proxies=Request.proxies) as req:
if req.status_code == 200:
with open(tgt_filepath, 'wb') as f:
f.write(req.content)

View File

@@ -46,7 +46,12 @@ class MotionAPIMixin:
body = [{"cmd": "Search", "action": 1, "param": search_params}]
resp = self._execute_command('Search', body)[0]
result = resp['value']['SearchResult']
if 'value' not in resp:
return []
values = resp['value']
if 'SearchResult' not in values:
return []
result = values['SearchResult']
files = result.get('File', [])
if len(files) > 0:
# Begin processing files