Restored `requirements.txt` Updated `setup.py` to include new repository url and contact details. Moved the rtsp code from `record` to `stream`. Updated project structure to make it more readable and developer friendly - moved mixins to the `mixins` package, moved handlers to the `handlers` package. Moved files not belonging to anything in particular to the `util` package. Updated `camera` class to also defer login call. Deleted unused files like `config_handler`.
19 lines
512 B
Python
19 lines
512 B
Python
class DownloadAPIMixin:
|
|
"""API calls for downloading video files."""
|
|
def get_file(self, filename: str, output_path: str) -> bool:
|
|
"""
|
|
Download the selected video file
|
|
:return: response json
|
|
"""
|
|
body = [
|
|
{
|
|
"cmd": "Download",
|
|
"source": filename,
|
|
"output": filename,
|
|
"filepath": output_path
|
|
}
|
|
]
|
|
resp = self._execute_command('Download', body)
|
|
|
|
return resp
|