]> www.vanbest.org Git - motioneye-debian/commitdiff
Merge branch 'event_end' of https://github.com/jcsilva/motioneye into jcsilva-event_end
authorCalin Crisan <ccrisan@gmail.com>
Sat, 5 Aug 2017 16:34:39 +0000 (19:34 +0300)
committerCalin Crisan <ccrisan@gmail.com>
Sat, 5 Aug 2017 16:34:39 +0000 (19:34 +0300)
1  2 
motioneye/config.py
motioneye/static/js/main.js
motioneye/templates/main.html

index 2a8be05861db677d520baada7d3aaa6057d97693,91ec1b1f8322c80708bfe5276f1c1bced5430ad9..9c36b9b8917427e442771b675d3b202a286aecda
@@@ -1045,11 -914,14 +1045,14 @@@ def motion_camera_ui_to_dict(ui, old_co
      # event end
      on_event_end = ['%(script)s stop %%t' % {'script': meyectl.find_command('relayevent')}]
  
+     if ui['command_post_notifications_enabled']:
+         on_event_end += utils.split_semicolon(ui['command_post_notifications_exec'])
+     
      data['on_event_end'] = '; '.join(on_event_end)
 -    
 +
      # movie end
      on_movie_end = ['%(script)s movie_end %%t %%f' % {'script': meyectl.find_command('relayevent')}]
 -    
 +
      if ui['web_hook_storage_enabled']:
          url = re.sub('\\s', '+', ui['web_hook_storage_url'])
  
Simple merge
index e6de44733247e3ab97c20f268f74efcdf800ca87,f05bb89a7a74d0dcde8e4cfd7b6d437086b88cc2..552a543cb240d0606763d363cee82a93a22d3201
                      <tr class="settings-item advanced-setting" required="true" depends="commandNotificationsEnabled motionDetectionEnabled" strip="true">
                          <td class="settings-item-label"><span class="settings-item-label">Command</span></td>
                          <td class="settings-item-value"><input type="text" class="styled notifications camera-config" id="commandNotificationsEntry" placeholder="command..."></td>
 -                        <td><span class="help-mark" title="a command to be executed when motion is detected; multiple commands can be separated by a semicolon; don't use semilcolons inside commands; the following special tokens are accepted: %Y = year, %m = month, %d = date, %H = hour, %M = minute, %S = second, %q = frame number">?</span></td>
 +                        <td><span class="help-mark" title="a command to be executed when motion is detected; multiple commands can be separated by a semicolon; don't use semilcolons inside commands; the following special tokens are accepted: %Y = year, %m = month, %d = day, %H = hour, %M = minute, %S = second, %q = frame number, %v = event number">?</span></td>
                      </tr>
+                     <tr class="settings-item advanced-setting" depends="motionDetectionEnabled">
+                         <td colspan="100"><div class="settings-item-separator"></div></td>
+                     </tr>
+                     <tr class="settings-item advanced-setting" depends="motionDetectionEnabled">
+                         <td class="settings-item-label"><span class="settings-item-label">Run A Post Command</span></td>
+                         <td class="settings-item-value"><input type="checkbox" class="styled notifications camera-config" id="commandPostNotificationsEnabledSwitch"></td>
+                         <td><span class="help-mark" title="enable this if you want to execute a command whenever a motion event is finished">?</span></td>
+                     </tr>
+                     <tr class="settings-item advanced-setting" required="true" depends="commandPostNotificationsEnabled motionDetectionEnabled" strip="true">
+                         <td class="settings-item-label"><span class="settings-item-label">Command</span></td>
+                         <td class="settings-item-value"><input type="text" class="styled notifications camera-config" id="commandPostNotificationsEntry" placeholder="command..."></td>
+                         <td><span class="help-mark" title="a command to be executed when motion event is finished; multiple commands can be separated by a semicolon; don't use semilcolons inside commands; the following special tokens are accepted: %Y = year, %m = month, %d = date, %H = hour, %M = minute, %S = second, %q = frame number">?</span></td>
+                     </tr>
                      {% for config in camera_sections.get('notifications', {}).get('configs', []) %}
                          {{config_item(config, "motionDetectionEnabled")}}
                      {% endfor %}