diff --git a/dashboard-ui/bower_components/emby-apiclient/.bower.json b/dashboard-ui/bower_components/emby-apiclient/.bower.json index 77a5203028..c911f2a5c9 100644 --- a/dashboard-ui/bower_components/emby-apiclient/.bower.json +++ b/dashboard-ui/bower_components/emby-apiclient/.bower.json @@ -16,12 +16,12 @@ }, "devDependencies": {}, "ignore": [], - "version": "1.1.85", - "_release": "1.1.85", + "version": "1.1.86", + "_release": "1.1.86", "_resolution": { "type": "version", - "tag": "1.1.85", - "commit": "6fc42ba6b9d72c3e4af4a7b7797d53b08342f095" + "tag": "1.1.86", + "commit": "a6eb0622d2498b239814205e3313531bdbe15ad7" }, "_source": "https://github.com/MediaBrowser/Emby.ApiClient.Javascript.git", "_target": "^1.1.51", diff --git a/dashboard-ui/bower_components/emby-apiclient/apiclient.js b/dashboard-ui/bower_components/emby-apiclient/apiclient.js index ab55290e68..f061795106 100644 --- a/dashboard-ui/bower_components/emby-apiclient/apiclient.js +++ b/dashboard-ui/bower_components/emby-apiclient/apiclient.js @@ -1,4 +1,5 @@ define(['events'], function (events) { + 'use strict'; /** * Creates a new api client instance @@ -29,11 +30,11 @@ if (val != null) { - if (val.toLowerCase().indexOf('http') != 0) { + if (val.toLowerCase().indexOf('http') !== 0) { throw new Error('Invalid url: ' + val); } - var changed = val != serverAddress; + var changed = val !== serverAddress; serverAddress = val; @@ -189,7 +190,7 @@ var headers = request.headers || {}; - if (request.dataType == 'json') { + if (request.dataType === 'json') { headers.accept = 'application/json'; } @@ -274,16 +275,16 @@ self.setRequestHeaders(request.headers); } - if (self.enableAutomaticNetworking === false || request.type != "GET") { + if (self.enableAutomaticNetworking === false || request.type !== "GET") { console.log('Requesting url without automatic networking: ' + request.url); return getFetchPromise(request).then(function (response) { if (response.status < 400) { - if (request.dataType == 'json' || request.headers.accept == 'application/json') { + if (request.dataType === 'json' || request.headers.accept === 'application/json') { return response.json(); - } else if (request.dataType == 'text' || (response.headers.get('Content-Type') || '').toLowerCase().indexOf('text/') == 0) { + } else if (request.dataType === 'text' || (response.headers.get('Content-Type') || '').toLowerCase().indexOf('text/') === 0) { return response.text(); } else { return response; @@ -349,7 +350,7 @@ console.log("Attempting reconnection to " + url); - var timeout = connectionMode == MediaBrowser.ConnectionMode.Local ? 7000 : 15000; + var timeout = connectionMode === MediaBrowser.ConnectionMode.Local ? 7000 : 15000; fetchWithTimeout(url + "/system/info/public", { @@ -406,9 +407,9 @@ if (response.status < 400) { - if (request.dataType == 'json' || request.headers.accept == 'application/json') { + if (request.dataType === 'json' || request.headers.accept === 'application/json') { return response.json(); - } else if (request.dataType == 'text' || (response.headers.get('Content-Type') || '').toLowerCase().indexOf('text/') == 0) { + } else if (request.dataType === 'text' || (response.headers.get('Content-Type') || '').toLowerCase().indexOf('text/') === 0) { return response.text(); } else { return response; @@ -478,11 +479,11 @@ throw new Error("serverAddress is yet not set"); } var lowered = url.toLowerCase(); - if (lowered.indexOf('/emby') == -1 && lowered.indexOf('/mediabrowser') == -1) { + if (lowered.indexOf('/emby') === -1 && lowered.indexOf('/mediabrowser') === -1) { url += '/emby'; } - if (name.charAt(0) != '/') { + if (name.charAt(0) !== '/') { url += '/'; } @@ -602,7 +603,7 @@ else if (msg.MessageType === "UserUpdated" || msg.MessageType === "UserConfigurationUpdated") { var user = msg.Data; - if (user.Id == self.getCurrentUserId()) { + if (user.Id === self.getCurrentUserId()) { currentUser = null; } @@ -674,13 +675,13 @@ return self.getDownloadSpeed(1000000).then(function (bitrate) { if (bitrate < 1000000) { - return Math.round(bitrate * .8); + return Math.round(bitrate * 0.8); } else { // If that produced a fairly high speed, try again with a larger size to get a more accurate result return self.getDownloadSpeed(2400000).then(function (bitrate) { - return Math.round(bitrate * .8); + return Math.round(bitrate * 0.8); }); } @@ -2073,7 +2074,7 @@ throw new Error("File must be an image."); } - if (file.type != "image/png" && file.type != "image/jpeg" && file.type != "image/jpeg") { + if (file.type !== "image/png" && file.type !== "image/jpeg" && file.type !== "image/jpeg") { throw new Error("File must be an image."); } @@ -2130,7 +2131,7 @@ throw new Error("File must be an image."); } - if (file.type != "image/png" && file.type != "image/jpeg" && file.type != "image/jpeg") { + if (file.type !== "image/png" && file.type !== "image/jpeg" && file.type !== "image/jpeg") { throw new Error("File must be an image."); } @@ -2364,7 +2365,7 @@ }; self.getDefaultImageQuality = function (imageType) { - return imageType.toLowerCase() == 'backdrop' ? 80 : 90; + return imageType.toLowerCase() === 'backdrop' ? 80 : 90; }; function normalizeImageOptions(options) { @@ -2904,7 +2905,7 @@ var url; - if ((typeof userId).toString().toLowerCase() == 'string') { + if ((typeof userId).toString().toLowerCase() === 'string') { url = self.getUrl("Users/" + userId + "/Items", options); } else { diff --git a/dashboard-ui/bower_components/emby-apiclient/appstorage-cache.js b/dashboard-ui/bower_components/emby-apiclient/appstorage-cache.js index bc39d2914d..4f2064f6ea 100644 --- a/dashboard-ui/bower_components/emby-apiclient/appstorage-cache.js +++ b/dashboard-ui/bower_components/emby-apiclient/appstorage-cache.js @@ -1,4 +1,5 @@ define([], function () { + 'use strict'; var myStore = {}; var cache; @@ -11,7 +12,7 @@ myStore.setItem = function (name, value) { if (localData) { - var changed = localData[name] != value; + var changed = localData[name] !== value; if (changed) { localData[name] = value; diff --git a/dashboard-ui/bower_components/emby-apiclient/appstorage-localstorage.js b/dashboard-ui/bower_components/emby-apiclient/appstorage-localstorage.js index af6f004ea0..bdfd7ad168 100644 --- a/dashboard-ui/bower_components/emby-apiclient/appstorage-localstorage.js +++ b/dashboard-ui/bower_components/emby-apiclient/appstorage-localstorage.js @@ -1,4 +1,5 @@ define([], function () { + 'use strict'; var myStore = {}; var cache; @@ -12,7 +13,7 @@ localStorage.setItem(name, value); if (localData) { - var changed = localData[name] != value; + var changed = localData[name] !== value; if (changed) { localData[name] = value; diff --git a/dashboard-ui/bower_components/emby-apiclient/appstorage-memory.js b/dashboard-ui/bower_components/emby-apiclient/appstorage-memory.js index fb291d1e60..4827d398ec 100644 --- a/dashboard-ui/bower_components/emby-apiclient/appstorage-memory.js +++ b/dashboard-ui/bower_components/emby-apiclient/appstorage-memory.js @@ -1,21 +1,22 @@ define([], function () { + 'use strict'; - function myStore(defaultObject) { + function MyStore(defaultObject) { this.localData = {}; } - myStore.prototype.setItem = function (name, value) { + MyStore.prototype.setItem = function (name, value) { this.localData[name] = value; }; - myStore.prototype.getItem = function (name) { + MyStore.prototype.getItem = function (name) { return this.localData[name]; }; - myStore.prototype.removeItem = function (name) { + MyStore.prototype.removeItem = function (name) { this.localData[name] = null; }; - return new myStore(); + return new MyStore(); }); \ No newline at end of file diff --git a/dashboard-ui/bower_components/emby-apiclient/connectionmanager.js b/dashboard-ui/bower_components/emby-apiclient/connectionmanager.js index f547021dcd..2713d79ae4 100644 --- a/dashboard-ui/bower_components/emby-apiclient/connectionmanager.js +++ b/dashboard-ui/bower_components/emby-apiclient/connectionmanager.js @@ -1,4 +1,5 @@ define(['events', 'apiclient', 'appStorage'], function (events, apiClientFactory, appStorage) { + 'use strict'; var ConnectionState = { Unavailable: 0, @@ -83,7 +84,7 @@ var headers = request.headers || {}; - if (request.dataType == 'json') { + if (request.dataType === 'json') { headers.accept = 'application/json'; } @@ -177,7 +178,7 @@ if (response.status < 400) { - if (request.dataType == 'json' || request.headers.accept == 'application/json') { + if (request.dataType === 'json' || request.headers.accept === 'application/json') { return response.json(); } else { return response; @@ -256,7 +257,7 @@ return servers.filter(function (s) { - return s.Id == id; + return s.Id === id; })[0]; }; @@ -402,7 +403,7 @@ var credentials = credentialProvider.credentials(); var servers = credentials.Servers.filter(function (s) { - return s.Id == result.ServerId; + return s.Id === result.ServerId; }); var server = servers.length ? servers[0] : apiClient.serverInfo(); @@ -435,7 +436,7 @@ var info = { Id: user.Id, IsSignedInOffline: true - } + }; credentialProvider.addOrUpdateUser(server, info); } @@ -471,7 +472,7 @@ return new Promise(function (resolve, reject) { - if (connectUser && connectUser.Id == credentials.ConnectUserId) { + if (connectUser && connectUser.Id === credentials.ConnectUserId) { resolve(); } @@ -707,7 +708,7 @@ var credentials = credentialProvider.credentials(); var servers = credentials.Servers.filter(function (u) { - return u.UserLinkType != "Guest"; + return u.UserLinkType !== "Guest"; }); for (var j = 0, numServers = servers.length; j < numServers; j++) { @@ -785,7 +786,7 @@ Name: i.Name, RemoteAddress: i.Url, LocalAddress: i.LocalAddress, - UserLinkType: (i.UserType || '').toLowerCase() == "guest" ? "Guest" : "LinkedUser" + UserLinkType: (i.UserType || '').toLowerCase() === "guest" ? "Guest" : "LinkedUser" }; }); @@ -849,7 +850,7 @@ return connectServers.filter(function (connectServer) { - return server.Id == connectServer.Id; + return server.Id === connectServer.Id; }).length > 0; }); @@ -924,11 +925,11 @@ console.log('Begin connectToServers, with ' + servers.length + ' servers'); - if (servers.length == 1) { + if (servers.length === 1) { return self.connectToServer(servers[0], options).then(function (result) { - if (result.State == ConnectionState.Unavailable) { + if (result.State === ConnectionState.Unavailable) { result.State = result.ConnectUser == null ? ConnectionState.ConnectSignIn : @@ -945,7 +946,7 @@ if (firstServer) { return self.connectToServer(firstServer, options).then(function (result) { - if (result.State == ConnectionState.SignedIn) { + if (result.State === ConnectionState.SignedIn) { return result; @@ -992,9 +993,9 @@ if (server.LastConnectionMode != null) { //tests.push(server.LastConnectionMode); } - if (tests.indexOf(ConnectionMode.Manual) == -1) { tests.push(ConnectionMode.Manual); } - if (tests.indexOf(ConnectionMode.Local) == -1) { tests.push(ConnectionMode.Local); } - if (tests.indexOf(ConnectionMode.Remote) == -1) { tests.push(ConnectionMode.Remote); } + if (tests.indexOf(ConnectionMode.Manual) === -1) { tests.push(ConnectionMode.Manual); } + if (tests.indexOf(ConnectionMode.Local) === -1) { tests.push(ConnectionMode.Local); } + if (tests.indexOf(ConnectionMode.Remote) === -1) { tests.push(ConnectionMode.Remote); } //beginWakeServer(server); @@ -1007,7 +1008,7 @@ function stringEqualsIgnoreCase(str1, str2) { - return (str1 || '').toLowerCase() == (str2 || '').toLowerCase(); + return (str1 || '').toLowerCase() === (str2 || '').toLowerCase(); } function compareVersions(a, b) { @@ -1049,7 +1050,7 @@ var skipTest = false; var timeout = defaultTimeout; - if (mode == ConnectionMode.Local) { + if (mode === ConnectionMode.Local) { enableRetry = true; timeout = 8000; @@ -1060,7 +1061,7 @@ } } - else if (mode == ConnectionMode.Manual) { + else if (mode === ConnectionMode.Manual) { if (stringEqualsIgnoreCase(address, server.LocalAddress)) { enableRetry = true; @@ -1078,7 +1079,7 @@ tryConnect(address, timeout).then(function (result) { - if (compareVersions(self.minServerVersion(), result.Version) == 1) { + if (compareVersions(self.minServerVersion(), result.Version) === 1) { console.log('minServerVersion requirement not met. Server version: ' + result.Version); resolve({ @@ -1178,7 +1179,7 @@ result.Servers.push(server); result.ApiClient.updateServerInfo(server, connectionMode); - if (result.State == ConnectionState.SignedIn) { + if (result.State === ConnectionState.SignedIn) { afterConnected(result.ApiClient, options); } @@ -1197,7 +1198,7 @@ // attempt to correct bad input address = address.trim(); - if (address.toLowerCase().indexOf('http') != 0) { + if (address.toLowerCase().indexOf('http') !== 0) { address = "http://" + address; } @@ -1314,7 +1315,7 @@ reject({ errorCode: 'passwordmatch' }); return; } - if (password != passwordConfirm) { + if (password !== passwordConfirm) { reject({ errorCode: 'passwordmatch' }); return; } @@ -1406,7 +1407,7 @@ var serverInfo = a.serverInfo(); // We have to keep this hack in here because of the addApiClient method - return !serverInfo || serverInfo.Id == item; + return !serverInfo || serverInfo.Id === item; })[0]; }; @@ -1443,7 +1444,7 @@ } var server = credentialProvider.credentials().Servers.filter(function (s) { - return s.Id == serverId; + return s.Id === serverId; }); server = server.length ? server[0] : null; @@ -1453,7 +1454,7 @@ var credentials = credentialProvider.credentials(); credentials.Servers = credentials.Servers.filter(function (s) { - return s.Id != serverId; + return s.Id !== serverId; }); credentialProvider.credentials(credentials); @@ -1560,7 +1561,7 @@ console.log('getRegistrationInfo has cached info'); - if (regInfo.deviceId == params.deviceId) { + if (regInfo.deviceId === params.deviceId) { console.log('getRegistrationInfo returning cached info'); return Promise.resolve(); } @@ -1593,17 +1594,17 @@ var status = response.status; console.log('getRegistrationInfo response: ' + status); - if (status == 200) { + if (status === 200) { appStorage.setItem(cacheKey, JSON.stringify({ lastValidDate: new Date().getTime(), deviceId: params.deviceId })); return Promise.resolve(); } - if (status == 401) { + if (status === 401) { return Promise.reject(); } - if (status == 403) { + if (status === 403) { return Promise.reject('overlimit'); } diff --git a/dashboard-ui/bower_components/emby-apiclient/credentials.js b/dashboard-ui/bower_components/emby-apiclient/credentials.js index 35807d3a01..35c37d999c 100644 --- a/dashboard-ui/bower_components/emby-apiclient/credentials.js +++ b/dashboard-ui/bower_components/emby-apiclient/credentials.js @@ -1,4 +1,5 @@ define(['events', 'appStorage'], function (events, appStorage) { + 'use strict'; return function (key) { @@ -57,7 +58,7 @@ } var existing = list.filter(function (s) { - return s.Id == server.Id; + return s.Id === server.Id; })[0]; if (existing) { @@ -109,7 +110,7 @@ server.Users = server.Users || []; var existing = server.Users.filter(function (s) { - return s.Id == user.Id; + return s.Id === user.Id; })[0]; if (existing) { diff --git a/dashboard-ui/bower_components/emby-apiclient/events.js b/dashboard-ui/bower_components/emby-apiclient/events.js index 39ed006f5f..f356da5789 100644 --- a/dashboard-ui/bower_components/emby-apiclient/events.js +++ b/dashboard-ui/bower_components/emby-apiclient/events.js @@ -1,4 +1,5 @@ define([], function () { + 'use strict'; function getCallbacks(obj, name) { @@ -32,7 +33,7 @@ var list = getCallbacks(obj, eventName); var i = list.indexOf(fn); - if (i != -1) { + if (i !== -1) { list.splice(i, 1); } }, diff --git a/dashboard-ui/bower_components/emby-apiclient/fileupload.js b/dashboard-ui/bower_components/emby-apiclient/fileupload.js index 4007c646b6..2b8db0ddec 100644 --- a/dashboard-ui/bower_components/emby-apiclient/fileupload.js +++ b/dashboard-ui/bower_components/emby-apiclient/fileupload.js @@ -1,4 +1,5 @@ define([], function () { + 'use strict'; return function () { diff --git a/dashboard-ui/bower_components/emby-apiclient/localassetmanager.js b/dashboard-ui/bower_components/emby-apiclient/localassetmanager.js index a365f2f569..4ced1f00cb 100644 --- a/dashboard-ui/bower_components/emby-apiclient/localassetmanager.js +++ b/dashboard-ui/bower_components/emby-apiclient/localassetmanager.js @@ -1,4 +1,5 @@ define([], function () { + 'use strict'; function getLocalMediaSource(serverId, itemId) { return Promise.resolve(null); diff --git a/dashboard-ui/bower_components/emby-apiclient/serverdiscovery-chrome.js b/dashboard-ui/bower_components/emby-apiclient/serverdiscovery-chrome.js index 019333abdd..5cc54c97d3 100644 --- a/dashboard-ui/bower_components/emby-apiclient/serverdiscovery-chrome.js +++ b/dashboard-ui/bower_components/emby-apiclient/serverdiscovery-chrome.js @@ -1,4 +1,5 @@ define([], function () { + 'use strict'; function stringToArrayBuffer(string) { // UTF-16LE @@ -79,7 +80,7 @@ console.log(info); - if (info != null && info.socketId == socketId) { + if (info != null && info.socketId === socketId) { var json = arrayBufferToString(info.data); console.log('Server discovery json: ' + json); var server = JSON.parse(json); @@ -119,7 +120,7 @@ console.log('chrome.sockets.udp.bind'); chrome.sockets.udp.bind(createInfo.socketId, '0.0.0.0', 0, function (bindResult) { - if (getResultCode(bindResult) != 0) { + if (getResultCode(bindResult) !== 0) { console.log('bind fail: ' + bindResult); return; } @@ -130,7 +131,7 @@ chrome.sockets.udp.send(createInfo.socketId, data, '255.255.255.255', port, function (sendResult) { - if (getResultCode(sendResult) != 0) { + if (getResultCode(sendResult) !== 0) { console.log('send fail: ' + sendResult); } else { diff --git a/dashboard-ui/bower_components/emby-apiclient/serverdiscovery-winjs.js b/dashboard-ui/bower_components/emby-apiclient/serverdiscovery-winjs.js index 06de593f08..93e8bc26c5 100644 --- a/dashboard-ui/bower_components/emby-apiclient/serverdiscovery-winjs.js +++ b/dashboard-ui/bower_components/emby-apiclient/serverdiscovery-winjs.js @@ -1,4 +1,5 @@ define([], function () { + 'use strict'; function listenerSession(resolve, timeoutMs) { @@ -78,7 +79,7 @@ var stringLength = eventArguments.getDataReader().unconsumedBufferLength; var receivedMessage = eventArguments.getDataReader().readString(stringLength); - if (receivedMessage == stringToSend) { + if (receivedMessage === stringToSend) { return; } @@ -97,7 +98,7 @@ servers.push(server); } catch (exception) { - onError("Error receiving message: " + receivedMessage); + onError("Error receiving message: " + exception); } } diff --git a/dashboard-ui/bower_components/emby-apiclient/serverdiscovery.js b/dashboard-ui/bower_components/emby-apiclient/serverdiscovery.js index 10c926a16f..5406b102b0 100644 --- a/dashboard-ui/bower_components/emby-apiclient/serverdiscovery.js +++ b/dashboard-ui/bower_components/emby-apiclient/serverdiscovery.js @@ -1,4 +1,5 @@ define([], function () { + 'use strict'; return { diff --git a/dashboard-ui/bower_components/emby-apiclient/sync/contentuploader.js b/dashboard-ui/bower_components/emby-apiclient/sync/contentuploader.js index 90e62e3100..b3c423e93b 100644 --- a/dashboard-ui/bower_components/emby-apiclient/sync/contentuploader.js +++ b/dashboard-ui/bower_components/emby-apiclient/sync/contentuploader.js @@ -1,4 +1,5 @@ define(['localassetmanager'], function (localAssetManager) { + 'use strict'; return function (connectionManager) { @@ -43,9 +44,9 @@ return uploadHistory.FilesUploaded.filter(function (u) { - return getUploadId(file) == u.Id; + return getUploadId(file) === u.Id; - }).length == 0; + }).length === 0; }); } diff --git a/dashboard-ui/bower_components/emby-apiclient/sync/mediasync.js b/dashboard-ui/bower_components/emby-apiclient/sync/mediasync.js index 2965084178..bf00460023 100644 --- a/dashboard-ui/bower_components/emby-apiclient/sync/mediasync.js +++ b/dashboard-ui/bower_components/emby-apiclient/sync/mediasync.js @@ -1,4 +1,5 @@ define(['localassetmanager'], function (LocalAssetManager) { + 'use strict'; return function () { @@ -248,55 +249,54 @@ // Just for now while media syncing gets worked out deferred.resolve(); - return; - var libraryItem = localItem.Item; + //var libraryItem = localItem.Item; - var serverId = libraryItem.ServerId; - var itemId = null; - var imageTag = null; - var imageType = "Primary"; + //var serverId = libraryItem.ServerId; + //var itemId = null; + //var imageTag = null; + //var imageType = "Primary"; - switch (index) { + //switch (index) { - case 0: - itemId = libraryItem.Id; - imageType = "Primary"; - imageTag = (libraryItem.ImageTags || {})["Primary"]; - break; - case 1: - itemId = libraryItem.SeriesId; - imageType = "Primary"; - imageTag = libraryItem.SeriesPrimaryImageTag; - break; - case 2: - itemId = libraryItem.SeriesId; - imageType = "Thumb"; - imageTag = libraryItem.SeriesPrimaryImageTag; - break; - case 3: - itemId = libraryItem.AlbumId; - imageType = "Primary"; - imageTag = libraryItem.AlbumPrimaryImageTag; - break; - default: - break; - } + // case 0: + // itemId = libraryItem.Id; + // imageType = "Primary"; + // imageTag = (libraryItem.ImageTags || {})["Primary"]; + // break; + // case 1: + // itemId = libraryItem.SeriesId; + // imageType = "Primary"; + // imageTag = libraryItem.SeriesPrimaryImageTag; + // break; + // case 2: + // itemId = libraryItem.SeriesId; + // imageType = "Thumb"; + // imageTag = libraryItem.SeriesPrimaryImageTag; + // break; + // case 3: + // itemId = libraryItem.AlbumId; + // imageType = "Primary"; + // imageTag = libraryItem.AlbumPrimaryImageTag; + // break; + // default: + // break; + //} - if (!itemId || !imageTag) { - getNextImage(index + 1, apiClient, localItem, deferred); - return; - } + //if (!itemId || !imageTag) { + // getNextImage(index + 1, apiClient, localItem, deferred); + // return; + //} - downloadImage(apiClient, serverId, itemId, imageTag, imageType).then(function () { + //downloadImage(apiClient, serverId, itemId, imageTag, imageType).then(function () { - // For the sake of simplicity, limit to one image - deferred.resolve(); - return; + // // For the sake of simplicity, limit to one image + // deferred.resolve(); + // return; - getNextImage(index + 1, apiClient, localItem, deferred); + // getNextImage(index + 1, apiClient, localItem, deferred); - }, getOnFail(deferred)); + //}, getOnFail(deferred)); } function downloadImage(apiClient, serverId, itemId, imageTag, imageType) { @@ -340,7 +340,7 @@ } var files = jobItem.AdditionalFiles.filter(function (f) { - return f.Type == 'Subtitles'; + return f.Type === 'Subtitles'; }); var mediaSource = jobItem.Item.MediaSources[0]; @@ -375,7 +375,7 @@ var deferred = DeferredBuilder.Deferred(); var subtitleStream = mediaSource.MediaStreams.filter(function (m) { - return m.Type == 'Subtitle' && m.Index == file.Index; + return m.Type === 'Subtitle' && m.Index === file.Index; })[0]; if (!subtitleStream) { @@ -445,7 +445,7 @@ var userIdsWithAccess = syncDataResult.ItemUserAccess[itemId]; - if (userIdsWithAccess.join(',') == savedUserIdsWithAccess.join(',')) { + if (userIdsWithAccess.join(',') === savedUserIdsWithAccess.join(',')) { // Hasn't changed, nothing to do deferred.resolve(); } diff --git a/dashboard-ui/bower_components/emby-apiclient/sync/multiserversync.js b/dashboard-ui/bower_components/emby-apiclient/sync/multiserversync.js index 9b9975136f..d23a916aa7 100644 --- a/dashboard-ui/bower_components/emby-apiclient/sync/multiserversync.js +++ b/dashboard-ui/bower_components/emby-apiclient/sync/multiserversync.js @@ -1,4 +1,5 @@ define(['serversync'], function (ServerSync) { + 'use strict'; function syncNext(connectionManager, servers, index, options, resolve, reject) { diff --git a/dashboard-ui/bower_components/emby-apiclient/sync/offlineusersync.js b/dashboard-ui/bower_components/emby-apiclient/sync/offlineusersync.js index aebecc3e43..712782b887 100644 --- a/dashboard-ui/bower_components/emby-apiclient/sync/offlineusersync.js +++ b/dashboard-ui/bower_components/emby-apiclient/sync/offlineusersync.js @@ -1,4 +1,5 @@ define(['localassetmanager'], function (localAssetManager) { + 'use strict'; function syncNext(users, index, resolve, reject, apiClient, server) { diff --git a/dashboard-ui/bower_components/emby-apiclient/sync/serversync.js b/dashboard-ui/bower_components/emby-apiclient/sync/serversync.js index e31d8b0760..ea050ec29f 100644 --- a/dashboard-ui/bower_components/emby-apiclient/sync/serversync.js +++ b/dashboard-ui/bower_components/emby-apiclient/sync/serversync.js @@ -1,4 +1,5 @@ define([], function () { + 'use strict'; return function (connectionManager) { @@ -20,7 +21,7 @@ return connectionManager.connectToServer(server, connectionOptions).then(function (result) { - if (result.State == MediaBrowser.ConnectionState.SignedIn) { + if (result.State === MediaBrowser.ConnectionState.SignedIn) { return performSync(server, options); } else { console.log('Unable to connect to server id: ' + server.Id); @@ -42,7 +43,7 @@ var uploadPhotos = options.uploadPhotos !== false; - if (options.cameraUploadServers && options.cameraUploadServers.indexOf(server.Id) == -1) { + if (options.cameraUploadServers && options.cameraUploadServers.indexOf(server.Id) === -1) { uploadPhotos = false; } diff --git a/dashboard-ui/bower_components/emby-apiclient/wakeonlan.js b/dashboard-ui/bower_components/emby-apiclient/wakeonlan.js index 7897b199e7..b6f3cbd8ab 100644 --- a/dashboard-ui/bower_components/emby-apiclient/wakeonlan.js +++ b/dashboard-ui/bower_components/emby-apiclient/wakeonlan.js @@ -1,4 +1,5 @@ define([], function () { + 'use strict'; function send(info) {