summaryrefslogtreecommitdiff
path: root/bin/ipcam_ntp_util.py
diff options
context:
space:
mode:
Diffstat (limited to 'bin/ipcam_ntp_util.py')
-rwxr-xr-xbin/ipcam_ntp_util.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/bin/ipcam_ntp_util.py b/bin/ipcam_ntp_util.py
index 077b00c..0461cc2 100755
--- a/bin/ipcam_ntp_util.py
+++ b/bin/ipcam_ntp_util.py
@@ -39,7 +39,7 @@ def process_camera(host: str,
except hikvision.ResponseError as e:
print(f'[{host}] ({str(e)})')
- elif camera_type.is_ali():
+ elif camera_type.is_xmeye():
try:
client = xmeye.XMEyeCamera(hostname=host, username=login, password=password)
client.login()
@@ -56,7 +56,7 @@ def process_camera(host: str,
def main():
- camera_types = ['hikvision', 'ali']
+ camera_types = ['hikvision', 'xmeye']
parser = ArgumentParser()
parser.add_argument('--camera', type=str)
parser.add_argument('--camera-type', type=str, choices=camera_types)
@@ -100,8 +100,8 @@ def main():
if args.camera_type == 'hikvision':
camera_type = CameraType.HIKVISION_264
- elif args.camera_type == 'ali':
- camera_type = CameraType.ALIEXPRESS_NONAME
+ elif args.camera_type == 'xmeye':
+ camera_type = CameraType.XMEYE
else:
raise ValueError('invalid --camera-type')
process_camera(camera_host, action, login, password, camera_type, **kwargs)
@@ -113,10 +113,10 @@ def main():
cam_type = ipcam_config.get_camera_type(cam)
if args.all_of_type == 'hikvision' and not cam_type.is_hikvision():
continue
- if args.all_of_type == 'ali' and not ipcam_config.get_camera_type(cam).is_ali():
+ if args.all_of_type == 'xmeye' and not ipcam_config.get_camera_type(cam).is_xmeye():
continue
process_camera(ipcam_config.get_camera_ip(cam), action, login, password, cam_type, **kwargs)
if __name__ == '__main__':
- main() \ No newline at end of file
+ main()