-
Notifications
You must be signed in to change notification settings - Fork 123
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
Videos do not delete from sync module local storage #970
Comments
Thanks for reporting! Seems like there's at least two problems here:
The second one is an easy fix but doesn't address the issue. The first one is more difficult as I do not have local storage in my setup so have no way to test so will need to rely on other to contribute here. I'll pin this issue though |
Right, my code assumes that an exception would be thrown if there was a problem deleting the video. However, no exception is thrown so it assumes the video was deleted. |
Gotcha. To check for a success/fail, the delete method will return "True" if the deletion worked and "False" if it failed. However we're only looking at the request response. It's possible a "True" is being returned even if the video is not deleted. If you get a chance, it's worth checking to make sure blinkpy/blinkpy/sync_module.py Line 714 in 0a3ba30
|
I am not a Python developer, but I am using your repo and README to figure out what the URLs are for interacting with the sync module. To upload a video from the sync module, I am posting to To download that video, I do a GET to the same URL. If I followed the Python code correctly, it looks like the URL it is using to delete a video is the same as above except that "request" becomes "delete", so: /api/v1/accounts/{account-id}/networks/{network-id}/sync_modules/{sync-module-id}/local_storage/manifest/{manifest-id}/clip/delete/{clip-id} And it is a POST to that URL. Is that correct? The behavior I am seeing is that the call returns 200, with a body that contains a single field, "id". I can repeat the identical call. I continue to get a 200 back each time I call it, and the id is different each time. I still see the video when I go into the Blink app, so the video is not being deleted. In fact, I see that if I change the clip id to any random number, I get the same behavior, so something is definitely wrong with the URL I am using. |
There is an "example" included. I haven't used this is awhile (so maybe it is also broken?) blinkpy/blinksync/blinksync.py Lines 81 to 101 in e2c747b
-Delete Button code should do it... Blink sync was intended as an example to download, delete, view files via a UI. |
I recently posted about a script to delete old videos from the local storage on the sync module and I updated my blinkpy to the latest development version. The script appeared to be working (i.e., no errors were generated) but the local storage continued to fill up. Looking in the blink app, I confirmed that old videos (currently defined in my script as older than 5 days) are still showing up, demonstrating that they have not been deleted.
Below is my code and the output.
Note that output is truncated for brevity.
The text was updated successfully, but these errors were encountered: