From: Calin Crisan Date: Sat, 5 Aug 2017 15:12:43 +0000 (+0300) Subject: smbctl: compare all mount details as lowercase strings X-Git-Url: http://www.vanbest.org/gitweb/?a=commitdiff_plain;h=c5875f4544288baa7394ce33126ffa11312af723;p=motioneye-debian smbctl: compare all mount details as lowercase strings --- diff --git a/motioneye/smbctl.py b/motioneye/smbctl.py index 4a7d48b..da33840 100644 --- a/motioneye/smbctl.py +++ b/motioneye/smbctl.py @@ -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 diff --git a/motioneye/static/js/main.js b/motioneye/static/js/main.js index e5fb621..859b7da 100644 --- a/motioneye/static/js/main.js +++ b/motioneye/static/js/main.js @@ -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; } }