Merge pull request #2137 from ccrisan/feature-motioneye-sntp

motionEye: add SNTP support
This commit is contained in:
Calin Crisan 2019-10-09 22:01:59 +03:00 committed by GitHub
commit ed0f5cb1cd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -375,9 +375,9 @@ def extraDateSeparator():
def dateMethod(): def dateMethod():
return { return {
'label': 'Date Method', 'label': 'Date Method',
'description': 'decides whether NTP or HTTP is used for setting and updating the system date', 'description': 'decides whether (S)NTP or HTTP is used for setting and updating the system date',
'type': 'choices', 'type': 'choices',
'choices': [('http', 'HTTP'), ('ntp', 'NTP')], 'choices': [('sntp', 'SNTP (recommended)'), ('ntp', 'NTP'), ('http', 'HTTP')],
'section': 'expertSettings', 'section': 'expertSettings',
'reboot': True, 'reboot': True,
'required': True, 'required': True,
@ -412,7 +412,7 @@ def dateNtpServer():
'section': 'expertSettings', 'section': 'expertSettings',
'reboot': True, 'reboot': True,
'required': False, 'required': False,
'depends': ['dateMethod==ntp'], 'depends': ['dateMethod==(ntp|sntp)'],
'get': _get_date_settings, 'get': _get_date_settings,
'set': _set_date_settings, 'set': _set_date_settings,
'get_set_dict': True 'get_set_dict': True