]> www.vanbest.org Git - motioneye-debian/commitdiff
smbctl: compare all mount details as lowercase strings
authorCalin Crisan <ccrisan@gmail.com>
Sat, 5 Aug 2017 15:12:43 +0000 (18:12 +0300)
committerCalin Crisan <ccrisan@gmail.com>
Sat, 5 Aug 2017 15:12:43 +0000 (18:12 +0300)
motioneye/smbctl.py
motioneye/static/js/main.js

index 4a7d48ba5e1aba0d026a4c5a7cf7016082d4c8d8..da3384082009e68c45be664f61373e9a186166c1 100644 (file)
@@ -104,9 +104,9 @@ def list_mounts():
             logging.debug('found smb mount "//%s/%s" at "%s"' % (server, share, mount_point))
             
             mounts.append({
-                'server': server,
-                'share': share,
-                'username': username,
+                'server': server.lower(),
+                'share': share.lower(),
+                'username': username.lower(),
                 'mount_point': mount_point
             })
 
@@ -122,7 +122,7 @@ def update_mounts():
     should_stop = False  # indicates that motion should be stopped immediately
     should_start = True  # indicates that motion can be started afterwards
     for network_share in network_shares:
-        key = (network_share['server'], network_share['share'], network_share['username'] or '')
+        key = (network_share['server'].lower(), network_share['share'].lower(), network_share['username'].lower() or '')
         if key in mounts:  # found
             mounts[key] = True
         
index e5fb62119d1d020fbd3abb64e019f00c092947fd..859b7da9e6b7e1723b7ce10e9e82aa0160536d22 100644 (file)
@@ -4950,6 +4950,11 @@ function refreshCameraFrames() {
             if (this.config['proto'] == 'mjpeg') {
                 var url = this.config['url'].replace('127.0.0.1', window.location.host.split(':')[0]);
                 url += (url.indexOf('?') > 0 ? '&' : '?') + '_=' + new Date().getTime();
+
+                /* if (url.indexOf('@') >= 0) {
+                    url = url.substring(0, url.indexOf('//') + 2)+ url.substring(url.indexOf('@') + 1);
+                } */
+
                 this.img.src = url;
             }
         }