Merge pull request #141 from fronzbot/dev

0.11.2
This commit is contained in:
Kevin Fronczak
2019-01-23 08:05:05 -08:00
committed by GitHub
3 changed files with 18 additions and 4 deletions
+5
View File
@@ -3,6 +3,11 @@ Changelog
A list of changes between each release
0.11.2 (2019-01-23)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- Hotfix to prevent platform from stalling due to API change
- Motion detection and video recovery broken until new API endpoint discovered
0.11.1 (2019-01-02)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- Fixed incorrect backup login url
+1 -1
View File
@@ -4,7 +4,7 @@ import os
MAJOR_VERSION = 0
MINOR_VERSION = 11
PATCH_VERSION = 1
PATCH_VERSION = 2
__version__ = '{}.{}.{}'.format(MAJOR_VERSION, MINOR_VERSION, PATCH_VERSION)
+12 -3
View File
@@ -139,15 +139,24 @@ class BlinkSyncModule():
this_page = api.request_videos(self.blink, page=page_num)
if not this_page:
break
elif 'message' in this_page:
_LOGGER.warning("Could not retrieve videos. Message: %s",
this_page['message'])
break
videos.append(this_page)
_LOGGER.debug("Getting videos from page %s through %s",
start_page,
end_page)
for page in videos:
for entry in page:
camera_name = entry['camera_name']
clip_addr = entry['address']
thumb_addr = entry['thumbnail']
try:
camera_name = entry['camera_name']
clip_addr = entry['address']
thumb_addr = entry['thumbnail']
except TypeError:
_LOGGER.warning("Could not extract video information.")
break
clip_date = clip_addr.split('_')[-6:]
clip_date = '_'.join(clip_date)
clip_date = clip_date.split('.')[0]