-
Notifications
You must be signed in to change notification settings - Fork 662
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
Cloudupload nextcloud #1404
Cloudupload nextcloud #1404
Conversation
reorder imports (PEP8) make abstract classes/methods abstract
f84db8b
to
1643c00
Compare
Now the arm pipeline takes 31 min because lxml pip package has to be compiled. Hope this is ok. |
Please add your camera simulation in another PR. This will be a great help for testing. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is travis_wait 40
needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In main.html, wonder why ‘http|https’ and ‘ftp|sftp’ were removed in two places? Code changes here should not affect other upload services anyway.
|
||
_STATE_FILE_NAME = 'uploadservices.json' | ||
_services = None | ||
|
||
|
||
class UploadService(object): | ||
class UploadService: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs to test other services as UploadService and GoogleBase has changed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you mean by test? Unit test, or just click testing through the UI?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mean regression test. As base classes that existing services are based on have changed, they (existing services) need to be tested as well to make sure there was no unwanted side effect on them.
@@ -63,7 +63,7 @@ def apply_patches(self, base_dir): | |||
|
|||
packages=['motioneye'], | |||
|
|||
install_requires=['tornado>=3.1,<6', 'jinja2', 'pillow', 'pycurl'], | |||
install_requires=['tornado>=3.1,<6', 'jinja2', 'pillow', 'pycurl', 'webdavclient3==0.12'], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Curious if webdav provides REST api so as to avoid adding webdavclient here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually I used only 3 or so out of many webdav calls. Maybe the whole functionality could also be done by building the requests manually with pycurl or requests. Should i take a look into this? Still some answers of the webdav server might be in XML which has to be parsed. Also the webdav3 library handles errors nicely and throws meaningful exceptions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If a new upload service is doable without adding additional library, I would think that's the way to go to keep this project lightweight.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I certainly don't want motionEye to pull in a dep like webdavclient
. This should be optional.
First of all http/https should be removed from main.html completely in my opinion since it is nowhere used and there is no backend for it. I saw in the commit history that the http/https flags have been added with the first commits that added upload services. Probably a draft that has never been implemented. |
@DavHau Also I agree, if this requires an additional dependency, it should be probably made optional. Either the existence of the module/function/method could be tested to display the option or not (or a note/prompt on selection that it is disabled due to missing dependency), or it could be made a config option, like SMB/CIFS is, with the additional dependency explained in the config sample. |
I currently do not have the capacity to work on this. Also I'm not a user of motioneye anymore. Feel free to fork/copy and continue the work. |
Okay, fair enough. @jmichault @kleini @bob-lee @cclauss shall we keep this PR open, in the hope someone implements WebDAV support based on it, or shall we close it? |
Cross linking a similar PR with only Nextcloud upload added: #1743 |
All done now in #1743, marking this as closed. |
Hey, this is my first PR here.
This adds cloud upload options for NextCloud and for other WebDav servers in general.
I developed and tested the following using docker:
While testing with docker i had the problem that i didn't have a camera connected. I wrote myself some dummy mjpeg network camera which streams cute kittens and changes their colors from time to time to simulate motion. It worked quite well for testing motioneye. Is there any better tool to use for developing? Otherwise i can add this also with another PR.