commit 3b183ca6178826622d3ccd471f519071d2c9294b parent 80187b63129e12119c10eb0d7beb0c26e989f247 Author: rob <rob@tarina.org> Date: Tue, 12 Sep 2023 15:12:15 +0100 check if network Diffstat:
M | tarina.py | | | 15 | +++++++++------ |
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/tarina.py b/tarina.py @@ -749,12 +749,15 @@ def main(): cameras.pop(camselected) newselected=0 elif pressed == 'middle' and menu[selected] == 'Add CAMERA': - newcamera = newcamera_ip(numbers_only, network) - if newcamera != '': - if newcamera not in cameras and newcamera not in networks: - cameras.append(newcamera) - rendermenu = True - vumetermessage("New camera! "+newcamera) + if networks != []: + newcamera = newcamera_ip(numbers_only, network) + if newcamera != '': + if newcamera not in cameras and newcamera not in networks: + cameras.append(newcamera) + rendermenu = True + vumetermessage("New camera! "+newcamera) + else: + vumetermessage('No network!') elif 'SYNCIP:' in pressed: ip = pressed.split(':')[1] vumetermessage('SYNCING!')