Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support footage leftover by un-managed/moved cameras. #89

Merged
merged 6 commits into from
Jul 3, 2022

Conversation

CodeChief
Copy link
Contributor

@CodeChief CodeChief commented Feb 15, 2022

Use Case:
Upgrading from 2 to 3 disks in a UNVR system (requires re-format as RAID1 to RAID5 expansion is not supported), but ALSO continue to record footage. Normally this is not possible as when the cameras are moved to another Protect device (my case a UDM-Pro-SE) to continue recording they disappear from the UNVR system then this tool doesn't find the camera footage anymore (you can't save footage whilst the cameras are adopted elsewhere, even though it exists). The cameras were moved by using the "un-manage" advanced action via the Web GUI then when prompted choose the option to keep footage. As far as I remember you cannot do this on the mobile app as it only prompts to delete footage (be careful when un-managing).

Fix:
Remove logic which skips offline cameras and avoid error parsing the "stats\video\recordingStart" value in the get_camera_list.py source file. The response JSON returns "none" for "un-managed" cameras with footage.

@CodeChief CodeChief changed the title Support disconnected cameras. Support footage leftover by un-managed/moved cameras. Feb 15, 2022
@danielfernau danielfernau self-assigned this Feb 15, 2022
@danielfernau danielfernau added the enhancement New feature or request label Feb 15, 2022
@danielfernau danielfernau self-requested a review February 15, 2022 22:51
@CodeChief
Copy link
Contributor Author

After testing the first commit I found event download was broken by the stream download fix. Expanding the code change from a simple null workaround to a more logical conditional construction of the camera data variable appears to fix both. I've tested this on a system where the cameras were moved from and moved to (with and without cameras present, both for streams and events).

@codecov-commenter
Copy link

codecov-commenter commented Jul 3, 2022

Codecov Report

Merging #89 (cc0c253) into master (ee40b1f) will decrease coverage by 0.12%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master      #89      +/-   ##
==========================================
- Coverage   53.31%   53.19%   -0.13%     
==========================================
  Files          23       23              
  Lines         724      720       -4     
==========================================
- Hits          386      383       -3     
+ Misses        338      337       -1     
Flag Coverage Δ
unittests 53.19% <100.00%> (-0.13%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
protect_archiver/client/__init__.py 87.23% <100.00%> (ø)
protect_archiver/downloader/__init__.py 72.22% <100.00%> (ø)
protect_archiver/downloader/get_camera_list.py 90.90% <100.00%> (+3.95%) ⬆️
protect_archiver/test_client.py 100.00% <100.00%> (ø)

📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more

@danielfernau danielfernau merged commit a1e383f into danielfernau:master Jul 3, 2022
@danielfernau
Copy link
Owner

Merged with a few changes. Thanks for your help, @CodeChief!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants