diff --git a/dashboard-ui/bower_components/emby-apiclient/.bower.json b/dashboard-ui/bower_components/emby-apiclient/.bower.json index 0049afb34..9f7932c5f 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.90", - "_release": "1.1.90", + "version": "1.1.91", + "_release": "1.1.91", "_resolution": { "type": "version", - "tag": "1.1.90", - "commit": "eb52e55b0f856ac89abcea9a71f475595d718627" + "tag": "1.1.91", + "commit": "f94b80f14bce6922acf1dbd749a60ad54e4abfd8" }, "_source": "https://github.com/MediaBrowser/Emby.ApiClient.Javascript.git", "_target": "^1.1.51", diff --git a/dashboard-ui/bower_components/emby-apiclient/connectionmanager.js b/dashboard-ui/bower_components/emby-apiclient/connectionmanager.js index 7733e5f94..209ca317e 100644 --- a/dashboard-ui/bower_components/emby-apiclient/connectionmanager.js +++ b/dashboard-ui/bower_components/emby-apiclient/connectionmanager.js @@ -1252,11 +1252,9 @@ if (!username) { return Promise.reject(); - return; } if (!password) { return Promise.reject(); - return; } return ajax({ diff --git a/dashboard-ui/bower_components/emby-webcomponents/.bower.json b/dashboard-ui/bower_components/emby-webcomponents/.bower.json index 18a9658d0..a1b7bb646 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/.bower.json +++ b/dashboard-ui/bower_components/emby-webcomponents/.bower.json @@ -14,12 +14,12 @@ }, "devDependencies": {}, "ignore": [], - "version": "1.4.314", - "_release": "1.4.314", + "version": "1.4.320", + "_release": "1.4.320", "_resolution": { "type": "version", - "tag": "1.4.314", - "commit": "087a1aa017a98fe347ce4388a794b3de13468a4d" + "tag": "1.4.320", + "commit": "5b3dc54cf24d4f615a59e5954726231e446cfced" }, "_source": "https://github.com/MediaBrowser/emby-webcomponents.git", "_target": "^1.2.1", diff --git a/dashboard-ui/bower_components/emby-webcomponents/browserdeviceprofile.js b/dashboard-ui/bower_components/emby-webcomponents/browserdeviceprofile.js index 90a5a1258..f19ef75e0 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/browserdeviceprofile.js +++ b/dashboard-ui/bower_components/emby-webcomponents/browserdeviceprofile.js @@ -264,7 +264,7 @@ define(['browser'], function (browser) { // Otherwise with HLS and mp3 audio we're seeing some browsers // safari is lying if ((videoTestElement.canPlayType('audio/mp4; codecs="ac-3"').replace(/no/, '') && !browser.safari) || browser.edgeUwp || browser.tizen) { - if ((options.disableVideoAudioCodecs || []).indexOf('ac3') == -1) { + if ((options.disableVideoAudioCodecs || []).indexOf('ac3') === -1) { videoAudioCodecs.push('ac3'); // This works in edge desktop, but not mobile diff --git a/dashboard-ui/bower_components/emby-webcomponents/collectioneditor/collectioneditor.js b/dashboard-ui/bower_components/emby-webcomponents/collectioneditor/collectioneditor.js index 73b9c8bd3..599e6e66f 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/collectioneditor/collectioneditor.js +++ b/dashboard-ui/bower_components/emby-webcomponents/collectioneditor/collectioneditor.js @@ -1,4 +1,5 @@ define(['shell', 'dialogHelper', 'loading', 'layoutManager', 'connectionManager', 'embyRouter', 'globalize', 'emby-checkbox', 'emby-input', 'paper-icon-button-light', 'emby-select', 'material-icons', 'css!./../formdialog', 'emby-button'], function (shell, dialogHelper, loading, layoutManager, connectionManager, embyRouter, globalize) { + 'use strict'; var currentServerId; diff --git a/dashboard-ui/bower_components/emby-webcomponents/datetime.js b/dashboard-ui/bower_components/emby-webcomponents/datetime.js index 2a8273c8f..8ec07af93 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/datetime.js +++ b/dashboard-ui/bower_components/emby-webcomponents/datetime.js @@ -148,12 +148,47 @@ } } - return toLocaleTimeString(date, { + if (toLocaleTimeStringSupportsLocales) { + return toLocaleTimeString(date, { - hour: 'numeric', - minute: '2-digit' + hour: 'numeric', + minute: '2-digit' - }); + }); + } + + var time = toLocaleTimeString(date); + + var timeLower = time.toLowerCase(); + + if (timeLower.indexOf('am') !== -1 || timeLower.indexOf('pm') !== -1) { + + time = timeLower; + var hour = date.getHours() % 12; + var suffix = date.getHours() > 11 ? 'pm' : 'am'; + if (!hour) { + hour = 12; + } + var minutes = date.getMinutes(); + + if (minutes < 10) { + minutes = '0' + minutes; + } + + minutes = ':' + minutes; + time = hour + minutes + suffix; + } else { + + var timeParts = time.split(':'); + + // Trim off seconds + if (timeParts.length > 2) { + timeParts.length -= 1; + time = timeParts.join(':'); + } + } + + return time; } function isRelativeDay(date, offsetInDays) { diff --git a/dashboard-ui/bower_components/emby-webcomponents/emby-itemscontainer/emby-itemscontainer.js b/dashboard-ui/bower_components/emby-webcomponents/emby-itemscontainer/emby-itemscontainer.js index 27ab9d3de..cef357c8f 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/emby-itemscontainer/emby-itemscontainer.js +++ b/dashboard-ui/bower_components/emby-webcomponents/emby-itemscontainer/emby-itemscontainer.js @@ -1,4 +1,5 @@ define(['itemShortcuts', 'connectionManager', 'layoutManager', 'browser', 'dom', 'loading', 'serverNotifications', 'events', 'registerElement'], function (itemShortcuts, connectionManager, layoutManager, browser, dom, loading, serverNotifications, events) { + 'use strict'; var ItemsContainerProtoType = Object.create(HTMLDivElement.prototype); diff --git a/dashboard-ui/bower_components/emby-webcomponents/filedownloader.js b/dashboard-ui/bower_components/emby-webcomponents/filedownloader.js index d814ed616..ebd004da6 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/filedownloader.js +++ b/dashboard-ui/bower_components/emby-webcomponents/filedownloader.js @@ -1,4 +1,5 @@ define(['multi-download'], function (multiDownload) { + 'use strict'; return { download: function (items) { diff --git a/dashboard-ui/bower_components/emby-webcomponents/fullscreen/fullscreen-doubleclick.js b/dashboard-ui/bower_components/emby-webcomponents/fullscreen/fullscreen-doubleclick.js index 6cb7b76b5..762e39163 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/fullscreen/fullscreen-doubleclick.js +++ b/dashboard-ui/bower_components/emby-webcomponents/fullscreen/fullscreen-doubleclick.js @@ -1,4 +1,5 @@ define(['dom', 'fullscreenManager'], function (dom, fullscreenManager) { + 'use strict'; dom.addEventListener(window, 'dblclick', function () { diff --git a/dashboard-ui/bower_components/emby-webcomponents/fullscreen/fullscreenmanager.js b/dashboard-ui/bower_components/emby-webcomponents/fullscreen/fullscreenmanager.js index 5e3a54d91..18a4eb7b1 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/fullscreen/fullscreenmanager.js +++ b/dashboard-ui/bower_components/emby-webcomponents/fullscreen/fullscreenmanager.js @@ -1,4 +1,5 @@ define([], function () { + 'use strict'; function fullscreenManager() { diff --git a/dashboard-ui/bower_components/emby-webcomponents/guide/guide.css b/dashboard-ui/bower_components/emby-webcomponents/guide/guide.css index 997a9b3ce..f8477c234 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/guide/guide.css +++ b/dashboard-ui/bower_components/emby-webcomponents/guide/guide.css @@ -339,13 +339,17 @@ .programTextIcon { font-weight: bold; color: rgb(30,30,30); - font-size: 1.0em; + font-size: .9em; background: #555; padding: .18em .32em; border-radius: .25em; margin-right: .35em; } +.programTextIcon-tv { + font-size: .7em; +} + .guideChannelNumber { padding-left: 1em; max-width: 30%; diff --git a/dashboard-ui/bower_components/emby-webcomponents/guide/guide.js b/dashboard-ui/bower_components/emby-webcomponents/guide/guide.js index 32fc92c95..25bd34289 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/guide/guide.js +++ b/dashboard-ui/bower_components/emby-webcomponents/guide/guide.js @@ -507,7 +507,11 @@ if (program.IsHD && options.showHdIcon) { //html += 'hd'; - html += '
HD
'; + if (layoutManager.tv) { + html += '
HD
'; + } else { + html += '
HD
'; + } } html += getTimerIndicator(program); diff --git a/dashboard-ui/bower_components/emby-webcomponents/input/api.js b/dashboard-ui/bower_components/emby-webcomponents/input/api.js index a4dd02a7d..c91f54ae4 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/input/api.js +++ b/dashboard-ui/bower_components/emby-webcomponents/input/api.js @@ -1,4 +1,5 @@ define(['connectionManager', 'playbackManager', 'events', 'inputManager', 'focusManager', 'embyRouter'], function (connectionManager, playbackManager, events, inputManager, focusManager, embyRouter) { + 'use strict'; function notifyApp() { @@ -149,10 +150,10 @@ define(['connectionManager', 'playbackManager', 'events', 'inputManager', 'focus notifyApp(); var serverId = apiClient.serverInfo().Id; - if (msg.Data.PlayCommand == "PlayNext") { + if (msg.Data.PlayCommand === "PlayNext") { playbackManager.queueNext({ ids: msg.Data.ItemIds, serverId: serverId }); } - else if (msg.Data.PlayCommand == "PlayLast") { + else if (msg.Data.PlayCommand === "PlayLast") { playbackManager.queue({ ids: msg.Data.ItemIds, serverId: serverId }); } else { diff --git a/dashboard-ui/bower_components/emby-webcomponents/inputmanager.js b/dashboard-ui/bower_components/emby-webcomponents/inputmanager.js index 076db957f..35da6c671 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/inputmanager.js +++ b/dashboard-ui/bower_components/emby-webcomponents/inputmanager.js @@ -1,4 +1,5 @@ define(['playbackManager', 'focusManager', 'embyRouter', 'dom'], function (playbackManager, focusManager, embyRouter, dom) { + 'use strict'; var lastInputTime = new Date().getTime(); diff --git a/dashboard-ui/bower_components/emby-webcomponents/itemcontextmenu.js b/dashboard-ui/bower_components/emby-webcomponents/itemcontextmenu.js index d73efd038..e5364f83b 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/itemcontextmenu.js +++ b/dashboard-ui/bower_components/emby-webcomponents/itemcontextmenu.js @@ -1,4 +1,5 @@ define(['apphost', 'globalize', 'connectionManager', 'itemHelper', 'embyRouter', 'playbackManager', 'loading', 'appSettings'], function (appHost, globalize, connectionManager, itemHelper, embyRouter, playbackManager, loading, appSettings) { + 'use strict'; var isMobileApp = window.Dashboard != null; @@ -29,21 +30,21 @@ define(['apphost', 'globalize', 'connectionManager', 'itemHelper', 'embyRouter', }); } - if ((item.Type == 'Timer') && user.Policy.EnableLiveTvManagement && options.cancelTimer !== false) { + if ((item.Type === 'Timer') && user.Policy.EnableLiveTvManagement && options.cancelTimer !== false) { commands.push({ name: globalize.translate('sharedcomponents#CancelRecording'), id: 'canceltimer' }); } - if ((item.Type == 'Recording' && item.Status == 'InProgress') && user.Policy.EnableLiveTvManagement && options.cancelTimer !== false) { + if ((item.Type === 'Recording' && item.Status === 'InProgress') && user.Policy.EnableLiveTvManagement && options.cancelTimer !== false) { commands.push({ name: globalize.translate('sharedcomponents#CancelRecording'), id: 'canceltimer' }); } - if ((item.Type == 'SeriesTimer') && user.Policy.EnableLiveTvManagement && options.cancelTimer !== false) { + if ((item.Type === 'SeriesTimer') && user.Policy.EnableLiveTvManagement && options.cancelTimer !== false) { commands.push({ name: globalize.translate('sharedcomponents#CancelSeries'), id: 'cancelseriestimer' @@ -52,7 +53,7 @@ define(['apphost', 'globalize', 'connectionManager', 'itemHelper', 'embyRouter', if (item.CanDelete) { - if (item.Type == 'Playlist' || item.Type == 'BoxSet') { + if (item.Type === 'Playlist' || item.Type === 'BoxSet') { commands.push({ name: globalize.translate('sharedcomponents#Delete'), id: 'delete' @@ -67,9 +68,9 @@ define(['apphost', 'globalize', 'connectionManager', 'itemHelper', 'embyRouter', if (itemHelper.canEdit(user, item)) { - if (options.edit !== false && item.Type != 'SeriesTimer') { + if (options.edit !== false && item.Type !== 'SeriesTimer') { - var text = (item.Type == 'Timer' || item.Type == 'SeriesTimer') ? globalize.translate('sharedcomponents#Edit') : globalize.translate('sharedcomponents#EditInfo'); + var text = (item.Type === 'Timer' || item.Type === 'SeriesTimer') ? globalize.translate('sharedcomponents#Edit') : globalize.translate('sharedcomponents#EditInfo'); commands.push({ name: text, @@ -90,7 +91,7 @@ define(['apphost', 'globalize', 'connectionManager', 'itemHelper', 'embyRouter', if (itemHelper.canEdit(user, item)) { - if (item.MediaType == 'Video' && item.Type != 'TvChannel' && item.Type != 'Program' && item.LocationType != 'Virtual' && !(item.Type == 'Recording' && item.Status != 'Completed')) { + if (item.MediaType === 'Video' && item.Type !== 'TvChannel' && item.Type !== 'Program' && item.LocationType !== 'Virtual' && !(item.Type === 'Recording' && item.Status !== 'Completed')) { if (options.editSubtitles !== false) { commands.push({ name: globalize.translate('sharedcomponents#EditSubtitles'), @@ -116,7 +117,7 @@ define(['apphost', 'globalize', 'connectionManager', 'itemHelper', 'embyRouter', } } - if (item.MediaType == "Audio" || item.Type == "MusicAlbum" || item.Type == "MusicArtist" || item.Type == "MusicGenre" || item.CollectionType == "music") { + if (item.MediaType === "Audio" || item.Type === "MusicAlbum" || item.Type === "MusicArtist" || item.Type === "MusicGenre" || item.CollectionType === "music") { if (options.instantMix !== false) { commands.push({ name: globalize.translate('sharedcomponents#InstantMix'), @@ -149,7 +150,7 @@ define(['apphost', 'globalize', 'connectionManager', 'itemHelper', 'embyRouter', } } - if (options.playAllFromHere && item.Type != 'Program' && item.Type != 'TvChannel') { + if (options.playAllFromHere && item.Type !== 'Program' && item.Type !== 'TvChannel') { commands.push({ name: globalize.translate('sharedcomponents#PlayAllFromHere'), id: 'playallfromhere' @@ -173,7 +174,7 @@ define(['apphost', 'globalize', 'connectionManager', 'itemHelper', 'embyRouter', } } - if (item.Type == 'Program') { + if (item.Type === 'Program') { commands.push({ name: Globalize.translate('sharedcomponents#Record'), @@ -183,7 +184,7 @@ define(['apphost', 'globalize', 'connectionManager', 'itemHelper', 'embyRouter', if (user.Policy.IsAdministrator) { - if (item.Type != 'Timer' && item.Type != 'SeriesTimer' && item.Type != 'Program' && !(item.Type == 'Recording' && item.Status != 'Completed')) { + if (item.Type !== 'Timer' && item.Type !== 'SeriesTimer' && item.Type !== 'Program' && !(item.Type === 'Recording' && item.Status !== 'Completed')) { commands.push({ name: globalize.translate('sharedcomponents#Refresh'), id: 'refresh' @@ -214,7 +215,7 @@ define(['apphost', 'globalize', 'connectionManager', 'itemHelper', 'embyRouter', } } - if (item.IsFolder || item.Type == "MusicArtist" || item.Type == "MusicGenre") { + if (item.IsFolder || item.Type === "MusicArtist" || item.Type === "MusicGenre") { if (options.shuffle !== false) { commands.push({ name: globalize.translate('sharedcomponents#Shuffle'), @@ -534,7 +535,7 @@ define(['apphost', 'globalize', 'connectionManager', 'itemHelper', 'embyRouter', startPosition = item.UserData.PlaybackPositionTicks; } - if (item.Type == 'Program') { + if (item.Type === 'Program') { playbackManager[method]({ ids: [item.ChannelId], startPositionTicks: startPosition @@ -553,12 +554,12 @@ define(['apphost', 'globalize', 'connectionManager', 'itemHelper', 'embyRouter', var serverId = apiClient.serverInfo().Id; - if (item.Type == 'Timer') { + if (item.Type === 'Timer') { require(['recordingEditor'], function (recordingEditor) { recordingEditor.show(item.Id, serverId).then(resolve, reject); }); - } else if (item.Type == 'SeriesTimer') { + } else if (item.Type === 'SeriesTimer') { require(['seriesRecordingEditor'], function (recordingEditor) { recordingEditor.show(item.Id, serverId).then(resolve, reject); diff --git a/dashboard-ui/bower_components/emby-webcomponents/itemhelper.js b/dashboard-ui/bower_components/emby-webcomponents/itemhelper.js index 5cc5a9140..94a863dff 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/itemhelper.js +++ b/dashboard-ui/bower_components/emby-webcomponents/itemhelper.js @@ -1,4 +1,5 @@ define(['apphost'], function (appHost) { + 'use strict'; function getDisplayName(item, options) { @@ -8,24 +9,24 @@ define(['apphost'], function (appHost) { options = options || {}; - if (item.Type == 'Timer') { + if (item.Type === 'Timer') { item = item.ProgramInfo || item; } - var name = (item.Type == 'Program' && item.IsSeries ? item.EpisodeTitle : item.Name) || ''; + var name = (item.Type === 'Program' && item.IsSeries ? item.EpisodeTitle : item.Name) || ''; - if (item.Type == "TvChannel") { + if (item.Type === "TvChannel") { if (item.Number) { return item.Number + ' ' + name; } return name; } - if (/*options.isInlineSpecial &&*/ item.Type == "Episode" && item.ParentIndexNumber == 0) { + if (/*options.isInlineSpecial &&*/ item.Type === "Episode" && item.ParentIndexNumber === 0) { name = Globalize.translate('sharedcomponents#ValueSpecialEpisodeName', name); - } else if ((item.Type == "Episode" || item.Type == 'Program') && item.IndexNumber != null && item.ParentIndexNumber != null) { + } else if ((item.Type === "Episode" || item.Type === 'Program') && item.IndexNumber != null && item.ParentIndexNumber != null) { var displayIndexNumber = item.IndexNumber; @@ -50,56 +51,56 @@ define(['apphost'], function (appHost) { function supportsAddingToCollection(item) { - if (item.Type == 'Timer' || item.Type == 'SeriesTimer') { + if (item.Type === 'Timer' || item.Type === 'SeriesTimer') { return false; } var invalidTypes = ['Person', 'Genre', 'MusicGenre', 'Studio', 'GameGenre', 'BoxSet', 'Playlist', 'UserView', 'CollectionFolder', 'Audio', 'TvChannel', 'Program', 'MusicAlbum', 'Timer']; - if (item.Type == 'Recording') { - if (item.Status != 'Completed') { + if (item.Type === 'Recording') { + if (item.Status !== 'Completed') { return false; } } - return !item.CollectionType && invalidTypes.indexOf(item.Type) == -1 && item.MediaType != 'Photo'; + return !item.CollectionType && invalidTypes.indexOf(item.Type) === -1 && item.MediaType !== 'Photo'; } function supportsAddingToPlaylist(item) { - if (item.Type == 'Program') { + if (item.Type === 'Program') { return false; } - if (item.Type == 'Timer') { + if (item.Type === 'Timer') { return false; } - if (item.Type == 'SeriesTimer') { + if (item.Type === 'SeriesTimer') { return false; } - if (item.Type == 'Recording') { - if (item.Status != 'Completed') { + if (item.Type === 'Recording') { + if (item.Status !== 'Completed') { return false; } } - return item.MediaType || item.IsFolder || item.Type == "Genre" || item.Type == "MusicGenre" || item.Type == "MusicArtist"; + return item.MediaType || item.IsFolder || item.Type === "Genre" || item.Type === "MusicGenre" || item.Type === "MusicArtist"; } function canEdit(user, item) { var itemType = item.Type; - if (itemType == "UserRootFolder" || /*itemType == "CollectionFolder" ||*/ itemType == "UserView") { + if (itemType === "UserRootFolder" || /*itemType == "CollectionFolder" ||*/ itemType === "UserView") { return false; } - if (itemType == 'Program') { + if (itemType === 'Program') { return false; } - if (item.Type == 'Recording') { - if (item.Status != 'Completed') { + if (item.Type === 'Recording') { + if (item.Status !== 'Completed') { return false; } } @@ -114,15 +115,15 @@ define(['apphost'], function (appHost) { canIdentify: function (user, itemType) { - if (itemType == "Movie" || - itemType == "Trailer" || - itemType == "Series" || - itemType == "Game" || - itemType == "BoxSet" || - itemType == "Person" || - itemType == "Book" || - itemType == "MusicAlbum" || - itemType == "MusicArtist") { + if (itemType === "Movie" || + itemType === "Trailer" || + itemType === "Series" || + itemType === "Game" || + itemType === "BoxSet" || + itemType === "Person" || + itemType === "Book" || + itemType === "MusicAlbum" || + itemType === "MusicArtist") { if (user.Policy.IsAdministrator) { @@ -139,7 +140,7 @@ define(['apphost'], function (appHost) { var itemType = item.Type; - if (itemType == 'UserView') { + if (itemType === 'UserView') { if (user.Policy.IsAdministrator) { return true; @@ -148,13 +149,13 @@ define(['apphost'], function (appHost) { return false; } - if (item.Type == 'Recording') { - if (item.Status != 'Completed') { + if (item.Type === 'Recording') { + if (item.Status !== 'Completed') { return false; } } - return itemType != 'Timer' && itemType != 'SeriesTimer' && canEdit(user, item); + return itemType !== 'Timer' && itemType !== 'SeriesTimer' && canEdit(user, item); }, canSync: function (user, item) { @@ -168,14 +169,14 @@ define(['apphost'], function (appHost) { canShare: function (user, item) { - if (item.Type == 'Timer') { + if (item.Type === 'Timer') { return false; } - if (item.Type == 'SeriesTimer') { + if (item.Type === 'SeriesTimer') { return false; } - if (item.Type == 'Recording') { - if (item.Status != 'Completed') { + if (item.Type === 'Recording') { + if (item.Status !== 'Completed') { return false; } } diff --git a/dashboard-ui/bower_components/emby-webcomponents/itemhovermenu/itemhovermenu.js b/dashboard-ui/bower_components/emby-webcomponents/itemhovermenu/itemhovermenu.js index ba96c2c2b..c5f41dad4 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/itemhovermenu/itemhovermenu.js +++ b/dashboard-ui/bower_components/emby-webcomponents/itemhovermenu/itemhovermenu.js @@ -1,4 +1,5 @@ define(['connectionManager', 'itemHelper', 'mediaInfo', 'userdataButtons', 'playbackManager', 'globalize', 'dom', 'apphost', 'css!./itemhovermenu', 'emby-button'], function (connectionManager, itemHelper, mediaInfo, userdataButtons, playbackManager, globalize, dom, appHost) { + 'use strict'; var preventHover = false; var showOverlayTimeout; @@ -72,9 +73,9 @@ var className = card.className.toLowerCase(); - var isMiniItem = className.indexOf('mini') != -1; - var isSmallItem = isMiniItem || className.indexOf('small') != -1; - var isPortrait = className.indexOf('portrait') != -1; + var isMiniItem = className.indexOf('mini') !== -1; + var isSmallItem = isMiniItem || className.indexOf('small') !== -1; + var isPortrait = className.indexOf('portrait') !== -1; var parentName = isSmallItem || isMiniItem || isPortrait ? null : item.SeriesName; var name = item.EpisodeTitle ? item.Name : itemHelper.getDisplayName(item); @@ -136,7 +137,7 @@ buttonCount++; } - var moreIcon = appHost.moreIcon == 'dots-horiz' ? '' : ''; + var moreIcon = appHost.moreIcon === 'dots-horiz' ? '' : ''; html += ''; buttonCount++; @@ -191,7 +192,7 @@ var id = dataElement.getAttribute('data-id'); var type = dataElement.getAttribute('data-type'); - if (type == 'Timer' || type == 'SeriesTimer') { + if (type === 'Timer' || type === 'SeriesTimer') { return; } @@ -265,7 +266,6 @@ } ItemHoverMenu.prototype = { - constructor: ItemHoverMenu, destroy: function () { @@ -276,7 +276,7 @@ passive: true }); } - } + }; return ItemHoverMenu; }); \ No newline at end of file diff --git a/dashboard-ui/bower_components/emby-webcomponents/itemidentifier/itemidentifier.js b/dashboard-ui/bower_components/emby-webcomponents/itemidentifier/itemidentifier.js index f8c5027a7..a7e10b622 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/itemidentifier/itemidentifier.js +++ b/dashboard-ui/bower_components/emby-webcomponents/itemidentifier/itemidentifier.js @@ -1,4 +1,5 @@ define(['dialogHelper', 'loading', 'cardBuilder', 'connectionManager', 'require', 'globalize', 'scrollHelper', 'layoutManager', 'focusManager', 'emby-input', 'emby-checkbox', 'paper-icon-button-light', 'css!./../formdialog', 'material-icons', 'cardStyle'], function (dialogHelper, loading, cardBuilder, connectionManager, require, globalize, scrollHelper, layoutManager, focusManager) { + 'use strict'; var currentItem; var currentItemType; @@ -20,13 +21,14 @@ var i, length; var identifyField = page.querySelectorAll('.identifyField'); + var value; for (i = 0, length = identifyField.length; i < length; i++) { - var value = identifyField[i].value; + value = identifyField[i].value; if (value) { - if (identifyField[i].type == 'number') { + if (identifyField[i].type === 'number') { value = parseInt(value); } @@ -39,7 +41,7 @@ var txtLookupId = page.querySelectorAll('.txtLookupId'); for (i = 0, length = txtLookupId.length; i < length; i++) { - var value = txtLookupId[i].value; + value = txtLookupId[i].value; if (value) { hasId = true; @@ -177,11 +179,11 @@ var cardBoxCssClass = 'cardBox visualCardBox'; var padderClass; - if (currentItemType == "Episode") { + if (currentItemType === "Episode") { cssClass += " backdropCard backdropCard-scalable"; padderClass = 'cardPadder-backdrop'; } - else if (currentItemType == "MusicAlbum" || currentItemType == "MusicArtist") { + else if (currentItemType === "MusicAlbum" || currentItemType === "MusicArtist") { cssClass += " squareCard squareCard-scalable"; padderClass = 'cardPadder-square'; } @@ -297,7 +299,7 @@ page.querySelector('#txtLookupName').value = ''; - if (item.Type == "Person" || item.Type == "BoxSet") { + if (item.Type === "Person" || item.Type === "BoxSet") { page.querySelector('.fldLookupYear').classList.add('hide'); page.querySelector('#txtLookupYear').value = ''; @@ -455,7 +457,7 @@ dlg.querySelector('#txtLookupName').value = itemName; - if (itemType == "Person" || itemType == "BoxSet") { + if (itemType === "Person" || itemType === "BoxSet") { dlg.querySelector('.fldLookupYear').classList.add('hide'); dlg.querySelector('#txtLookupYear').value = ''; diff --git a/dashboard-ui/bower_components/emby-webcomponents/layoutmanager.js b/dashboard-ui/bower_components/emby-webcomponents/layoutmanager.js index f62cac40c..b06fceac5 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/layoutmanager.js +++ b/dashboard-ui/bower_components/emby-webcomponents/layoutmanager.js @@ -3,7 +3,7 @@ define(['browser', 'appSettings', 'events'], function (browser, appSettings, eve function setLayout(self, layout, selectedLayout) { - if (layout == selectedLayout) { + if (layout === selectedLayout) { self[layout] = true; document.documentElement.classList.add('layout-' + layout); } else { @@ -12,7 +12,7 @@ define(['browser', 'appSettings', 'events'], function (browser, appSettings, eve } } - function layoutManager() { + function LayoutManager() { var self = this; @@ -62,7 +62,7 @@ define(['browser', 'appSettings', 'events'], function (browser, appSettings, eve self.autoLayout(); } }; - }; + } - return new layoutManager(); + return new LayoutManager(); }); \ No newline at end of file diff --git a/dashboard-ui/bower_components/emby-webcomponents/listview/listview.js b/dashboard-ui/bower_components/emby-webcomponents/listview/listview.js index ec5a8aa76..f878ee93f 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/listview/listview.js +++ b/dashboard-ui/bower_components/emby-webcomponents/listview/listview.js @@ -1,8 +1,9 @@ define(['itemHelper', 'mediaInfo', 'indicators', 'connectionManager', 'layoutManager', 'globalize', 'datetime', 'userdataButtons', 'apphost', 'css!./listview'], function (itemHelper, mediaInfo, indicators, connectionManager, layoutManager, globalize, datetime, userdataButtons, appHost) { + 'use strict'; function getIndex(item, options) { - if (options.index == 'disc') { + if (options.index === 'disc') { return item.ParentIndexNumber == null ? '' : globalize.translate('sharedcomponents#ValueDiscNumber', item.ParentIndexNumber); } @@ -10,9 +11,11 @@ define(['itemHelper', 'mediaInfo', 'indicators', 'connectionManager', 'layoutMan var sortBy = (options.sortBy || '').toLowerCase(); var code, name; - if (sortBy.indexOf('sortname') == 0) { + if (sortBy.indexOf('sortname') === 0) { - if (item.Type == 'Episode') return ''; + if (item.Type === 'Episode') { + return ''; + } // SortName name = (item.SortName || item.Name || '?')[0].toUpperCase(); @@ -24,11 +27,11 @@ define(['itemHelper', 'mediaInfo', 'indicators', 'connectionManager', 'layoutMan return name.toUpperCase(); } - if (sortBy.indexOf('officialrating') == 0) { + if (sortBy.indexOf('officialrating') === 0) { return item.OfficialRating || globalize.translate('sharedcomponents#Unrated'); } - if (sortBy.indexOf('communityrating') == 0) { + if (sortBy.indexOf('communityrating') === 0) { if (item.CommunityRating == null) { return globalize.translate('sharedcomponents#Unrated'); @@ -36,7 +39,7 @@ define(['itemHelper', 'mediaInfo', 'indicators', 'connectionManager', 'layoutMan return Math.floor(item.CommunityRating); } - if (sortBy.indexOf('criticrating') == 0) { + if (sortBy.indexOf('criticrating') === 0) { if (item.CriticRating == null) { return globalize.translate('sharedcomponents#Unrated'); @@ -44,7 +47,7 @@ define(['itemHelper', 'mediaInfo', 'indicators', 'connectionManager', 'layoutMan return Math.floor(item.CriticRating); } - if (sortBy.indexOf('metascore') == 0) { + if (sortBy.indexOf('metascore') === 0) { if (item.Metascore == null) { return globalize.translate('sharedcomponents#Unrated'); @@ -52,10 +55,12 @@ define(['itemHelper', 'mediaInfo', 'indicators', 'connectionManager', 'layoutMan return Math.floor(item.Metascore); } - if (sortBy.indexOf('albumartist') == 0) { + if (sortBy.indexOf('albumartist') === 0) { // SortName - if (!item.AlbumArtist) return ''; + if (!item.AlbumArtist) { + return ''; + } name = item.AlbumArtist[0].toUpperCase(); @@ -78,9 +83,9 @@ define(['itemHelper', 'mediaInfo', 'indicators', 'connectionManager', 'layoutMan type: "Primary" }; - if (item.ImageTags && item.ImageTags['Primary']) { + if (item.ImageTags && item.ImageTags.Primary) { - options.tag = item.ImageTags['Primary']; + options.tag = item.ImageTags.Primary; return apiClient.getScaledImageUrl(item.Id, options); } @@ -144,7 +149,7 @@ define(['itemHelper', 'mediaInfo', 'indicators', 'connectionManager', 'layoutMan var groupTitle = ''; var action = options.action || 'link'; - var isLargeStyle = options.imageSize == 'large'; + var isLargeStyle = options.imageSize === 'large'; var enableOverview = options.enableOverview; var clickEntireItem = layoutManager.tv ? true : false; @@ -163,13 +168,13 @@ define(['itemHelper', 'mediaInfo', 'indicators', 'connectionManager', 'layoutMan var itemGroupTitle = getIndex(item, options); - if (itemGroupTitle != groupTitle) { + if (itemGroupTitle !== groupTitle) { if (html) { html += ''; } - if (i == 0) { + if (i === 0) { html += '

'; } else { @@ -187,7 +192,7 @@ define(['itemHelper', 'mediaInfo', 'indicators', 'connectionManager', 'layoutMan var cssClass = "listItem"; if (options.highlight !== false) { - if (i % 2 == 1) { + if (i % 2 === 1) { cssClass += ' listItem-odd'; } } @@ -270,7 +275,7 @@ define(['itemHelper', 'mediaInfo', 'indicators', 'connectionManager', 'layoutMan var parentTitle = null; if (options.showParentTitle) { - if (item.Type == 'Episode') { + if (item.Type === 'Episode') { parentTitle = item.SeriesName; } @@ -306,23 +311,23 @@ define(['itemHelper', 'mediaInfo', 'indicators', 'connectionManager', 'layoutMan } if (options.artist !== false) { - if (item.ArtistItems && item.Type != 'MusicAlbum') { + if (item.ArtistItems && item.Type !== 'MusicAlbum') { textlines.push(item.ArtistItems.map(function (a) { return a.Name; }).join(', ')); } - if (item.AlbumArtist && item.Type == 'MusicAlbum') { + if (item.AlbumArtist && item.Type === 'MusicAlbum') { textlines.push(item.AlbumArtist); } } - if (item.Type == 'Game') { + if (item.Type === 'Game') { textlines.push(item.GameSystem); } - if (item.Type == 'TvChannel') { + if (item.Type === 'TvChannel') { if (item.CurrentProgram) { textlines.push(itemHelper.getDisplayName(item.CurrentProgram)); @@ -340,7 +345,7 @@ define(['itemHelper', 'mediaInfo', 'indicators', 'connectionManager', 'layoutMan html += '
'; - var moreIcon = appHost.moreIcon == 'dots-horiz' ? '' : ''; + var moreIcon = appHost.moreIcon === 'dots-horiz' ? '' : ''; html += getTextLinesHtml(textlines, isLargeStyle); @@ -376,7 +381,7 @@ define(['itemHelper', 'mediaInfo', 'indicators', 'connectionManager', 'layoutMan } } - if (!options.recordButton && (item.Type == 'Timer' || item.Type == 'Program')) { + if (!options.recordButton && (item.Type === 'Timer' || item.Type === 'Program')) { html += indicators.getTimerIndicator(item).replace('indicatorIcon', 'indicatorIcon listItemAside'); } diff --git a/dashboard-ui/bower_components/emby-webcomponents/loading/loading-legacy.js b/dashboard-ui/bower_components/emby-webcomponents/loading/loading-legacy.js index 51ffdee7c..fb39d0675 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/loading/loading-legacy.js +++ b/dashboard-ui/bower_components/emby-webcomponents/loading/loading-legacy.js @@ -1,4 +1,5 @@ define(['css!./loading-legacy'], function () { + 'use strict'; var loadingElem; diff --git a/dashboard-ui/bower_components/emby-webcomponents/loading/loading-lite.js b/dashboard-ui/bower_components/emby-webcomponents/loading/loading-lite.js index a9c0e737b..2b68c181d 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/loading/loading-lite.js +++ b/dashboard-ui/bower_components/emby-webcomponents/loading/loading-lite.js @@ -1,4 +1,5 @@ define(['css!./loading-lite'], function () { + 'use strict'; var loadingElem; diff --git a/dashboard-ui/bower_components/emby-webcomponents/mediainfo/mediainfo.js b/dashboard-ui/bower_components/emby-webcomponents/mediainfo/mediainfo.js index 3ed1f4160..4d9116808 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/mediainfo/mediainfo.js +++ b/dashboard-ui/bower_components/emby-webcomponents/mediainfo/mediainfo.js @@ -1,17 +1,18 @@ define(['datetime', 'globalize', 'embyRouter', 'itemHelper', 'material-icons', 'css!./mediainfo.css', 'programStyles'], function (datetime, globalize, embyRouter, itemHelper) { + 'use strict'; function getTimerIndicator(item) { var status; - if (item.Type == 'SeriesTimer') { + if (item.Type === 'SeriesTimer') { return ''; } else if (item.TimerId || item.SeriesTimerId) { status = item.Status || 'Cancelled'; } - else if (item.Type == 'Timer') { + else if (item.Type === 'Timer') { status = item.Status; } @@ -21,7 +22,7 @@ define(['datetime', 'globalize', 'embyRouter', 'itemHelper', 'material-icons', ' if (item.SeriesTimerId) { - if (status != 'Cancelled') { + if (status !== 'Cancelled') { return ''; } @@ -93,12 +94,13 @@ define(['datetime', 'globalize', 'embyRouter', 'itemHelper', 'material-icons', ' var miscInfo = []; options = options || {}; var text, date, minutes; + var count; - var showFolderRuntime = item.Type == "MusicAlbum" || item.MediaType == 'MusicArtist' || item.MediaType == 'Playlist' || item.MediaType == 'MusicGenre'; + var showFolderRuntime = item.Type === "MusicAlbum" || item.MediaType === 'MusicArtist' || item.MediaType === 'Playlist' || item.MediaType === 'MusicGenre'; if (showFolderRuntime) { - var count = item.SongCount || item.ChildCount; + count = item.SongCount || item.ChildCount; if (count) { @@ -110,9 +112,9 @@ define(['datetime', 'globalize', 'embyRouter', 'itemHelper', 'material-icons', ' } } - else if (item.Type == "PhotoAlbum" || item.Type == "BoxSet") { + else if (item.Type === "PhotoAlbum" || item.Type === "BoxSet") { - var count = item.ChildCount; + count = item.ChildCount; if (count) { @@ -120,7 +122,7 @@ define(['datetime', 'globalize', 'embyRouter', 'itemHelper', 'material-icons', ' } } - if (item.Type == "Episode" || item.MediaType == 'Photo') { + if (item.Type === "Episode" || item.MediaType === 'Photo') { if (item.PremiereDate) { @@ -136,7 +138,7 @@ define(['datetime', 'globalize', 'embyRouter', 'itemHelper', 'material-icons', ' } } - if (item.StartDate && item.Type != 'Program') { + if (item.StartDate && item.Type !== 'Program') { try { date = datetime.parseISO8601Date(item.StartDate); @@ -144,7 +146,7 @@ define(['datetime', 'globalize', 'embyRouter', 'itemHelper', 'material-icons', ' text = datetime.toLocaleDateString(date); miscInfo.push(text); - if (item.Type != "Recording") { + if (item.Type !== "Recording") { text = datetime.getDisplayTime(date); miscInfo.push(text); } @@ -154,9 +156,9 @@ define(['datetime', 'globalize', 'embyRouter', 'itemHelper', 'material-icons', ' } } - if (options.year !== false && item.ProductionYear && item.Type == "Series") { + if (options.year !== false && item.ProductionYear && item.Type === "Series") { - if (item.Status == "Continuing") { + if (item.Status === "Continuing") { miscInfo.push(globalize.translate('sharedcomponents#SeriesYearToPresent', item.ProductionYear)); } @@ -170,7 +172,7 @@ define(['datetime', 'globalize', 'embyRouter', 'itemHelper', 'material-icons', ' var endYear = datetime.parseISO8601Date(item.EndDate).getFullYear(); - if (endYear != item.ProductionYear) { + if (endYear !== item.ProductionYear) { text += "-" + datetime.parseISO8601Date(item.EndDate).getFullYear(); } @@ -184,7 +186,7 @@ define(['datetime', 'globalize', 'embyRouter', 'itemHelper', 'material-icons', ' } } - if (item.Type == 'Program') { + if (item.Type === 'Program') { if (item.IsLive) { miscInfo.push({ @@ -228,7 +230,7 @@ define(['datetime', 'globalize', 'embyRouter', 'itemHelper', 'material-icons', ' } if (options.year !== false) { - if (item.Type != "Series" && item.Type != "Episode" && item.Type != "Person" && item.MediaType != 'Photo' && item.Type != 'Program') { + if (item.Type !== "Series" && item.Type !== "Episode" && item.Type !== "Person" && item.MediaType !== 'Photo' && item.Type !== 'Program') { if (item.ProductionYear) { @@ -247,9 +249,9 @@ define(['datetime', 'globalize', 'embyRouter', 'itemHelper', 'material-icons', ' } } - if (item.RunTimeTicks && item.Type != "Series" && item.Type != 'Program' && !showFolderRuntime && options.runtime !== false) { + if (item.RunTimeTicks && item.Type !== "Series" && item.Type !== 'Program' && !showFolderRuntime && options.runtime !== false) { - if (item.Type == "Audio") { + if (item.Type === "Audio") { miscInfo.push(datetime.getDisplayRunningTime(item.RunTimeTicks)); @@ -273,11 +275,11 @@ define(['datetime', 'globalize', 'embyRouter', 'itemHelper', 'material-icons', ' miscInfo.push("3D"); } - if (item.MediaType == 'Photo' && item.Width && item.Height) { + if (item.MediaType === 'Photo' && item.Width && item.Height) { miscInfo.push(item.Width + "x" + item.Height); } - if (options.container !== false && item.Type == 'Audio' && item.Container) { + if (options.container !== false && item.Type === 'Audio' && item.Container) { miscInfo.push(item.Container); } @@ -313,7 +315,7 @@ define(['datetime', 'globalize', 'embyRouter', 'itemHelper', 'material-icons', ' function getEndsAt(item) { - if (item.MediaType == 'Video' && item.RunTimeTicks) { + if (item.MediaType === 'Video' && item.RunTimeTicks) { if (!item.StartDate) { var endDate = new Date().getTime() + (item.RunTimeTicks / 10000); @@ -444,7 +446,7 @@ define(['datetime', 'globalize', 'embyRouter', 'itemHelper', 'material-icons', ' if (options.interactive == null) { options.interactive = false; } - if (item.Type == 'Program') { + if (item.Type === 'Program') { return getProgramInfoHtml(item, options); } diff --git a/dashboard-ui/bower_components/emby-webcomponents/metadataeditor/metadataeditor.js b/dashboard-ui/bower_components/emby-webcomponents/metadataeditor/metadataeditor.js index 04fdb9b66..2e74d77d2 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/metadataeditor/metadataeditor.js +++ b/dashboard-ui/bower_components/emby-webcomponents/metadataeditor/metadataeditor.js @@ -1,4 +1,5 @@ -define(['itemHelper', 'dom', 'layoutManager', 'dialogHelper', 'datetime', 'loading', 'focusManager', 'connectionManager', 'globalize', 'require', 'shell', 'dom', 'emby-checkbox', 'emby-input', 'emby-select', 'listViewStyle', 'emby-textarea', 'emby-button', 'paper-icon-button-light', 'css!./../formdialog'], function (itemHelper, dom, layoutManager, dialogHelper, datetime, loading, focusManager, connectionManager, globalize, require, shell, dom) { +define(['itemHelper', 'dom', 'layoutManager', 'dialogHelper', 'datetime', 'loading', 'focusManager', 'connectionManager', 'globalize', 'require', 'shell', 'emby-checkbox', 'emby-input', 'emby-select', 'listViewStyle', 'emby-textarea', 'emby-button', 'paper-icon-button-light', 'css!./../formdialog'], function (itemHelper, dom, layoutManager, dialogHelper, datetime, loading, focusManager, connectionManager, globalize, require, shell) { + 'use strict'; var currentContext; var metadataEditorInfo; @@ -33,7 +34,7 @@ var newContentType = form.querySelector('#selectContentType').value || ''; - if ((metadataEditorInfo.ContentType || '') != newContentType) { + if ((metadataEditorInfo.ContentType || '') !== newContentType) { apiClient.ajax({ @@ -104,7 +105,7 @@ var parts = date.toISOString().split('T'); // If the date is the same, preserve the time - if (parts[0].indexOf(val) == 0) { + if (parts[0].indexOf(val) === 0) { var iso = parts[1]; @@ -189,14 +190,14 @@ item.PreferredMetadataLanguage = form.querySelector('#selectLanguage').value; item.PreferredMetadataCountryCode = form.querySelector('#selectCountry').value; - if (currentItem.Type == "Person") { + if (currentItem.Type === "Person") { var placeOfBirth = form.querySelector('#txtPlaceOfBirth').value; item.ProductionLocations = placeOfBirth ? [placeOfBirth] : []; } - if (currentItem.Type == "Series") { + if (currentItem.Type === "Series") { // 600000000 var seriesRuntime = form.querySelector('#txtSeriesRuntime').value; @@ -248,7 +249,7 @@ personEditor.show(person).then(function (updatedPerson) { - var isNew = index == -1; + var isNew = index === -1; if (isNew) { currentItem.People.push(updatedPerson); @@ -308,7 +309,7 @@ if (msg.MessageType === "LibraryChanged") { - if (msg.Data.ItemsUpdated.indexOf(currentItem.Id) != -1) { + if (msg.Data.ItemsUpdated.indexOf(currentItem.Id) !== -1) { console.log('Item updated - reloading metadata'); reload(currentContext, currentItem.Id, currentItem.ServerId); @@ -400,16 +401,17 @@ context.querySelector('#peopleList').addEventListener('click', function (e) { + var index; var btnDeletePerson = dom.parentWithClass(e.target, 'btnDeletePerson'); if (btnDeletePerson) { - var index = parseInt(btnDeletePerson.getAttribute('data-index')); + index = parseInt(btnDeletePerson.getAttribute('data-index')); currentItem.People.splice(index, 1); populatePeople(context, currentItem.People); } var btnEditPerson = dom.parentWithClass(e.target, 'btnEditPerson'); if (btnEditPerson) { - var index = parseInt(btnEditPerson.getAttribute('data-index')); + index = parseInt(btnEditPerson.getAttribute('data-index')); editPerson(context, currentItem.People[index], index); } }); @@ -535,7 +537,7 @@ // Context is optional and restricts the querySelector to the context function hideElement(selector, context, multiple) { context = context || document; - if (typeof selector == 'string') { + if (typeof selector === 'string') { var elements = multiple ? context.querySelectorAll(selector) : [context.querySelector(selector)]; @@ -554,7 +556,7 @@ // Context is optional and restricts the querySelector to the context function showElement(selector, context, multiple) { context = context || document; - if (typeof selector == 'string') { + if (typeof selector === 'string') { var elements = multiple ? context.querySelectorAll(selector) : [context.querySelector(selector)]; @@ -569,31 +571,31 @@ } function setFieldVisibilities(context, item) { - if (item.Path && item.LocationType != 'Remote') { + if (item.Path && item.LocationType !== 'Remote') { showElement('#fldPath', context); } else { hideElement('#fldPath', context); } - if (item.Type == "Series" || item.Type == "Movie" || item.Type == "Trailer") { + if (item.Type === "Series" || item.Type === "Movie" || item.Type === "Trailer") { showElement('#fldOriginalName', context); } else { hideElement('#fldOriginalName', context); } - if (item.Type == "Series") { + if (item.Type === "Series") { showElement('#fldSeriesRuntime', context); } else { hideElement('#fldSeriesRuntime', context); } - if (item.Type == "Series" || item.Type == "Person") { + if (item.Type === "Series" || item.Type === "Person") { showElement('#fldEndDate', context); } else { hideElement('#fldEndDate', context); } - if (item.Type == "Movie" || item.MediaType == "Game" || item.MediaType == "Trailer" || item.Type == "MusicVideo") { + if (item.Type === "Movie" || item.MediaType === "Game" || item.MediaType === "Trailer" || item.Type === "MusicVideo") { showElement('#fldBudget', context); showElement('#fldRevenue', context); } else { @@ -601,19 +603,19 @@ hideElement('#fldRevenue', context); } - if (item.Type == "MusicAlbum") { + if (item.Type === "MusicAlbum") { showElement('#albumAssociationMessage', context); } else { - hideElement('#albumAssociationMessage', context) + hideElement('#albumAssociationMessage', context); } - if (item.MediaType == "Game") { + if (item.MediaType === "Game") { showElement('#fldPlayers', context); } else { hideElement('#fldPlayers', context); } - if (item.Type == "Movie" || item.Type == "Trailer") { + if (item.Type === "Movie" || item.Type === "Trailer") { showElement('#fldCriticRating', context); showElement('#fldCriticRatingSummary', context); } else { @@ -621,19 +623,19 @@ hideElement('#fldCriticRatingSummary', context); } - if (item.Type == "Movie") { + if (item.Type === "Movie") { showElement('#fldAwardSummary', context); } else { hideElement('#fldAwardSummary', context); } - if (item.Type == "Movie" || item.Type == "Trailer") { + if (item.Type === "Movie" || item.Type === "Trailer") { showElement('#fldMetascore', context); } else { hideElement('#fldMetascore', context); } - if (item.Type == "Series") { + if (item.Type === "Series") { showElement('#fldStatus', context); showElement('#fldAirDays', context); showElement('#fldAirTime', context); @@ -643,19 +645,19 @@ hideElement('#fldAirTime', context); } - if (item.MediaType == "Video" && item.Type != "TvChannel") { + if (item.MediaType === "Video" && item.Type !== "TvChannel") { showElement('#fld3dFormat', context); } else { hideElement('#fld3dFormat', context); } - if (item.Type == "Audio") { + if (item.Type === "Audio") { showElement('#fldAlbumArtist', context); } else { hideElement('#fldAlbumArtist', context); } - if (item.Type == "Audio" || item.Type == "MusicVideo") { + if (item.Type === "Audio" || item.Type === "MusicVideo") { showElement('#fldArtist', context); showElement('#fldAlbum', context); } else { @@ -663,26 +665,26 @@ hideElement('#fldAlbum', context); } - if (item.Type == "Episode") { + if (item.Type === "Episode") { showElement('#collapsibleDvdEpisodeInfo', context); } else { hideElement('#collapsibleDvdEpisodeInfo', context); } - if (item.Type == "Episode" && item.ParentIndexNumber == 0) { + if (item.Type === "Episode" && item.ParentIndexNumber === 0) { showElement('#collapsibleSpecialEpisodeInfo', context); } else { hideElement('#collapsibleSpecialEpisodeInfo', context); } - if (item.Type == "Person" || item.Type == "Genre" || item.Type == "Studio" || item.Type == "GameGenre" || item.Type == "MusicGenre" || item.Type == "TvChannel") { + if (item.Type === "Person" || item.Type === "Genre" || item.Type === "Studio" || item.Type === "GameGenre" || item.Type === "MusicGenre" || item.Type === "TvChannel") { hideElement('#fldCommunityRating', context); hideElement('#fldCommunityVoteCount', context); hideElement('#genresCollapsible', context); hideElement('#peopleCollapsible', context); hideElement('#studiosCollapsible', context); - if (item.Type == "TvChannel") { + if (item.Type === "TvChannel") { showElement('#fldOfficialRating', context); } else { hideElement('#fldOfficialRating', context); @@ -698,7 +700,7 @@ showElement('#fldCustomRating', context); } - if (item.Type == "TvChannel") { + if (item.Type === "TvChannel") { hideElement('#tagsCollapsible', context); hideElement('#metadataSettingsCollapsible', context); hideElement('#fldPremiereDate', context); @@ -712,19 +714,19 @@ showElement('#fldYear', context); } - if (item.Type == "Movie" || item.Type == "Trailer" || item.Type == "BoxSet") { + if (item.Type === "Movie" || item.Type === "Trailer" || item.Type === "BoxSet") { showElement('#keywordsCollapsible', context); } else { hideElement('#keywordsCollapsible', context); } - if (item.MediaType == "Video" && item.Type != "TvChannel") { + if (item.MediaType === "Video" && item.Type !== "TvChannel") { showElement('#fldSourceType', context); } else { hideElement('#fldSourceType', context); } - if (item.Type == "Person") { + if (item.Type === "Person") { //todo context.querySelector('#txtProductionYear').label(globalize.translate('sharedcomponents#LabelBirthYear')); context.querySelector("#txtPremiereDate").label(globalize.translate('sharedcomponents#LabelBirthDate')); @@ -737,20 +739,20 @@ hideElement('#fldPlaceOfBirth'); } - if (item.MediaType == "Video" && item.Type != "TvChannel") { + if (item.MediaType === "Video" && item.Type !== "TvChannel") { showElement('#fldOriginalAspectRatio'); } else { hideElement('#fldOriginalAspectRatio'); } - if (item.Type == "Audio" || item.Type == "Episode" || item.Type == "Season") { + if (item.Type === "Audio" || item.Type === "Episode" || item.Type === "Season") { showElement('#fldIndexNumber'); - if (item.Type == "Episode") { + if (item.Type === "Episode") { context.querySelector('#txtIndexNumber').label(globalize.translate('sharedcomponents#LabelEpisodeNumber')); - } else if (item.Type == "Season") { + } else if (item.Type === "Season") { context.querySelector('#txtIndexNumber').label(globalize.translate('sharedcomponents#LabelSeasonNumber')); - } else if (item.Type == "Audio") { + } else if (item.Type === "Audio") { context.querySelector('#txtIndexNumber').label(globalize.translate('sharedcomponents#LabelTrackNumber')); } else { context.querySelector('#txtIndexNumber').label(globalize.translate('sharedcomponents#LabelNumber')); @@ -759,12 +761,12 @@ hideElement('#fldIndexNumber'); } - if (item.Type == "Audio" || item.Type == "Episode") { + if (item.Type === "Audio" || item.Type === "Episode") { showElement('#fldParentIndexNumber'); - if (item.Type == "Episode") { + if (item.Type === "Episode") { context.querySelector('#txtParentIndexNumber').label(globalize.translate('LabelSeasonNumber')); - } else if (item.Type == "Audio") { + } else if (item.Type === "Audio") { context.querySelector('#txtParentIndexNumber').label(globalize.translate('LabelDiscNumber')); } else { context.querySelector('#txtParentIndexNumber').label(globalize.translate('LabelParentNumber')); @@ -773,7 +775,7 @@ hideElement('#fldParentIndexNumber', context); } - if (item.Type == "BoxSet") { + if (item.Type === "BoxSet") { showElement('#fldDisplayOrder', context); context.querySelector('#selectDisplayOrder').innerHTML = ''; @@ -784,7 +786,7 @@ var displaySettingFields = context.querySelectorAll('.fldDisplaySetting'); var hiddenDisplaySettingFields = Array.prototype.filter.call(displaySettingFields, function (field) { - return field.style.display != 'none'; + return field.style.display !== 'none'; }); if (hiddenDisplaySettingFields.length) { @@ -815,7 +817,7 @@ context.querySelector('#select3dFormat', context).value = item.Video3DFormat || ""; Array.prototype.forEach.call(context.querySelectorAll('.chkAirDay', context), function (el) { - el.checked = (item.AirDays || []).indexOf(el.getAttribute('data-day')) != -1; + el.checked = (item.AirDays || []).indexOf(el.getAttribute('data-day')) !== -1; }); populateListView(context.querySelector('#listGenres'), item.Genres); @@ -830,9 +832,9 @@ var chkLockData = context.querySelector("#chkLockData"); chkLockData.checked = lockData; if (chkLockData.checked) { - hideElement('.providerSettingsContainer', context) + hideElement('.providerSettingsContainer', context); } else { - showElement('.providerSettingsContainer', context) + showElement('.providerSettingsContainer', context); } populateInternetProviderSettings(context, item, item.LockedFields); @@ -957,7 +959,7 @@ ratings.push({ Name: rating.Name, Value: rating.Name }); - if (rating.Name == currentValue) { + if (rating.Name === currentValue) { currentValueFound = true; } } @@ -1037,7 +1039,7 @@ html += (person.Name || ''); html += '
'; - if (person.Role && person.Role != lastType) { + if (person.Role && person.Role !== lastType) { html += '
' + (person.Role) + '
'; } @@ -1060,7 +1062,7 @@ var field = fields[i]; var name = field.name; var value = field.value || field.name; - var checkedHtml = currentFields.indexOf(value) == -1 ? ' checked' : ''; + var checkedHtml = currentFields.indexOf(value) === -1 ? ' checked' : ''; html += '