diff --git a/dashboard-ui/bower_components/emby-apiclient/.bower.json b/dashboard-ui/bower_components/emby-apiclient/.bower.json index 0049afb342..9f7932c5f7 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 7733e5f94d..209ca317ee 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 b09177f0ca..73b63d29e3 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.313", - "_release": "1.4.313", + "version": "1.4.321", + "_release": "1.4.321", "_resolution": { "type": "version", - "tag": "1.4.313", - "commit": "79c18a7f2b379d8162bdca36b7cf0713bbe43ad8" + "tag": "1.4.321", + "commit": "fb270e69c8391f62e762ee03d77a7b8a495c5a6f" }, "_source": "https://github.com/MediaBrowser/emby-webcomponents.git", "_target": "^1.2.1", diff --git a/dashboard-ui/bower_components/emby-webcomponents/backdrop/backdrop.js b/dashboard-ui/bower_components/emby-webcomponents/backdrop/backdrop.js index defcbdc205..57b19ce5e1 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/backdrop/backdrop.js +++ b/dashboard-ui/bower_components/emby-webcomponents/backdrop/backdrop.js @@ -51,15 +51,21 @@ return; } - setTimeout(function () { - + var onAnimationComplete = function () { + dom.removeEventListener(backdropImage, 'animationend', onAnimationComplete, { + once: true + }); if (backdropImage === currentAnimatingElement) { currentAnimatingElement = null; } if (existingBackdropImage && existingBackdropImage.parentNode) { existingBackdropImage.parentNode.removeChild(existingBackdropImage); } - }, 800); + }; + + dom.addEventListener(backdropImage, 'animationend', onAnimationComplete, { + once: true + }); internalBackdrop(true); }; diff --git a/dashboard-ui/bower_components/emby-webcomponents/browserdeviceprofile.js b/dashboard-ui/bower_components/emby-webcomponents/browserdeviceprofile.js index 90a5a1258f..f19ef75e07 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/cardbuilder/card.css b/dashboard-ui/bower_components/emby-webcomponents/cardbuilder/card.css index dc2d025541..c199706649 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/cardbuilder/card.css +++ b/dashboard-ui/bower_components/emby-webcomponents/cardbuilder/card.css @@ -71,7 +71,7 @@ button { .cardBox { padding: 0 !important; - margin: 0; + margin: 2px; transition: none; border: 3px solid transparent; /* Needed in case cardBox is a button */ @@ -91,10 +91,6 @@ button { transform: scale(1.16, 1.16); } -.cardBox-mobile { - margin: 2px; -} - .card:focus { position: relative !important; z-index: 10 !important; @@ -202,6 +198,11 @@ button { } .coveredImage-img { + width: 100%; + height: 100%; +} + +.coveredImage-noscale-img { max-height: none; max-width: none; } diff --git a/dashboard-ui/bower_components/emby-webcomponents/cardbuilder/cardbuilder.js b/dashboard-ui/bower_components/emby-webcomponents/cardbuilder/cardbuilder.js index b5d8c93293..d9d226ce62 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/cardbuilder/cardbuilder.js +++ b/dashboard-ui/bower_components/emby-webcomponents/cardbuilder/cardbuilder.js @@ -2,32 +2,7 @@ define(['datetime', 'imageLoader', 'connectionManager', 'itemHelper', 'mediaInfo function (datetime, imageLoader, connectionManager, itemHelper, mediaInfo, focusManager, indicators, globalize, layoutManager, appHost, dom) { 'use strict'; - // Regular Expressions for parsing tags and attributes - var SURROGATE_PAIR_REGEXP = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g, - // Match everything outside of normal chars and " (quote character) - NON_ALPHANUMERIC_REGEXP = /([^\#-~| |!])/g; - - /** - * Escapes all potentially dangerous characters, so that the - * resulting string can be safely inserted into attribute or - * element text. - * @param value - * @returns {string} escaped text - */ - function htmlEncode(value) { - return value. - replace(/&/g, '&'). - replace(SURROGATE_PAIR_REGEXP, function (value) { - var hi = value.charCodeAt(0); - var low = value.charCodeAt(1); - return '&#' + (((hi - 0xD800) * 0x400) + (low - 0xDC00) + 0x10000) + ';'; - }). - replace(NON_ALPHANUMERIC_REGEXP, function (value) { - return '&#' + value.charCodeAt(0) + ';'; - }). - replace(//g, '>'); - } + var devicePixelRatio = window.devicePixelRatio || 1; function getCardsHtml(items, options) { @@ -1202,9 +1177,7 @@ define(['datetime', 'imageLoader', 'connectionManager', 'itemHelper', 'mediaInfo var separateCardBox = scalable; var cardBoxClass = options.cardLayout ? 'cardBox visualCardBox' : 'cardBox'; - if (!layoutManager.tv) { - cardBoxClass += ' cardBox-mobile'; - } else { + if (layoutManager.tv) { cardBoxClass += ' cardBox-focustransform'; } @@ -1300,7 +1273,11 @@ define(['datetime', 'imageLoader', 'connectionManager', 'itemHelper', 'mediaInfo var imgClass = 'cardImage cardImage-img lazy'; if (coveredImage) { - imgClass += ' coveredImage-img'; + if (devicePixelRatio === 1) { + imgClass += ' coveredImage-noscale-img'; + } else { + imgClass += ' coveredImage-img'; + } } cardImageContainerOpen += ''; diff --git a/dashboard-ui/bower_components/emby-webcomponents/collectioneditor/collectioneditor.js b/dashboard-ui/bower_components/emby-webcomponents/collectioneditor/collectioneditor.js index 73b9c8bd33..599e6e66f4 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 2a8273c8f1..8ec07af932 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/dialoghelper/dialoghelper.js b/dashboard-ui/bower_components/emby-webcomponents/dialoghelper/dialoghelper.js index 7c4ca8c98a..d2e00e0a1b 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/dialoghelper/dialoghelper.js +++ b/dashboard-ui/bower_components/emby-webcomponents/dialoghelper/dialoghelper.js @@ -3,6 +3,24 @@ var globalOnOpenCallback; + function enableAnimation() { + + if (browser.animate) { + return true; + } + + if (browser.edge) { + return true; + } + + // An indication of an older browser + if (browser.noFlex) { + return false; + } + + return true; + } + function removeCenterFocus(dlg) { if (layoutManager.tv) { @@ -136,10 +154,9 @@ backdropParent.parentNode.insertBefore(backdrop, backdropParent); dlg.backdrop = backdrop; - // Doing this immediately causes the opacity to jump immediately without animating - setTimeout(function () { - backdrop.classList.add('dialogBackdropOpened'); - }, 0); + // trigger reflow or the backdrop will not animate + void backdrop.offsetWidth; + backdrop.classList.add('dialogBackdropOpened'); dom.addEventListener((dlg.dialogContainer || backdrop), 'click', function (e) { if (e.target === dlg.dialogContainer) { @@ -226,27 +243,59 @@ } }; - setTimeout(onAnimationFinish, dlg.animationConfig.entry.timing.duration); + if (enableAnimation()) { + + var onFinish = function () { + dom.removeEventListener(dlg, 'animationend', onFinish, { + once: true + }); + onAnimationFinish(); + }; + dom.addEventListener(dlg, 'animationend', onFinish, { + once: true + }); + return; + } + + onAnimationFinish(); } function animateDialogClose(dlg, onAnimationFinish) { - switch (dlg.animationConfig.exit.name) { + if (enableAnimation()) { - case 'fadeout': - dlg.style.animation = 'fadeout ' + dlg.animationConfig.exit.timing.duration + 'ms ease-out normal both'; - break; - case 'scaledown': - dlg.style.animation = 'scaledown ' + dlg.animationConfig.exit.timing.duration + 'ms ease-out normal both'; - break; - case 'slidedown': - dlg.style.animation = 'slidedown ' + dlg.animationConfig.exit.timing.duration + 'ms ease-out normal both'; - break; - default: - break; + var animated = true; + switch (dlg.animationConfig.exit.name) { + + case 'fadeout': + dlg.style.animation = 'fadeout ' + dlg.animationConfig.exit.timing.duration + 'ms ease-out normal both'; + break; + case 'scaledown': + dlg.style.animation = 'scaledown ' + dlg.animationConfig.exit.timing.duration + 'ms ease-out normal both'; + break; + case 'slidedown': + dlg.style.animation = 'slidedown ' + dlg.animationConfig.exit.timing.duration + 'ms ease-out normal both'; + break; + default: + animated = false; + break; + } + var onFinish = function () { + dom.removeEventListener(dlg, 'animationend', onFinish, { + once: true + }); + onAnimationFinish(); + }; + dom.addEventListener(dlg, 'animationend', onFinish, { + once: true + }); + + if (animated) { + return; + } } - setTimeout(onAnimationFinish, dlg.animationConfig.exit.timing.duration); + onAnimationFinish(); } function shouldLockDocumentScroll(options) { @@ -270,15 +319,26 @@ var backdrop = dlg.backdrop; - if (backdrop) { - dlg.backdrop = null; + if (!backdrop) { + return; + } + + dlg.backdrop = null; + + var onAnimationFinish = function () { + backdrop.parentNode.removeChild(backdrop); + }; + + if (enableAnimation()) { backdrop.classList.remove('dialogBackdropOpened'); - setTimeout(function () { - backdrop.parentNode.removeChild(backdrop); - }, 300); + // this is not firing animatonend + setTimeout(onAnimationFinish, 300); + return; } + + onAnimationFinish(); } function centerFocus(elem, horiz, on) { @@ -375,19 +435,21 @@ dlg.classList.add('dialog-' + options.size); } - switch (dlg.animationConfig.entry.name) { + if (enableAnimation()) { + switch (dlg.animationConfig.entry.name) { - case 'fadein': - dlg.style.animation = 'fadein ' + entryAnimationDuration + 'ms ease-out normal'; - break; - case 'scaleup': - dlg.style.animation = 'scaleup ' + entryAnimationDuration + 'ms ease-out normal both'; - break; - case 'slideup': - dlg.style.animation = 'slideup ' + entryAnimationDuration + 'ms ease-out normal'; - break; - default: - break; + case 'fadein': + dlg.style.animation = 'fadein ' + entryAnimationDuration + 'ms ease-out normal'; + break; + case 'scaleup': + dlg.style.animation = 'scaleup ' + entryAnimationDuration + 'ms ease-out normal both'; + break; + case 'slideup': + dlg.style.animation = 'slideup ' + entryAnimationDuration + 'ms ease-out normal'; + break; + default: + break; + } } return dlg; 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 27ab9d3de2..cef357c8f3 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 d814ed616c..ebd004da68 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 6cb7b76b5e..762e391633 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 5e3a54d914..18a4eb7b12 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 d5f388ee0b..f8477c2345 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/guide/guide.css +++ b/dashboard-ui/bower_components/emby-webcomponents/guide/guide.css @@ -317,8 +317,9 @@ padding: 0 .5em 0; overflow: hidden; text-overflow: ellipsis; - display: flex; align-items: center; + /* Need block here or the ellipsis overflow is lost */ + display: block; } .programIcon { @@ -335,6 +336,20 @@ margin-left: .25em; } +.programTextIcon { + font-weight: bold; + color: rgb(30,30,30); + 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 390a695d54..25bd342899 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/guide/guide.js +++ b/dashboard-ui/bower_components/emby-webcomponents/guide/guide.js @@ -378,7 +378,7 @@ return ''; } - function getChannelProgramsHtml(context, date, channel, programs, options) { + function getChannelProgramsHtml(context, date, channel, programs, options, index) { var html = ''; @@ -482,7 +482,7 @@ timerAttributes += ' data-seriestimerid="' + program.SeriesTimerId + '"'; } - 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 f8c5027a7e..a7e10b622f 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 f62cac40c9..b06fceac53 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 ec5a8aa768..f878ee93fe 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 51ffdee7cd..fb39d06755 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 a9c0e737bd..2b68c181d0 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 3ed1f41608..4d91168082 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 04fdb9b669..2e74d77d24 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 += '