diff --git a/.eslintrc.js b/.eslintrc.js index 2c750c847c..cb8df6623d 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -228,15 +228,12 @@ module.exports = { }, env: { node: false, - amd: true, browser: true, es6: true, es2017: true, es2020: true }, globals: { - // Browser globals - 'MediaMetadata': 'readonly', // Tizen globals 'tizen': 'readonly', 'webapis': 'readonly', @@ -249,19 +246,11 @@ module.exports = { 'ApiClient': 'writable', 'Events': 'writable', 'chrome': 'writable', - 'DlnaProfilePage': 'writable', 'DashboardPage': 'writable', 'Emby': 'readonly', - 'Globalize': 'writable', 'Hls': 'writable', 'LibraryMenu': 'writable', - 'LinkParser': 'writable', - 'LiveTvHelpers': 'writable', - 'Loading': 'writable', 'MetadataEditor': 'writable', - 'ServerNotifications': 'writable', - 'TaskButton': 'writable', - 'UserParentalControlPage': 'writable', 'Windows': 'readonly', // Build time definitions __COMMIT_SHA__: 'readonly', diff --git a/src/controllers/livetv/livetvschedule.js b/src/controllers/livetv/livetvschedule.js index 84d51b6513..2ececff07a 100644 --- a/src/controllers/livetv/livetvschedule.js +++ b/src/controllers/livetv/livetvschedule.js @@ -2,12 +2,12 @@ import cardBuilder from 'components/cardbuilder/cardBuilder'; import imageLoader from 'components/images/imageLoader'; import layoutManager from 'components/layoutManager'; import loading from 'components/loading/loading'; +import { getTimersHtml } from 'scripts/livetvcomponents'; import { getBackdropShape } from 'utils/card'; import Dashboard from 'utils/dashboard'; import 'elements/emby-button/emby-button'; import 'elements/emby-itemscontainer/emby-itemscontainer'; -import 'scripts/livetvcomponents'; function enableScrollX() { return !layoutManager.desktop; @@ -71,7 +71,7 @@ function renderActiveRecordings(context, promise) { } function renderTimers(context, timers, options) { - LiveTvHelpers.getTimersHtml(timers, options).then(function (html) { + getTimersHtml(timers, options).then(function (html) { const elem = context; if (html) { diff --git a/src/scripts/livetvcomponents.js b/src/scripts/livetvcomponents.js index 68a2c53453..6f35db3cae 100644 --- a/src/scripts/livetvcomponents.js +++ b/src/scripts/livetvcomponents.js @@ -8,7 +8,7 @@ function enableScrollX() { return !layoutManager.desktop; } -function getTimersHtml(timers, options) { +export function getTimersHtml(timers, options) { options = options || {}; const items = timers.map(function (t) { @@ -102,7 +102,3 @@ function getTimersHtml(timers, options) { } return Promise.resolve(html); } - -window.LiveTvHelpers = { - getTimersHtml: getTimersHtml -};