diff options
author | Evgeny Zinoviev <me@ch1p.io> | 2024-02-26 23:35:30 +0300 |
---|---|---|
committer | Evgeny Zinoviev <me@ch1p.io> | 2024-02-26 23:35:30 +0300 |
commit | d638bb4f58bf81c60ef218204b1fba75cf16b36a (patch) | |
tree | fe722115fb639aa8958d10dd6c5094db679826be /bin/ipcam_ntp_util.py | |
parent | c4f87ddad4058c0f331446fdfd8d762b8fc26c18 (diff) |
config changes
Diffstat (limited to 'bin/ipcam_ntp_util.py')
-rwxr-xr-x | bin/ipcam_ntp_util.py | 12 |
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() |