From 92abace7433cf2ca649d75aef463964258bb944e Mon Sep 17 00:00:00 2001 From: sancodes Date: Thu, 21 Apr 2022 10:40:17 -0700 Subject: [PATCH 01/20] add no-redeclare --- .eslintrc.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.eslintrc.js b/.eslintrc.js index ad65467f98..b00a85412a 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -60,7 +60,8 @@ module.exports = { 'no-var': ['error'], 'space-before-blocks': ['error'], 'space-infix-ops': 'error', - 'yoda': 'error' + 'yoda': 'error', + 'no-redeclare': ['error', { 'builtinGlobals': true }] }, settings: { react: { From ed8b274dbfb81fdf7b7151517a794f6e340fd8b5 Mon Sep 17 00:00:00 2001 From: sancodes Date: Sat, 30 Apr 2022 13:04:28 -0700 Subject: [PATCH 02/20] remove trailing space --- .eslintrc.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.eslintrc.js b/.eslintrc.js index b00a85412a..a514cab778 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -61,7 +61,8 @@ module.exports = { 'space-before-blocks': ['error'], 'space-infix-ops': 'error', 'yoda': 'error', - 'no-redeclare': ['error', { 'builtinGlobals': true }] + 'no-redeclare': ['error', { 'builtinGlobals': true }], + 'no-sequences': ['error'] }, settings: { react: { From 9f19170decb168e7f1277b6971c8f1cd4e9cda23 Mon Sep 17 00:00:00 2001 From: sancodes Date: Sat, 30 Apr 2022 13:04:58 -0700 Subject: [PATCH 03/20] fix no-sequence lint --- src/components/apphost.js | 2 +- src/components/favoriteitems.js | 2 +- src/components/libraryoptionseditor/libraryoptionseditor.js | 6 +++--- src/components/remotecontrol/remotecontrol.js | 2 +- src/controllers/dashboard/metadataImages.js | 4 ++-- src/controllers/itemDetails/index.js | 2 +- src/controllers/playback/video/index.js | 2 +- src/scripts/libraryBrowser.js | 2 +- 8 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/components/apphost.js b/src/components/apphost.js index eeef967eb7..27cce3dda0 100644 --- a/src/components/apphost.js +++ b/src/components/apphost.js @@ -75,7 +75,7 @@ function replaceAll(originalString, strReplace, strWith) { function generateDeviceId() { const keys = []; - if (keys.push(navigator.userAgent), keys.push(new Date().getTime()), window.btoa) { + if ((keys.push(navigator.userAgent), keys.push(new Date().getTime()), window.btoa)) { const result = replaceAll(btoa(keys.join('|')), '=', '1'); return result; } diff --git a/src/components/favoriteitems.js b/src/components/favoriteitems.js index 7fd4baa5d0..72fb303522 100644 --- a/src/components/favoriteitems.js +++ b/src/components/favoriteitems.js @@ -141,7 +141,7 @@ import '../elements/emby-itemscontainer/emby-itemscontainer'; let html = ''; if (result.Items.length) { - if (html += '
', !layoutManager.tv && options.Limit && result.Items.length >= options.Limit) { + if ((html += '
', !layoutManager.tv && options.Limit && result.Items.length >= options.Limit)) { html += ''; html += '

'; html += globalize.translate(section.name); diff --git a/src/components/libraryoptionseditor/libraryoptionseditor.js b/src/components/libraryoptionseditor/libraryoptionseditor.js index 597d747840..38760b6e5b 100644 --- a/src/components/libraryoptionseditor/libraryoptionseditor.js +++ b/src/components/libraryoptionseditor/libraryoptionseditor.js @@ -64,7 +64,7 @@ import template from './libraryoptionseditor.template.html'; let html = ''; const elem = page.querySelector('.metadataReaders'); - if (plugins.length < 1) return elem.innerHTML = '', elem.classList.add('hide'), !1; + if (plugins.length < 1) return (elem.innerHTML = '', elem.classList.add('hide'), !1); html += `

${globalize.translate('LabelMetadataReaders')}

`; html += '
'; for (let i = 0; i < plugins.length; i++) { @@ -97,7 +97,7 @@ import template from './libraryoptionseditor.template.html'; function renderMetadataSavers(page, metadataSavers) { let html = ''; const elem = page.querySelector('.metadataSavers'); - if (!metadataSavers.length) return elem.innerHTML = '', elem.classList.add('hide'), false; + if (!metadataSavers.length) return (elem.innerHTML = '', elem.classList.add('hide'), false); html += `

${globalize.translate('LabelMetadataSavers')}

`; html += '
'; for (let i = 0; i < metadataSavers.length; i++) { @@ -550,7 +550,7 @@ import template from './libraryoptionseditor.template.html'; function getOrderedPlugins(plugins, configuredOrder) { plugins = plugins.slice(0); plugins.sort((a, b) => { - return a = configuredOrder.indexOf(a.Name), b = configuredOrder.indexOf(b.Name), a < b ? -1 : a > b ? 1 : 0; + return ((a = configuredOrder.indexOf(a.Name), b = configuredOrder.indexOf(b.Name)), a < b ? -1 : a > b ? 1 : 0); }); return plugins; } diff --git a/src/components/remotecontrol/remotecontrol.js b/src/components/remotecontrol/remotecontrol.js index fdb15b272e..f065a41d29 100644 --- a/src/components/remotecontrol/remotecontrol.js +++ b/src/components/remotecontrol/remotecontrol.js @@ -646,7 +646,7 @@ export default function () { } function bindToPlayer(context, player) { - if (releaseCurrentPlayer(), currentPlayer = player, player) { + if ((releaseCurrentPlayer(), currentPlayer = player, player)) { const state = playbackManager.getPlayerState(player); onStateChanged.call(player, { type: 'init' diff --git a/src/controllers/dashboard/metadataImages.js b/src/controllers/dashboard/metadataImages.js index f4307ee6be..9cb2af961d 100644 --- a/src/controllers/dashboard/metadataImages.js +++ b/src/controllers/dashboard/metadataImages.js @@ -43,11 +43,11 @@ import Dashboard from '../../utils/dashboard'; function onSubmit() { const form = this; - return loading.show(), ApiClient.getServerConfiguration().then(function(config) { + return (loading.show(), ApiClient.getServerConfiguration().then(function(config) { config.PreferredMetadataLanguage = form.querySelector('#selectLanguage').value; config.MetadataCountryCode = form.querySelector('#selectCountry').value; ApiClient.updateServerConfiguration(config).then(Dashboard.processServerConfigurationUpdateResult); - }), !1; + }), !1); } function getTabs() { diff --git a/src/controllers/itemDetails/index.js b/src/controllers/itemDetails/index.js index e64f305e97..07066201a7 100644 --- a/src/controllers/itemDetails/index.js +++ b/src/controllers/itemDetails/index.js @@ -1790,7 +1790,7 @@ function renderAdditionalParts(page, item, user) { function renderScenes(page, item) { let chapters = item.Chapters || []; - if (chapters.length && !chapters[0].ImageTag && (chapters = []), chapters.length) { + if ((chapters.length && !chapters[0].ImageTag && (chapters = []), chapters.length)) { page.querySelector('#scenesCollapsible').classList.remove('hide'); const scenesContent = page.querySelector('#scenesContent'); diff --git a/src/controllers/playback/video/index.js b/src/controllers/playback/video/index.js index bb683b7f35..9843c2b1df 100644 --- a/src/controllers/playback/video/index.js +++ b/src/controllers/playback/video/index.js @@ -727,7 +727,7 @@ import { setBackdropTransparency, TRANSPARENCY_LEVEL } from '../../../components const currentTimeMs = (playbackStartTimeTicks + (positionTicks || 0)) / 1e4; const programRuntimeMs = programEndDateMs - programStartDateMs; - if (nowPlayingPositionSlider.value = getDisplayPercentByTimeOfDay(programStartDateMs, programRuntimeMs, currentTimeMs), bufferedRanges.length) { + if ((nowPlayingPositionSlider.value = (getDisplayPercentByTimeOfDay(programStartDateMs, programRuntimeMs, currentTimeMs), bufferedRanges.length))) { const rangeStart = getDisplayPercentByTimeOfDay(programStartDateMs, programRuntimeMs, (playbackStartTimeTicks + (bufferedRanges[0].start || 0)) / 1e4); const rangeEnd = getDisplayPercentByTimeOfDay(programStartDateMs, programRuntimeMs, (playbackStartTimeTicks + (bufferedRanges[0].end || 0)) / 1e4); nowPlayingPositionSlider.setBufferedRanges([{ diff --git a/src/scripts/libraryBrowser.js b/src/scripts/libraryBrowser.js index 7f9480ddae..64a3293246 100644 --- a/src/scripts/libraryBrowser.js +++ b/src/scripts/libraryBrowser.js @@ -86,7 +86,7 @@ export function getQueryPagingHtml (options) { const recordsEnd = Math.min(startIndex + limit, totalRecordCount); const showControls = limit < totalRecordCount; - if (html += '
', showControls) { + if ((html += '
', showControls)) { html += ''; html += globalize.translate('ListPaging', (totalRecordCount ? startIndex + 1 : 0), recordsEnd, totalRecordCount); html += ''; From e857952ae0cce0df555c134542144192d9b403de Mon Sep 17 00:00:00 2001 From: sancodes Date: Fri, 20 May 2022 01:36:39 -0700 Subject: [PATCH 04/20] remove no-declare lint --- .eslintrc.js | 1 - 1 file changed, 1 deletion(-) diff --git a/.eslintrc.js b/.eslintrc.js index a514cab778..469bd39f12 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -61,7 +61,6 @@ module.exports = { 'space-before-blocks': ['error'], 'space-infix-ops': 'error', 'yoda': 'error', - 'no-redeclare': ['error', { 'builtinGlobals': true }], 'no-sequences': ['error'] }, settings: { From 8c11a0131d24ec89e3712e17a389e03e7df1dcdf Mon Sep 17 00:00:00 2001 From: sancodes Date: Fri, 20 May 2022 01:37:11 -0700 Subject: [PATCH 05/20] modify inline code to multiple line --- src/components/apphost.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/apphost.js b/src/components/apphost.js index 27cce3dda0..337e346df2 100644 --- a/src/components/apphost.js +++ b/src/components/apphost.js @@ -75,7 +75,9 @@ function replaceAll(originalString, strReplace, strWith) { function generateDeviceId() { const keys = []; - if ((keys.push(navigator.userAgent), keys.push(new Date().getTime()), window.btoa)) { + keys.push(navigator.userAgent); + keys.push(new Date().getTime()); + if (window.btoa) { const result = replaceAll(btoa(keys.join('|')), '=', '1'); return result; } From ebac2777925727e0a3fb2a684054b3930bbb3cae Mon Sep 17 00:00:00 2001 From: San <52472550+sancodes@users.noreply.github.com> Date: Fri, 20 May 2022 13:25:25 -0700 Subject: [PATCH 06/20] modify inline code Co-authored-by: Dmitry Lyzo <56478732+dmitrylyzo@users.noreply.github.com> --- src/components/libraryoptionseditor/libraryoptionseditor.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/components/libraryoptionseditor/libraryoptionseditor.js b/src/components/libraryoptionseditor/libraryoptionseditor.js index fd91950a7d..92341d4d1e 100644 --- a/src/components/libraryoptionseditor/libraryoptionseditor.js +++ b/src/components/libraryoptionseditor/libraryoptionseditor.js @@ -97,7 +97,11 @@ import template from './libraryoptionseditor.template.html'; function renderMetadataSavers(page, metadataSavers) { let html = ''; const elem = page.querySelector('.metadataSavers'); - if (!metadataSavers.length) return (elem.innerHTML = '', elem.classList.add('hide'), false); + if (!metadataSavers.length) { + elem.innerHTML = ''; + elem.classList.add('hide'); + return false; + } html += `

${globalize.translate('LabelMetadataSavers')}

`; html += '
'; for (let i = 0; i < metadataSavers.length; i++) { From 57d0002aa35bf00a18964150663a2b4742f2cda5 Mon Sep 17 00:00:00 2001 From: San <52472550+sancodes@users.noreply.github.com> Date: Fri, 20 May 2022 13:25:47 -0700 Subject: [PATCH 07/20] modify inline code Co-authored-by: Dmitry Lyzo <56478732+dmitrylyzo@users.noreply.github.com> --- src/components/favoriteitems.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/favoriteitems.js b/src/components/favoriteitems.js index bfd2c9bfc1..c82910743f 100644 --- a/src/components/favoriteitems.js +++ b/src/components/favoriteitems.js @@ -145,7 +145,9 @@ import '../elements/emby-itemscontainer/emby-itemscontainer'; let html = ''; if (result.Items.length) { - if ((html += '
', !layoutManager.tv && options.Limit && result.Items.length >= options.Limit)) { + html += '
'; + + if (!layoutManager.tv && options.Limit && result.Items.length >= options.Limit) { html += ''; html += '

'; html += globalize.translate(section.name); From 4794886399b0d1eb8f467c3b0a0b0d792c468add Mon Sep 17 00:00:00 2001 From: San <52472550+sancodes@users.noreply.github.com> Date: Fri, 20 May 2022 13:26:15 -0700 Subject: [PATCH 08/20] modify inline code Co-authored-by: Dmitry Lyzo <56478732+dmitrylyzo@users.noreply.github.com> --- .../libraryoptionseditor/libraryoptionseditor.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/components/libraryoptionseditor/libraryoptionseditor.js b/src/components/libraryoptionseditor/libraryoptionseditor.js index 92341d4d1e..18d1c9a8f3 100644 --- a/src/components/libraryoptionseditor/libraryoptionseditor.js +++ b/src/components/libraryoptionseditor/libraryoptionseditor.js @@ -64,7 +64,12 @@ import template from './libraryoptionseditor.template.html'; let html = ''; const elem = page.querySelector('.metadataReaders'); - if (plugins.length < 1) return (elem.innerHTML = '', elem.classList.add('hide'), !1); + if (plugins.length < 1) { + elem.innerHTML = ''; + elem.classList.add('hide') + return false; + } + html += `

${globalize.translate('LabelMetadataReaders')}

`; html += '
'; for (let i = 0; i < plugins.length; i++) { From 0703428bbbaf58f6790590dde6c6477a9ed7a120 Mon Sep 17 00:00:00 2001 From: San <52472550+sancodes@users.noreply.github.com> Date: Fri, 20 May 2022 13:26:53 -0700 Subject: [PATCH 09/20] modify inline code and fix indentation Co-authored-by: Dmitry Lyzo <56478732+dmitrylyzo@users.noreply.github.com> --- src/components/libraryoptionseditor/libraryoptionseditor.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/libraryoptionseditor/libraryoptionseditor.js b/src/components/libraryoptionseditor/libraryoptionseditor.js index 18d1c9a8f3..23b1cb105c 100644 --- a/src/components/libraryoptionseditor/libraryoptionseditor.js +++ b/src/components/libraryoptionseditor/libraryoptionseditor.js @@ -559,9 +559,9 @@ import template from './libraryoptionseditor.template.html'; function getOrderedPlugins(plugins, configuredOrder) { plugins = plugins.slice(0); plugins.sort((a, b) => { - a = configuredOrder.indexOf(a.Name); - b = configuredOrder.indexOf(b.Name); - return a - b; + a = configuredOrder.indexOf(a.Name); + b = configuredOrder.indexOf(b.Name); + return a - b; }); return plugins; } From ac01a26dcc889eb62b061b0e6ef2e7081b85c20a Mon Sep 17 00:00:00 2001 From: sancodes Date: Fri, 20 May 2022 13:34:25 -0700 Subject: [PATCH 10/20] add semi colon to fix lint --- src/components/libraryoptionseditor/libraryoptionseditor.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/libraryoptionseditor/libraryoptionseditor.js b/src/components/libraryoptionseditor/libraryoptionseditor.js index 23b1cb105c..2d67f04f0f 100644 --- a/src/components/libraryoptionseditor/libraryoptionseditor.js +++ b/src/components/libraryoptionseditor/libraryoptionseditor.js @@ -66,7 +66,7 @@ import template from './libraryoptionseditor.template.html'; if (plugins.length < 1) { elem.innerHTML = ''; - elem.classList.add('hide') + elem.classList.add('hide'); return false; } From c65a6dc88830b058ec2f88b65f34db74ba14db77 Mon Sep 17 00:00:00 2001 From: San <52472550+sancodes@users.noreply.github.com> Date: Mon, 30 May 2022 20:44:14 -0700 Subject: [PATCH 11/20] fix parenthesis Co-authored-by: Bill Thornton --- src/components/remotecontrol/remotecontrol.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/remotecontrol/remotecontrol.js b/src/components/remotecontrol/remotecontrol.js index f065a41d29..ea9b6e2fea 100644 --- a/src/components/remotecontrol/remotecontrol.js +++ b/src/components/remotecontrol/remotecontrol.js @@ -646,7 +646,10 @@ export default function () { } function bindToPlayer(context, player) { - if ((releaseCurrentPlayer(), currentPlayer = player, player)) { + releaseCurrentPlayer(); + currentPlayer = player; + + if (player) { const state = playbackManager.getPlayerState(player); onStateChanged.call(player, { type: 'init' From 9d99ffb42653c20efc5ab30eb282504bba076e0c Mon Sep 17 00:00:00 2001 From: San <52472550+sancodes@users.noreply.github.com> Date: Mon, 30 May 2022 20:44:41 -0700 Subject: [PATCH 12/20] fix parenthesis Co-authored-by: Bill Thornton --- src/scripts/libraryBrowser.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/scripts/libraryBrowser.js b/src/scripts/libraryBrowser.js index 64a3293246..426b53eb45 100644 --- a/src/scripts/libraryBrowser.js +++ b/src/scripts/libraryBrowser.js @@ -86,7 +86,9 @@ export function getQueryPagingHtml (options) { const recordsEnd = Math.min(startIndex + limit, totalRecordCount); const showControls = limit < totalRecordCount; - if ((html += '
', showControls)) { + html += '
'; + + if (showControls) { html += ''; html += globalize.translate('ListPaging', (totalRecordCount ? startIndex + 1 : 0), recordsEnd, totalRecordCount); html += ''; From 623524549a63f61275b3b87459d949cc6f94790a Mon Sep 17 00:00:00 2001 From: San <52472550+sancodes@users.noreply.github.com> Date: Mon, 30 May 2022 20:45:33 -0700 Subject: [PATCH 13/20] fix parenthesis Co-authored-by: Bill Thornton --- src/controllers/itemDetails/index.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/controllers/itemDetails/index.js b/src/controllers/itemDetails/index.js index 6ec48c581a..5f5edd76ce 100644 --- a/src/controllers/itemDetails/index.js +++ b/src/controllers/itemDetails/index.js @@ -1790,7 +1790,11 @@ function renderAdditionalParts(page, item, user) { function renderScenes(page, item) { let chapters = item.Chapters || []; - if ((chapters.length && !chapters[0].ImageTag && (chapters = []), chapters.length)) { + if (chapters.length && !chapters[0].ImageTag) { + chapters = []; + } + + if (chapters.length) { page.querySelector('#scenesCollapsible').classList.remove('hide'); const scenesContent = page.querySelector('#scenesContent'); From 9856a83694712a3f93fe4299d09ceace710daefb Mon Sep 17 00:00:00 2001 From: San <52472550+sancodes@users.noreply.github.com> Date: Mon, 30 May 2022 20:45:57 -0700 Subject: [PATCH 14/20] fix nesting Co-authored-by: Bill Thornton --- src/controllers/dashboard/metadataImages.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/controllers/dashboard/metadataImages.js b/src/controllers/dashboard/metadataImages.js index 9cb2af961d..254c8f9633 100644 --- a/src/controllers/dashboard/metadataImages.js +++ b/src/controllers/dashboard/metadataImages.js @@ -43,7 +43,8 @@ import Dashboard from '../../utils/dashboard'; function onSubmit() { const form = this; - return (loading.show(), ApiClient.getServerConfiguration().then(function(config) { + loading.show(); + ApiClient.getServerConfiguration().then(function(config) { config.PreferredMetadataLanguage = form.querySelector('#selectLanguage').value; config.MetadataCountryCode = form.querySelector('#selectCountry').value; ApiClient.updateServerConfiguration(config).then(Dashboard.processServerConfigurationUpdateResult); From dbae8afe487ed084c4638bdeba5d319f068ad5a0 Mon Sep 17 00:00:00 2001 From: San <52472550+sancodes@users.noreply.github.com> Date: Mon, 30 May 2022 20:46:20 -0700 Subject: [PATCH 15/20] fix nesting Co-authored-by: Bill Thornton --- src/controllers/playback/video/index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/controllers/playback/video/index.js b/src/controllers/playback/video/index.js index a15105cbdb..8dcb8356bd 100644 --- a/src/controllers/playback/video/index.js +++ b/src/controllers/playback/video/index.js @@ -745,7 +745,9 @@ import { setBackdropTransparency, TRANSPARENCY_LEVEL } from '../../../components const currentTimeMs = (playbackStartTimeTicks + (positionTicks || 0)) / 1e4; const programRuntimeMs = programEndDateMs - programStartDateMs; - if ((nowPlayingPositionSlider.value = (getDisplayPercentByTimeOfDay(programStartDateMs, programRuntimeMs, currentTimeMs), bufferedRanges.length))) { + nowPlayingPositionSlider.value = getDisplayPercentByTimeOfDay(programStartDateMs, programRuntimeMs, currentTimeMs); + + if (bufferedRanges.length) { const rangeStart = getDisplayPercentByTimeOfDay(programStartDateMs, programRuntimeMs, (playbackStartTimeTicks + (bufferedRanges[0].start || 0)) / 1e4); const rangeEnd = getDisplayPercentByTimeOfDay(programStartDateMs, programRuntimeMs, (playbackStartTimeTicks + (bufferedRanges[0].end || 0)) / 1e4); nowPlayingPositionSlider.setBufferedRanges([{ From b5b8476b623a84c242486e823282a255bbfb1da6 Mon Sep 17 00:00:00 2001 From: San <52472550+sancodes@users.noreply.github.com> Date: Mon, 30 May 2022 20:46:58 -0700 Subject: [PATCH 16/20] fix styling Co-authored-by: Bill Thornton --- src/controllers/dashboard/metadataImages.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/controllers/dashboard/metadataImages.js b/src/controllers/dashboard/metadataImages.js index 254c8f9633..64512607bb 100644 --- a/src/controllers/dashboard/metadataImages.js +++ b/src/controllers/dashboard/metadataImages.js @@ -48,7 +48,8 @@ import Dashboard from '../../utils/dashboard'; config.PreferredMetadataLanguage = form.querySelector('#selectLanguage').value; config.MetadataCountryCode = form.querySelector('#selectCountry').value; ApiClient.updateServerConfiguration(config).then(Dashboard.processServerConfigurationUpdateResult); - }), !1); + }); + return false; } function getTabs() { From 91b432d3041d19ff506f914a6d4962e4730f4723 Mon Sep 17 00:00:00 2001 From: San <52472550+sancodes@users.noreply.github.com> Date: Tue, 31 May 2022 03:47:10 -0700 Subject: [PATCH 17/20] fix spacing Co-authored-by: Dmitry Lyzo <56478732+dmitrylyzo@users.noreply.github.com> --- src/controllers/itemDetails/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/controllers/itemDetails/index.js b/src/controllers/itemDetails/index.js index 5f5edd76ce..2d3f81b106 100644 --- a/src/controllers/itemDetails/index.js +++ b/src/controllers/itemDetails/index.js @@ -1791,7 +1791,7 @@ function renderScenes(page, item) { let chapters = item.Chapters || []; if (chapters.length && !chapters[0].ImageTag) { - chapters = []; + chapters = []; } if (chapters.length) { From 5b59f9ca216d9df413473946772f61ccb4381313 Mon Sep 17 00:00:00 2001 From: San <52472550+sancodes@users.noreply.github.com> Date: Tue, 31 May 2022 03:47:34 -0700 Subject: [PATCH 18/20] add no-sequences rule Co-authored-by: Dmitry Lyzo <56478732+dmitrylyzo@users.noreply.github.com> --- .eslintrc.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.eslintrc.js b/.eslintrc.js index 4238776613..188fee87c2 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -62,7 +62,7 @@ module.exports = { 'space-before-blocks': ['error'], 'space-infix-ops': 'error', 'yoda': 'error', - 'no-sequences': ['error'] + 'no-sequences': ['error', { 'allowInParentheses': false }] }, settings: { react: { From 247b78ac4cfa6170f5ff8a37ee4d71b7d1d68e3f Mon Sep 17 00:00:00 2001 From: sancodes Date: Thu, 9 Jun 2022 07:00:21 -0700 Subject: [PATCH 19/20] fix lint --- src/controllers/favorites.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/controllers/favorites.js b/src/controllers/favorites.js index 7bc27a1b81..0a7a466468 100644 --- a/src/controllers/favorites.js +++ b/src/controllers/favorites.js @@ -145,7 +145,7 @@ import ServerConnections from '../components/ServerConnections'; return function () { const apiClient = this.apiClient; const options = { - SortBy: (section.types, 'SeriesName,SortName'), + SortBy: 'SeriesName,SortName', SortOrder: 'Ascending', Filters: 'IsFavorite', Recursive: true, @@ -278,7 +278,7 @@ class FavoritesTab { } onResume(options) { - const promises = (this.apiClient, []); + const promises = []; const view = this.view; const elems = this.sectionsContainer.querySelectorAll('.itemsContainer'); From d53d7892720b8707fae484d033bc6b37c0987759 Mon Sep 17 00:00:00 2001 From: sancodes Date: Thu, 9 Jun 2022 07:00:43 -0700 Subject: [PATCH 20/20] fix lint --- src/controllers/list.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/controllers/list.js b/src/controllers/list.js index b880502828..4c9e97ca48 100644 --- a/src/controllers/list.js +++ b/src/controllers/list.js @@ -1173,7 +1173,7 @@ class ItemsView { } getVisibleViewSettings() { - const item = (this.params, this.currentItem); + const item = this.currentItem; const fields = ['showTitle']; if (!item || item.Type !== 'PhotoAlbum' && item.Type !== 'ChannelFolderItem') {