motioneye 0.43.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- motioneye/__init__.py +1 -0
- motioneye/cleanup.py +92 -0
- motioneye/config.py +2497 -0
- motioneye/controls/__init__.py +0 -0
- motioneye/controls/diskctl.py +275 -0
- motioneye/controls/mmalctl.py +47 -0
- motioneye/controls/powerctl.py +75 -0
- motioneye/controls/smbctl.py +318 -0
- motioneye/controls/tzctl.py +140 -0
- motioneye/controls/v4l2ctl.py +201 -0
- motioneye/controls/wifictl.py +261 -0
- motioneye/extra/linux_init +94 -0
- motioneye/extra/motioneye.conf.sample +99 -0
- motioneye/extra/motioneye.systemd +14 -0
- motioneye/extra/motioneye.sysv +71 -0
- motioneye/handlers/__init__.py +0 -0
- motioneye/handlers/action.py +125 -0
- motioneye/handlers/base.py +240 -0
- motioneye/handlers/config.py +806 -0
- motioneye/handlers/log.py +60 -0
- motioneye/handlers/login.py +31 -0
- motioneye/handlers/main.py +60 -0
- motioneye/handlers/movie.py +231 -0
- motioneye/handlers/movie_playback.py +125 -0
- motioneye/handlers/picture.py +674 -0
- motioneye/handlers/power.py +43 -0
- motioneye/handlers/prefs.py +39 -0
- motioneye/handlers/relay_event.py +107 -0
- motioneye/handlers/update.py +59 -0
- motioneye/handlers/version.py +39 -0
- motioneye/locale/ar/LC_MESSAGES/motioneye.mo +0 -0
- motioneye/locale/bn/LC_MESSAGES/motioneye.mo +0 -0
- motioneye/locale/ca/LC_MESSAGES/motioneye.mo +0 -0
- motioneye/locale/cs/LC_MESSAGES/motioneye.mo +0 -0
- motioneye/locale/da/LC_MESSAGES/motioneye.mo +0 -0
- motioneye/locale/de/LC_MESSAGES/motioneye.mo +0 -0
- motioneye/locale/el/LC_MESSAGES/motioneye.mo +0 -0
- motioneye/locale/en/LC_MESSAGES/motioneye.mo +0 -0
- motioneye/locale/es/LC_MESSAGES/motioneye.mo +0 -0
- motioneye/locale/fi/LC_MESSAGES/motioneye.mo +0 -0
- motioneye/locale/fr/LC_MESSAGES/motioneye.mo +0 -0
- motioneye/locale/hi/LC_MESSAGES/motioneye.mo +0 -0
- motioneye/locale/hu/LC_MESSAGES/motioneye.mo +0 -0
- motioneye/locale/it/LC_MESSAGES/motioneye.mo +0 -0
- motioneye/locale/ja/LC_MESSAGES/motioneye.mo +0 -0
- motioneye/locale/ko/LC_MESSAGES/motioneye.mo +0 -0
- motioneye/locale/ms/LC_MESSAGES/motioneye.mo +0 -0
- motioneye/locale/nb_NO/LC_MESSAGES/motioneye.mo +0 -0
- motioneye/locale/ne/LC_MESSAGES/motioneye.mo +0 -0
- motioneye/locale/nl/LC_MESSAGES/motioneye.mo +0 -0
- motioneye/locale/pa/LC_MESSAGES/motioneye.mo +0 -0
- motioneye/locale/pl/LC_MESSAGES/motioneye.mo +0 -0
- motioneye/locale/pt/LC_MESSAGES/motioneye.mo +0 -0
- motioneye/locale/ro/LC_MESSAGES/motioneye.mo +0 -0
- motioneye/locale/ru/LC_MESSAGES/motioneye.mo +0 -0
- motioneye/locale/sk/LC_MESSAGES/motioneye.mo +0 -0
- motioneye/locale/sv/LC_MESSAGES/motioneye.mo +0 -0
- motioneye/locale/ta/LC_MESSAGES/motioneye.mo +0 -0
- motioneye/locale/tr/LC_MESSAGES/motioneye.mo +0 -0
- motioneye/locale/uk/LC_MESSAGES/motioneye.mo +0 -0
- motioneye/locale/zh/LC_MESSAGES/motioneye.mo +0 -0
- motioneye/mediafiles.py +1051 -0
- motioneye/meyectl.py +363 -0
- motioneye/mjpgclient.py +415 -0
- motioneye/monitor.py +67 -0
- motioneye/motionctl.py +546 -0
- motioneye/motioneye_init.py +34 -0
- motioneye/prefs.py +116 -0
- motioneye/remote.py +928 -0
- motioneye/scripts/migrateconf.sh +98 -0
- motioneye/scripts/relayevent.sh +34 -0
- motioneye/sendmail.py +256 -0
- motioneye/sendtelegram.py +171 -0
- motioneye/server.py +508 -0
- motioneye/settings.py +148 -0
- motioneye/shell.py +37 -0
- motioneye/static/css/frame.css +44 -0
- motioneye/static/css/jquery.timepicker.min.css +2 -0
- motioneye/static/css/main.css +1421 -0
- motioneye/static/css/ui.css +472 -0
- motioneye/static/fnt/mavenpro-black-webfont.woff +0 -0
- motioneye/static/fnt/mavenpro-bold-webfont.woff +0 -0
- motioneye/static/fnt/mavenpro-medium-webfont.woff +0 -0
- motioneye/static/fnt/mavenpro-regular-webfont.woff +0 -0
- motioneye/static/img/IEC5007_On_Symbol.svg +1 -0
- motioneye/static/img/IEC5008_Off_Symbol.svg +1 -0
- motioneye/static/img/apply-progress.gif +0 -0
- motioneye/static/img/arrows.svg +1 -0
- motioneye/static/img/camera-action-button-alarm-off.svg +1 -0
- motioneye/static/img/camera-action-button-alarm-on.svg +1 -0
- motioneye/static/img/camera-action-button-down.svg +1 -0
- motioneye/static/img/camera-action-button-left.svg +1 -0
- motioneye/static/img/camera-action-button-light-off.svg +1 -0
- motioneye/static/img/camera-action-button-light-on.svg +1 -0
- motioneye/static/img/camera-action-button-lock.svg +1 -0
- motioneye/static/img/camera-action-button-preset.svg +1 -0
- motioneye/static/img/camera-action-button-record-start.svg +1 -0
- motioneye/static/img/camera-action-button-record-stop.svg +1 -0
- motioneye/static/img/camera-action-button-right.svg +1 -0
- motioneye/static/img/camera-action-button-snapshot.svg +1 -0
- motioneye/static/img/camera-action-button-unlock.svg +1 -0
- motioneye/static/img/camera-action-button-up.svg +1 -0
- motioneye/static/img/camera-action-button-zoom-in.svg +1 -0
- motioneye/static/img/camera-action-button-zoom-out.svg +1 -0
- motioneye/static/img/camera-progress.gif +0 -0
- motioneye/static/img/camera-top-buttons.svg +1 -0
- motioneye/static/img/combo-box-arrow.svg +1 -0
- motioneye/static/img/main-loading-progress.gif +0 -0
- motioneye/static/img/modal-progress.gif +0 -0
- motioneye/static/img/motioneye-icon.svg +1 -0
- motioneye/static/img/motioneye-logo.svg +1 -0
- motioneye/static/img/no-camera.svg +1 -0
- motioneye/static/img/no-preview.svg +1 -0
- motioneye/static/img/slider-arrow.svg +1 -0
- motioneye/static/img/small-progress.gif +0 -0
- motioneye/static/img/top-bar-buttons.svg +1 -0
- motioneye/static/img/validation-error.svg +1 -0
- motioneye/static/js/css-browser-selector.min.js +3 -0
- motioneye/static/js/frame.js +143 -0
- motioneye/static/js/gettext.min.js +2 -0
- motioneye/static/js/jquery.min.js +2 -0
- motioneye/static/js/jquery.mousewheel.min.js +5 -0
- motioneye/static/js/jquery.timepicker.min.js +2 -0
- motioneye/static/js/main.js +5549 -0
- motioneye/static/js/motioneye.ar.json +165 -0
- motioneye/static/js/motioneye.bn.json +165 -0
- motioneye/static/js/motioneye.ca.json +165 -0
- motioneye/static/js/motioneye.cs.json +165 -0
- motioneye/static/js/motioneye.da.json +165 -0
- motioneye/static/js/motioneye.de.json +165 -0
- motioneye/static/js/motioneye.el.json +165 -0
- motioneye/static/js/motioneye.en.json +165 -0
- motioneye/static/js/motioneye.es.json +165 -0
- motioneye/static/js/motioneye.fi.json +165 -0
- motioneye/static/js/motioneye.fr.json +165 -0
- motioneye/static/js/motioneye.hi.json +165 -0
- motioneye/static/js/motioneye.hu.json +165 -0
- motioneye/static/js/motioneye.it.json +165 -0
- motioneye/static/js/motioneye.ja.json +165 -0
- motioneye/static/js/motioneye.ko.json +165 -0
- motioneye/static/js/motioneye.ms.json +165 -0
- motioneye/static/js/motioneye.nb_NO.json +165 -0
- motioneye/static/js/motioneye.ne.json +165 -0
- motioneye/static/js/motioneye.nl.json +165 -0
- motioneye/static/js/motioneye.pa.json +165 -0
- motioneye/static/js/motioneye.pl.json +165 -0
- motioneye/static/js/motioneye.pt.json +165 -0
- motioneye/static/js/motioneye.ro.json +165 -0
- motioneye/static/js/motioneye.ru.json +165 -0
- motioneye/static/js/motioneye.sk.json +165 -0
- motioneye/static/js/motioneye.sv.json +165 -0
- motioneye/static/js/motioneye.ta.json +165 -0
- motioneye/static/js/motioneye.tr.json +165 -0
- motioneye/static/js/motioneye.uk.json +165 -0
- motioneye/static/js/motioneye.zh.json +165 -0
- motioneye/static/js/ui.js +1141 -0
- motioneye/static/js/version.js +6 -0
- motioneye/tasks.py +160 -0
- motioneye/template.py +77 -0
- motioneye/templates/base.html +30 -0
- motioneye/templates/main.html +1341 -0
- motioneye/templates/manifest.json +14 -0
- motioneye/templates/version.html +17 -0
- motioneye/update.py +124 -0
- motioneye/uploadservices.py +1422 -0
- motioneye/utils/__init__.py +673 -0
- motioneye/utils/dtconv.py +174 -0
- motioneye/utils/http.py +62 -0
- motioneye/utils/mjpeg.py +138 -0
- motioneye/utils/rtmp.py +32 -0
- motioneye/utils/rtsp.py +255 -0
- motioneye/webhook.py +77 -0
- motioneye/wsswitch.py +141 -0
- motioneye-0.43.1.dist-info/METADATA +121 -0
- motioneye-0.43.1.dist-info/RECORD +179 -0
- motioneye-0.43.1.dist-info/WHEEL +5 -0
- motioneye-0.43.1.dist-info/entry_points.txt +3 -0
- motioneye-0.43.1.dist-info/licenses/LICENSE +674 -0
- motioneye-0.43.1.dist-info/top_level.txt +1 -0
motioneye/__init__.py
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
VERSION = "0.43.1"
|
motioneye/cleanup.py
ADDED
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
# Copyright (c) 2013 Calin Crisan
|
|
2
|
+
# This file is part of motionEye.
|
|
3
|
+
#
|
|
4
|
+
# motionEye is free software: you can redistribute it and/or modify
|
|
5
|
+
# it under the terms of the GNU General Public License as published by
|
|
6
|
+
# the Free Software Foundation, either version 3 of the License, or
|
|
7
|
+
# (at your option) any later version.
|
|
8
|
+
#
|
|
9
|
+
# This program is distributed in the hope that it will be useful,
|
|
10
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
11
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
12
|
+
# GNU General Public License for more details.
|
|
13
|
+
#
|
|
14
|
+
# You should have received a copy of the GNU General Public License
|
|
15
|
+
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
16
|
+
|
|
17
|
+
import datetime
|
|
18
|
+
import logging
|
|
19
|
+
import multiprocessing
|
|
20
|
+
import os
|
|
21
|
+
import signal
|
|
22
|
+
|
|
23
|
+
from tornado.ioloop import IOLoop
|
|
24
|
+
|
|
25
|
+
from motioneye import mediafiles, settings
|
|
26
|
+
|
|
27
|
+
_process = None
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
def start():
|
|
31
|
+
if not settings.CLEANUP_INTERVAL:
|
|
32
|
+
return
|
|
33
|
+
|
|
34
|
+
# schedule the first call a bit later to improve performance at startup
|
|
35
|
+
io_loop = IOLoop.current()
|
|
36
|
+
io_loop.add_timeout(
|
|
37
|
+
datetime.timedelta(seconds=min(settings.CLEANUP_INTERVAL, 60)), _run_process
|
|
38
|
+
)
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
def stop():
|
|
42
|
+
global _process
|
|
43
|
+
|
|
44
|
+
if not running():
|
|
45
|
+
_process = None
|
|
46
|
+
return
|
|
47
|
+
|
|
48
|
+
if _process.is_alive():
|
|
49
|
+
_process.join(timeout=10)
|
|
50
|
+
|
|
51
|
+
if _process.is_alive():
|
|
52
|
+
logging.error('cleanup process did not finish in time, killing it...')
|
|
53
|
+
os.kill(_process.pid, signal.SIGKILL)
|
|
54
|
+
|
|
55
|
+
_process = None
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
def running():
|
|
59
|
+
return _process is not None and _process.is_alive()
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
def _run_process():
|
|
63
|
+
global _process
|
|
64
|
+
|
|
65
|
+
io_loop = IOLoop.current()
|
|
66
|
+
|
|
67
|
+
# schedule the next call
|
|
68
|
+
io_loop.add_timeout(
|
|
69
|
+
datetime.timedelta(seconds=settings.CLEANUP_INTERVAL), _run_process
|
|
70
|
+
)
|
|
71
|
+
|
|
72
|
+
if not running(): # check that the previous process has finished
|
|
73
|
+
logging.debug('running cleanup process...')
|
|
74
|
+
|
|
75
|
+
_process = multiprocessing.Process(target=_do_cleanup)
|
|
76
|
+
_process.start()
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
def _do_cleanup():
|
|
80
|
+
# this will be executed in a separate subprocess
|
|
81
|
+
|
|
82
|
+
# ignore the terminate and interrupt signals in this subprocess
|
|
83
|
+
signal.signal(signal.SIGINT, signal.SIG_IGN)
|
|
84
|
+
signal.signal(signal.SIGTERM, signal.SIG_IGN)
|
|
85
|
+
|
|
86
|
+
try:
|
|
87
|
+
mediafiles.cleanup_media('picture')
|
|
88
|
+
mediafiles.cleanup_media('movie')
|
|
89
|
+
logging.debug('cleanup done')
|
|
90
|
+
|
|
91
|
+
except Exception as e:
|
|
92
|
+
logging.error(f'failed to cleanup media files: {str(e)}', exc_info=True)
|