mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Merge branch 'master' into migrate-to-ES6-51
This commit is contained in:
commit
9b5247e561
72 changed files with 4995 additions and 4751 deletions
|
@ -2,4 +2,3 @@ node_modules
|
||||||
dist
|
dist
|
||||||
.idea
|
.idea
|
||||||
.vscode
|
.vscode
|
||||||
src/libraries
|
|
||||||
|
|
32
package.json
32
package.json
|
@ -17,7 +17,7 @@
|
||||||
"babel-loader": "^8.0.6",
|
"babel-loader": "^8.0.6",
|
||||||
"browser-sync": "^2.26.12",
|
"browser-sync": "^2.26.12",
|
||||||
"copy-webpack-plugin": "^5.1.1",
|
"copy-webpack-plugin": "^5.1.1",
|
||||||
"css-loader": "^4.2.0",
|
"css-loader": "^4.2.1",
|
||||||
"cssnano": "^4.1.10",
|
"cssnano": "^4.1.10",
|
||||||
"del": "^5.1.0",
|
"del": "^5.1.0",
|
||||||
"eslint": "^7.6.0",
|
"eslint": "^7.6.0",
|
||||||
|
@ -63,7 +63,7 @@
|
||||||
"fast-text-encoding": "^1.0.3",
|
"fast-text-encoding": "^1.0.3",
|
||||||
"flv.js": "^1.5.0",
|
"flv.js": "^1.5.0",
|
||||||
"headroom.js": "^0.11.0",
|
"headroom.js": "^0.11.0",
|
||||||
"hls.js": "^0.14.7",
|
"hls.js": "^0.14.8",
|
||||||
"howler": "^2.2.0",
|
"howler": "^2.2.0",
|
||||||
"intersection-observer": "^0.11.0",
|
"intersection-observer": "^0.11.0",
|
||||||
"jellyfin-apiclient": "^1.4.1",
|
"jellyfin-apiclient": "^1.4.1",
|
||||||
|
@ -80,7 +80,7 @@
|
||||||
"sortablejs": "^1.10.2",
|
"sortablejs": "^1.10.2",
|
||||||
"swiper": "^5.4.5",
|
"swiper": "^5.4.5",
|
||||||
"webcomponents.js": "^0.7.24",
|
"webcomponents.js": "^0.7.24",
|
||||||
"whatwg-fetch": "^3.3.1"
|
"whatwg-fetch": "^3.4.0"
|
||||||
},
|
},
|
||||||
"babel": {
|
"babel": {
|
||||||
"presets": [
|
"presets": [
|
||||||
|
@ -125,6 +125,8 @@
|
||||||
"src/components/itemHelper.js",
|
"src/components/itemHelper.js",
|
||||||
"src/components/itemidentifier/itemidentifier.js",
|
"src/components/itemidentifier/itemidentifier.js",
|
||||||
"src/components/itemMediaInfo/itemMediaInfo.js",
|
"src/components/itemMediaInfo/itemMediaInfo.js",
|
||||||
|
"src/components/itemsrefresher.js",
|
||||||
|
"src/components/layoutManager.js",
|
||||||
"src/components/lazyLoader/lazyLoaderIntersectionObserver.js",
|
"src/components/lazyLoader/lazyLoaderIntersectionObserver.js",
|
||||||
"src/components/libraryoptionseditor/libraryoptionseditor.js",
|
"src/components/libraryoptionseditor/libraryoptionseditor.js",
|
||||||
"src/components/listview/listview.js",
|
"src/components/listview/listview.js",
|
||||||
|
@ -153,21 +155,30 @@
|
||||||
"src/components/playlisteditor/playlisteditor.js",
|
"src/components/playlisteditor/playlisteditor.js",
|
||||||
"src/components/playmenu.js",
|
"src/components/playmenu.js",
|
||||||
"src/components/prompt/prompt.js",
|
"src/components/prompt/prompt.js",
|
||||||
|
"src/components/recordingcreator/seriesrecordingeditor.js",
|
||||||
|
"src/components/recordingcreator/recordinghelper.js",
|
||||||
"src/components/refreshdialog/refreshdialog.js",
|
"src/components/refreshdialog/refreshdialog.js",
|
||||||
"src/components/remotecontrol/remotecontrol.js",
|
"src/components/remotecontrol/remotecontrol.js",
|
||||||
"src/components/sanatizefilename.js",
|
"src/components/sanatizefilename.js",
|
||||||
"src/components/scrollManager.js",
|
"src/components/scrollManager.js",
|
||||||
|
"src/components/slideshow/slideshow.js",
|
||||||
|
"src/components/sortmenu/sortmenu.js",
|
||||||
"src/plugins/htmlVideoPlayer/plugin.js",
|
"src/plugins/htmlVideoPlayer/plugin.js",
|
||||||
|
"src/plugins/logoScreensaver/plugin.js",
|
||||||
|
"src/plugins/playAccessValidation/plugin.js",
|
||||||
"src/components/search/searchfields.js",
|
"src/components/search/searchfields.js",
|
||||||
"src/components/search/searchresults.js",
|
"src/components/search/searchresults.js",
|
||||||
"src/components/settingshelper.js",
|
"src/components/settingshelper.js",
|
||||||
"src/components/shortcuts.js",
|
"src/components/shortcuts.js",
|
||||||
|
"src/components/subtitleeditor/subtitleeditor.js",
|
||||||
|
"src/components/subtitlesync/subtitlesync.js",
|
||||||
"src/components/subtitlesettings/subtitleappearancehelper.js",
|
"src/components/subtitlesettings/subtitleappearancehelper.js",
|
||||||
"src/components/subtitlesettings/subtitlesettings.js",
|
"src/components/subtitlesettings/subtitlesettings.js",
|
||||||
"src/components/syncPlay/groupSelectionMenu.js",
|
"src/components/syncPlay/groupSelectionMenu.js",
|
||||||
"src/components/syncPlay/playbackPermissionManager.js",
|
"src/components/syncPlay/playbackPermissionManager.js",
|
||||||
"src/components/syncPlay/syncPlayManager.js",
|
"src/components/syncPlay/syncPlayManager.js",
|
||||||
"src/components/syncPlay/timeSyncManager.js",
|
"src/components/syncPlay/timeSyncManager.js",
|
||||||
|
"src/components/viewManager/viewManager.js",
|
||||||
"src/components/tvproviders/schedulesdirect.js",
|
"src/components/tvproviders/schedulesdirect.js",
|
||||||
"src/components/tvproviders/xmltv.js",
|
"src/components/tvproviders/xmltv.js",
|
||||||
"src/components/toast/toast.js",
|
"src/components/toast/toast.js",
|
||||||
|
@ -203,6 +214,9 @@
|
||||||
"src/controllers/dashboard/notifications/notification.js",
|
"src/controllers/dashboard/notifications/notification.js",
|
||||||
"src/controllers/dashboard/notifications/notifications.js",
|
"src/controllers/dashboard/notifications/notifications.js",
|
||||||
"src/controllers/dashboard/playback.js",
|
"src/controllers/dashboard/playback.js",
|
||||||
|
"src/controllers/dashboard/plugins/add/index.js",
|
||||||
|
"src/controllers/dashboard/plugins/installed/index.js",
|
||||||
|
"src/controllers/dashboard/plugins/available/index.js",
|
||||||
"src/controllers/dashboard/plugins/repositories/index.js",
|
"src/controllers/dashboard/plugins/repositories/index.js",
|
||||||
"src/controllers/dashboard/scheduledtasks/scheduledtask.js",
|
"src/controllers/dashboard/scheduledtasks/scheduledtask.js",
|
||||||
"src/controllers/dashboard/scheduledtasks/scheduledtasks.js",
|
"src/controllers/dashboard/scheduledtasks/scheduledtasks.js",
|
||||||
|
@ -214,9 +228,15 @@
|
||||||
"src/controllers/dashboard/users/userparentalcontrol.js",
|
"src/controllers/dashboard/users/userparentalcontrol.js",
|
||||||
"src/controllers/dashboard/users/userpasswordpage.js",
|
"src/controllers/dashboard/users/userpasswordpage.js",
|
||||||
"src/controllers/dashboard/users/userprofilespage.js",
|
"src/controllers/dashboard/users/userprofilespage.js",
|
||||||
|
"src/controllers/list.js",
|
||||||
"src/controllers/edititemmetadata.js",
|
"src/controllers/edititemmetadata.js",
|
||||||
"src/controllers/favorites.js",
|
"src/controllers/favorites.js",
|
||||||
"src/controllers/hometab.js",
|
"src/controllers/hometab.js",
|
||||||
|
"src/controllers/movies/moviecollections.js",
|
||||||
|
"src/controllers/movies/moviegenres.js",
|
||||||
|
"src/controllers/movies/movies.js",
|
||||||
|
"src/controllers/movies/moviesrecommended.js",
|
||||||
|
"src/controllers/movies/movietrailers.js",
|
||||||
"src/controllers/playback/nowplaying.js",
|
"src/controllers/playback/nowplaying.js",
|
||||||
"src/controllers/playback/videoosd.js",
|
"src/controllers/playback/videoosd.js",
|
||||||
"src/controllers/itemDetails/index.js",
|
"src/controllers/itemDetails/index.js",
|
||||||
|
@ -269,6 +289,9 @@
|
||||||
"src/elements/emby-tabs/emby-tabs.js",
|
"src/elements/emby-tabs/emby-tabs.js",
|
||||||
"src/elements/emby-textarea/emby-textarea.js",
|
"src/elements/emby-textarea/emby-textarea.js",
|
||||||
"src/elements/emby-toggle/emby-toggle.js",
|
"src/elements/emby-toggle/emby-toggle.js",
|
||||||
|
"src/libraries/screensavermanager.js",
|
||||||
|
"src/libraries/navdrawer/navdrawer.js",
|
||||||
|
"src/libraries/scroller.js",
|
||||||
"src/plugins/backdropScreensaver/plugin.js",
|
"src/plugins/backdropScreensaver/plugin.js",
|
||||||
"src/plugins/bookPlayer/plugin.js",
|
"src/plugins/bookPlayer/plugin.js",
|
||||||
"src/plugins/bookPlayer/tableOfContents.js",
|
"src/plugins/bookPlayer/tableOfContents.js",
|
||||||
|
@ -294,10 +317,13 @@
|
||||||
"src/scripts/mouseManager.js",
|
"src/scripts/mouseManager.js",
|
||||||
"src/scripts/multiDownload.js",
|
"src/scripts/multiDownload.js",
|
||||||
"src/scripts/playlists.js",
|
"src/scripts/playlists.js",
|
||||||
|
"src/scripts/scrollHelper.js",
|
||||||
|
"src/scripts/serverNotifications.js",
|
||||||
"src/scripts/routes.js",
|
"src/scripts/routes.js",
|
||||||
"src/scripts/settings/appSettings.js",
|
"src/scripts/settings/appSettings.js",
|
||||||
"src/scripts/settings/userSettings.js",
|
"src/scripts/settings/userSettings.js",
|
||||||
"src/scripts/settings/webSettings.js",
|
"src/scripts/settings/webSettings.js",
|
||||||
|
"src/scripts/shell.js",
|
||||||
"src/scripts/taskbutton.js",
|
"src/scripts/taskbutton.js",
|
||||||
"src/scripts/themeLoader.js",
|
"src/scripts/themeLoader.js",
|
||||||
"src/scripts/touchHelper.js"
|
"src/scripts/touchHelper.js"
|
||||||
|
|
|
@ -236,12 +236,6 @@
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.layout-desktop .searchTabButton,
|
|
||||||
.layout-mobile .searchTabButton,
|
|
||||||
.layout-tv .headerSearchButton {
|
|
||||||
display: none !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.mainDrawer-scrollContainer {
|
.mainDrawer-scrollContainer {
|
||||||
padding-bottom: 10vh;
|
padding-bottom: 10vh;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
define(['loading', 'globalize', 'events', 'viewManager', 'skinManager', 'backdrop', 'browser', 'page', 'appSettings', 'apphost', 'connectionManager'], function (loading, globalize, events, viewManager, skinManager, backdrop, browser, page, appSettings, appHost, connectionManager) {
|
define(['loading', 'globalize', 'events', 'viewManager', 'skinManager', 'backdrop', 'browser', 'page', 'appSettings', 'apphost', 'connectionManager'], function (loading, globalize, events, viewManager, skinManager, backdrop, browser, page, appSettings, appHost, connectionManager) {
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
|
viewManager = viewManager.default || viewManager;
|
||||||
browser = browser.default || browser;
|
browser = browser.default || browser;
|
||||||
loading = loading.default || loading;
|
loading = loading.default || loading;
|
||||||
|
|
||||||
|
|
|
@ -200,7 +200,7 @@ import 'flexStyles';
|
||||||
}
|
}
|
||||||
|
|
||||||
function centerFocus(elem, horiz, on) {
|
function centerFocus(elem, horiz, on) {
|
||||||
import('scrollHelper').then(scrollHelper => {
|
import('scrollHelper').then((scrollHelper) => {
|
||||||
const fn = on ? 'on' : 'off';
|
const fn = on ? 'on' : 'off';
|
||||||
scrollHelper.centerFocus[fn](elem, horiz);
|
scrollHelper.centerFocus[fn](elem, horiz);
|
||||||
});
|
});
|
||||||
|
|
|
@ -354,7 +354,7 @@ import 'scrollStyles';
|
||||||
}
|
}
|
||||||
|
|
||||||
function centerFocus(elem, horiz, on) {
|
function centerFocus(elem, horiz, on) {
|
||||||
import('scrollHelper').then(scrollHelper => {
|
import('scrollHelper').then((scrollHelper) => {
|
||||||
const fn = on ? 'on' : 'off';
|
const fn = on ? 'on' : 'off';
|
||||||
scrollHelper.centerFocus[fn](elem, horiz);
|
scrollHelper.centerFocus[fn](elem, horiz);
|
||||||
});
|
});
|
||||||
|
|
|
@ -2,6 +2,8 @@ define(['require', 'dom', 'focusManager', 'dialogHelper', 'loading', 'apphost',
|
||||||
'use strict';
|
'use strict';
|
||||||
focusManager = focusManager.default || focusManager;
|
focusManager = focusManager.default || focusManager;
|
||||||
|
|
||||||
|
layoutManager = layoutManager.default || layoutManager;
|
||||||
|
|
||||||
function onSubmit(e) {
|
function onSubmit(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
return false;
|
return false;
|
||||||
|
@ -151,6 +153,7 @@ define(['require', 'dom', 'focusManager', 'dialogHelper', 'loading', 'apphost',
|
||||||
|
|
||||||
function centerFocus(elem, horiz, on) {
|
function centerFocus(elem, horiz, on) {
|
||||||
require(['scrollHelper'], function (scrollHelper) {
|
require(['scrollHelper'], function (scrollHelper) {
|
||||||
|
scrollHelper = scrollHelper.default || scrollHelper;
|
||||||
var fn = on ? 'on' : 'off';
|
var fn = on ? 'on' : 'off';
|
||||||
scrollHelper.centerFocus[fn](elem, horiz);
|
scrollHelper.centerFocus[fn](elem, horiz);
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
define(['dialogHelper', 'globalize', 'userSettings', 'layoutManager', 'connectionManager', 'require', 'loading', 'scrollHelper', 'emby-checkbox', 'emby-radio', 'css!./../formdialog', 'material-icons'], function (dialogHelper, globalize, userSettings, layoutManager, connectionManager, require, loading, scrollHelper) {
|
define(['dialogHelper', 'globalize', 'userSettings', 'layoutManager', 'connectionManager', 'require', 'loading', 'scrollHelper', 'emby-checkbox', 'emby-radio', 'css!./../formdialog', 'material-icons'], function (dialogHelper, globalize, userSettings, layoutManager, connectionManager, require, loading, scrollHelper) {
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
|
layoutManager = layoutManager.default || layoutManager;
|
||||||
|
scrollHelper = scrollHelper.default || scrollHelper;
|
||||||
|
|
||||||
function saveCategories(context, options) {
|
function saveCategories(context, options) {
|
||||||
var categories = [];
|
var categories = [];
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,10 @@ define(['require', 'inputManager', 'browser', 'globalize', 'connectionManager',
|
||||||
playbackManager = playbackManager.default || playbackManager;
|
playbackManager = playbackManager.default || playbackManager;
|
||||||
browser = browser.default || browser;
|
browser = browser.default || browser;
|
||||||
loading = loading.default || loading;
|
loading = loading.default || loading;
|
||||||
|
layoutManager = layoutManager.default || layoutManager;
|
||||||
focusManager = focusManager.default || focusManager;
|
focusManager = focusManager.default || focusManager;
|
||||||
|
scrollHelper = scrollHelper.default || scrollHelper;
|
||||||
|
serverNotifications = serverNotifications.default || serverNotifications;
|
||||||
|
|
||||||
function showViewSettings(instance) {
|
function showViewSettings(instance) {
|
||||||
require(['guide-settings-dialog'], function (guideSettingsDialog) {
|
require(['guide-settings-dialog'], function (guideSettingsDialog) {
|
||||||
|
|
|
@ -1,12 +1,11 @@
|
||||||
define(['playbackManager', 'serverNotifications', 'events'], function (playbackManager, serverNotifications, events) {
|
import playbackManager from 'playbackManager';
|
||||||
'use strict';
|
import serverNotifications from 'serverNotifications';
|
||||||
|
import events from 'events';
|
||||||
playbackManager = playbackManager.default || playbackManager;
|
|
||||||
|
|
||||||
function onUserDataChanged(e, apiClient, userData) {
|
function onUserDataChanged(e, apiClient, userData) {
|
||||||
var instance = this;
|
const instance = this;
|
||||||
|
|
||||||
var eventsToMonitor = getEventsToMonitor(instance);
|
const eventsToMonitor = getEventsToMonitor(instance);
|
||||||
|
|
||||||
// TODO: Check user data change reason?
|
// TODO: Check user data change reason?
|
||||||
if (eventsToMonitor.indexOf('markfavorite') !== -1) {
|
if (eventsToMonitor.indexOf('markfavorite') !== -1) {
|
||||||
|
@ -17,8 +16,8 @@ define(['playbackManager', 'serverNotifications', 'events'], function (playbackM
|
||||||
}
|
}
|
||||||
|
|
||||||
function getEventsToMonitor(instance) {
|
function getEventsToMonitor(instance) {
|
||||||
var options = instance.options;
|
const options = instance.options;
|
||||||
var monitor = options ? options.monitorEvents : null;
|
const monitor = options ? options.monitorEvents : null;
|
||||||
if (monitor) {
|
if (monitor) {
|
||||||
return monitor.split(',');
|
return monitor.split(',');
|
||||||
}
|
}
|
||||||
|
@ -27,7 +26,7 @@ define(['playbackManager', 'serverNotifications', 'events'], function (playbackM
|
||||||
}
|
}
|
||||||
|
|
||||||
function onTimerCreated(e, apiClient, data) {
|
function onTimerCreated(e, apiClient, data) {
|
||||||
var instance = this;
|
const instance = this;
|
||||||
|
|
||||||
if (getEventsToMonitor(instance).indexOf('timers') !== -1) {
|
if (getEventsToMonitor(instance).indexOf('timers') !== -1) {
|
||||||
instance.notifyRefreshNeeded();
|
instance.notifyRefreshNeeded();
|
||||||
|
@ -36,7 +35,7 @@ define(['playbackManager', 'serverNotifications', 'events'], function (playbackM
|
||||||
}
|
}
|
||||||
|
|
||||||
function onSeriesTimerCreated(e, apiClient, data) {
|
function onSeriesTimerCreated(e, apiClient, data) {
|
||||||
var instance = this;
|
const instance = this;
|
||||||
if (getEventsToMonitor(instance).indexOf('seriestimers') !== -1) {
|
if (getEventsToMonitor(instance).indexOf('seriestimers') !== -1) {
|
||||||
instance.notifyRefreshNeeded();
|
instance.notifyRefreshNeeded();
|
||||||
return;
|
return;
|
||||||
|
@ -44,7 +43,7 @@ define(['playbackManager', 'serverNotifications', 'events'], function (playbackM
|
||||||
}
|
}
|
||||||
|
|
||||||
function onTimerCancelled(e, apiClient, data) {
|
function onTimerCancelled(e, apiClient, data) {
|
||||||
var instance = this;
|
const instance = this;
|
||||||
|
|
||||||
if (getEventsToMonitor(instance).indexOf('timers') !== -1) {
|
if (getEventsToMonitor(instance).indexOf('timers') !== -1) {
|
||||||
instance.notifyRefreshNeeded();
|
instance.notifyRefreshNeeded();
|
||||||
|
@ -53,7 +52,7 @@ define(['playbackManager', 'serverNotifications', 'events'], function (playbackM
|
||||||
}
|
}
|
||||||
|
|
||||||
function onSeriesTimerCancelled(e, apiClient, data) {
|
function onSeriesTimerCancelled(e, apiClient, data) {
|
||||||
var instance = this;
|
const instance = this;
|
||||||
if (getEventsToMonitor(instance).indexOf('seriestimers') !== -1) {
|
if (getEventsToMonitor(instance).indexOf('seriestimers') !== -1) {
|
||||||
instance.notifyRefreshNeeded();
|
instance.notifyRefreshNeeded();
|
||||||
return;
|
return;
|
||||||
|
@ -61,25 +60,25 @@ define(['playbackManager', 'serverNotifications', 'events'], function (playbackM
|
||||||
}
|
}
|
||||||
|
|
||||||
function onLibraryChanged(e, apiClient, data) {
|
function onLibraryChanged(e, apiClient, data) {
|
||||||
var instance = this;
|
const instance = this;
|
||||||
var eventsToMonitor = getEventsToMonitor(instance);
|
const eventsToMonitor = getEventsToMonitor(instance);
|
||||||
if (eventsToMonitor.indexOf('seriestimers') !== -1 || eventsToMonitor.indexOf('timers') !== -1) {
|
if (eventsToMonitor.indexOf('seriestimers') !== -1 || eventsToMonitor.indexOf('timers') !== -1) {
|
||||||
// yes this is an assumption
|
// yes this is an assumption
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var itemsAdded = data.ItemsAdded || [];
|
const itemsAdded = data.ItemsAdded || [];
|
||||||
var itemsRemoved = data.ItemsRemoved || [];
|
const itemsRemoved = data.ItemsRemoved || [];
|
||||||
if (!itemsAdded.length && !itemsRemoved.length) {
|
if (!itemsAdded.length && !itemsRemoved.length) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var options = instance.options || {};
|
const options = instance.options || {};
|
||||||
var parentId = options.parentId;
|
const parentId = options.parentId;
|
||||||
if (parentId) {
|
if (parentId) {
|
||||||
var foldersAddedTo = data.FoldersAddedTo || [];
|
const foldersAddedTo = data.FoldersAddedTo || [];
|
||||||
var foldersRemovedFrom = data.FoldersRemovedFrom || [];
|
const foldersRemovedFrom = data.FoldersRemovedFrom || [];
|
||||||
var collectionFolders = data.CollectionFolders || [];
|
const collectionFolders = data.CollectionFolders || [];
|
||||||
|
|
||||||
if (foldersAddedTo.indexOf(parentId) === -1 && foldersRemovedFrom.indexOf(parentId) === -1 && collectionFolders.indexOf(parentId) === -1) {
|
if (foldersAddedTo.indexOf(parentId) === -1 && foldersRemovedFrom.indexOf(parentId) === -1 && collectionFolders.indexOf(parentId) === -1) {
|
||||||
return;
|
return;
|
||||||
|
@ -90,11 +89,11 @@ define(['playbackManager', 'serverNotifications', 'events'], function (playbackM
|
||||||
}
|
}
|
||||||
|
|
||||||
function onPlaybackStopped(e, stopInfo) {
|
function onPlaybackStopped(e, stopInfo) {
|
||||||
var instance = this;
|
const instance = this;
|
||||||
|
|
||||||
var state = stopInfo.state;
|
const state = stopInfo.state;
|
||||||
|
|
||||||
var eventsToMonitor = getEventsToMonitor(instance);
|
const eventsToMonitor = getEventsToMonitor(instance);
|
||||||
if (state.NowPlayingItem && state.NowPlayingItem.MediaType === 'Video') {
|
if (state.NowPlayingItem && state.NowPlayingItem.MediaType === 'Video') {
|
||||||
if (eventsToMonitor.indexOf('videoplayback') !== -1) {
|
if (eventsToMonitor.indexOf('videoplayback') !== -1) {
|
||||||
instance.notifyRefreshNeeded(true);
|
instance.notifyRefreshNeeded(true);
|
||||||
|
@ -109,14 +108,14 @@ define(['playbackManager', 'serverNotifications', 'events'], function (playbackM
|
||||||
}
|
}
|
||||||
|
|
||||||
function addNotificationEvent(instance, name, handler, owner) {
|
function addNotificationEvent(instance, name, handler, owner) {
|
||||||
var localHandler = handler.bind(instance);
|
const localHandler = handler.bind(instance);
|
||||||
owner = owner || serverNotifications;
|
owner = owner || serverNotifications;
|
||||||
events.on(owner, name, localHandler);
|
events.on(owner, name, localHandler);
|
||||||
instance['event_' + name] = localHandler;
|
instance['event_' + name] = localHandler;
|
||||||
}
|
}
|
||||||
|
|
||||||
function removeNotificationEvent(instance, name, owner) {
|
function removeNotificationEvent(instance, name, owner) {
|
||||||
var handler = instance['event_' + name];
|
const handler = instance['event_' + name];
|
||||||
if (handler) {
|
if (handler) {
|
||||||
owner = owner || serverNotifications;
|
owner = owner || serverNotifications;
|
||||||
events.off(owner, name, handler);
|
events.off(owner, name, handler);
|
||||||
|
@ -124,7 +123,8 @@ define(['playbackManager', 'serverNotifications', 'events'], function (playbackM
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function ItemsRefresher(options) {
|
class ItemsRefresher {
|
||||||
|
constructor(options) {
|
||||||
this.options = options || {};
|
this.options = options || {};
|
||||||
|
|
||||||
addNotificationEvent(this, 'UserDataChanged', onUserDataChanged);
|
addNotificationEvent(this, 'UserDataChanged', onUserDataChanged);
|
||||||
|
@ -136,18 +136,18 @@ define(['playbackManager', 'serverNotifications', 'events'], function (playbackM
|
||||||
addNotificationEvent(this, 'playbackstop', onPlaybackStopped, playbackManager);
|
addNotificationEvent(this, 'playbackstop', onPlaybackStopped, playbackManager);
|
||||||
}
|
}
|
||||||
|
|
||||||
ItemsRefresher.prototype.pause = function () {
|
pause() {
|
||||||
clearRefreshInterval(this, true);
|
clearRefreshInterval(this, true);
|
||||||
|
|
||||||
this.paused = true;
|
this.paused = true;
|
||||||
};
|
}
|
||||||
|
|
||||||
ItemsRefresher.prototype.resume = function (options) {
|
resume(options) {
|
||||||
this.paused = false;
|
this.paused = false;
|
||||||
|
|
||||||
var refreshIntervalEndTime = this.refreshIntervalEndTime;
|
const refreshIntervalEndTime = this.refreshIntervalEndTime;
|
||||||
if (refreshIntervalEndTime) {
|
if (refreshIntervalEndTime) {
|
||||||
var remainingMs = refreshIntervalEndTime - new Date().getTime();
|
const remainingMs = refreshIntervalEndTime - new Date().getTime();
|
||||||
if (remainingMs > 0 && !this.needsRefresh) {
|
if (remainingMs > 0 && !this.needsRefresh) {
|
||||||
resetRefreshInterval(this, remainingMs);
|
resetRefreshInterval(this, remainingMs);
|
||||||
} else {
|
} else {
|
||||||
|
@ -161,9 +161,9 @@ define(['playbackManager', 'serverNotifications', 'events'], function (playbackM
|
||||||
}
|
}
|
||||||
|
|
||||||
return Promise.resolve();
|
return Promise.resolve();
|
||||||
};
|
}
|
||||||
|
|
||||||
ItemsRefresher.prototype.refreshItems = function () {
|
refreshItems() {
|
||||||
if (!this.fetchData) {
|
if (!this.fetchData) {
|
||||||
return Promise.resolve();
|
return Promise.resolve();
|
||||||
}
|
}
|
||||||
|
@ -176,15 +176,15 @@ define(['playbackManager', 'serverNotifications', 'events'], function (playbackM
|
||||||
this.needsRefresh = false;
|
this.needsRefresh = false;
|
||||||
|
|
||||||
return this.fetchData().then(onDataFetched.bind(this));
|
return this.fetchData().then(onDataFetched.bind(this));
|
||||||
};
|
}
|
||||||
|
|
||||||
ItemsRefresher.prototype.notifyRefreshNeeded = function (isInForeground) {
|
notifyRefreshNeeded(isInForeground) {
|
||||||
if (this.paused) {
|
if (this.paused) {
|
||||||
this.needsRefresh = true;
|
this.needsRefresh = true;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var timeout = this.refreshTimeout;
|
const timeout = this.refreshTimeout;
|
||||||
if (timeout) {
|
if (timeout) {
|
||||||
clearTimeout(timeout);
|
clearTimeout(timeout);
|
||||||
}
|
}
|
||||||
|
@ -194,7 +194,23 @@ define(['playbackManager', 'serverNotifications', 'events'], function (playbackM
|
||||||
} else {
|
} else {
|
||||||
this.refreshTimeout = setTimeout(this.refreshItems.bind(this), 10000);
|
this.refreshTimeout = setTimeout(this.refreshItems.bind(this), 10000);
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
|
destroy() {
|
||||||
|
clearRefreshInterval(this);
|
||||||
|
|
||||||
|
removeNotificationEvent(this, 'UserDataChanged');
|
||||||
|
removeNotificationEvent(this, 'TimerCreated');
|
||||||
|
removeNotificationEvent(this, 'SeriesTimerCreated');
|
||||||
|
removeNotificationEvent(this, 'TimerCancelled');
|
||||||
|
removeNotificationEvent(this, 'SeriesTimerCancelled');
|
||||||
|
removeNotificationEvent(this, 'LibraryChanged');
|
||||||
|
removeNotificationEvent(this, 'playbackstop', playbackManager);
|
||||||
|
|
||||||
|
this.fetchData = null;
|
||||||
|
this.options = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function clearRefreshInterval(instance, isPausing) {
|
function clearRefreshInterval(instance, isPausing) {
|
||||||
if (instance.refreshInterval) {
|
if (instance.refreshInterval) {
|
||||||
|
@ -211,7 +227,7 @@ define(['playbackManager', 'serverNotifications', 'events'], function (playbackM
|
||||||
clearRefreshInterval(instance);
|
clearRefreshInterval(instance);
|
||||||
|
|
||||||
if (!intervalMs) {
|
if (!intervalMs) {
|
||||||
var options = instance.options;
|
const options = instance.options;
|
||||||
if (options) {
|
if (options) {
|
||||||
intervalMs = options.refreshIntervalMs;
|
intervalMs = options.refreshIntervalMs;
|
||||||
}
|
}
|
||||||
|
@ -231,20 +247,4 @@ define(['playbackManager', 'serverNotifications', 'events'], function (playbackM
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ItemsRefresher.prototype.destroy = function () {
|
export default ItemsRefresher;
|
||||||
clearRefreshInterval(this);
|
|
||||||
|
|
||||||
removeNotificationEvent(this, 'UserDataChanged');
|
|
||||||
removeNotificationEvent(this, 'TimerCreated');
|
|
||||||
removeNotificationEvent(this, 'SeriesTimerCreated');
|
|
||||||
removeNotificationEvent(this, 'TimerCancelled');
|
|
||||||
removeNotificationEvent(this, 'SeriesTimerCancelled');
|
|
||||||
removeNotificationEvent(this, 'LibraryChanged');
|
|
||||||
removeNotificationEvent(this, 'playbackstop', playbackManager);
|
|
||||||
|
|
||||||
this.fetchData = null;
|
|
||||||
this.options = null;
|
|
||||||
};
|
|
||||||
|
|
||||||
return ItemsRefresher;
|
|
||||||
});
|
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
define(['browser', 'appSettings', 'events'], function (browser, appSettings, events) {
|
import browser from 'browser';
|
||||||
'use strict';
|
import appSettings from 'appSettings';
|
||||||
|
import events from 'events';
|
||||||
browser = browser.default || browser;
|
|
||||||
|
|
||||||
function setLayout(instance, layout, selectedLayout) {
|
function setLayout(instance, layout, selectedLayout) {
|
||||||
if (layout === selectedLayout) {
|
if (layout === selectedLayout) {
|
||||||
|
@ -13,11 +12,8 @@ define(['browser', 'appSettings', 'events'], function (browser, appSettings, eve
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function LayoutManager() {
|
class LayoutManager {
|
||||||
|
setLayout(layout, save) {
|
||||||
}
|
|
||||||
|
|
||||||
LayoutManager.prototype.setLayout = function (layout, save) {
|
|
||||||
if (!layout || layout === 'auto') {
|
if (!layout || layout === 'auto') {
|
||||||
this.autoLayout();
|
this.autoLayout();
|
||||||
|
|
||||||
|
@ -35,13 +31,13 @@ define(['browser', 'appSettings', 'events'], function (browser, appSettings, eve
|
||||||
}
|
}
|
||||||
|
|
||||||
events.trigger(this, 'modechange');
|
events.trigger(this, 'modechange');
|
||||||
};
|
}
|
||||||
|
|
||||||
LayoutManager.prototype.getSavedLayout = function (layout) {
|
getSavedLayout(layout) {
|
||||||
return appSettings.get('layout');
|
return appSettings.get('layout');
|
||||||
};
|
}
|
||||||
|
|
||||||
LayoutManager.prototype.autoLayout = function () {
|
autoLayout() {
|
||||||
// Take a guess at initial layout. The consuming app can override
|
// Take a guess at initial layout. The consuming app can override
|
||||||
if (browser.mobile) {
|
if (browser.mobile) {
|
||||||
this.setLayout('mobile', false);
|
this.setLayout('mobile', false);
|
||||||
|
@ -50,16 +46,16 @@ define(['browser', 'appSettings', 'events'], function (browser, appSettings, eve
|
||||||
} else {
|
} else {
|
||||||
this.setLayout(this.defaultLayout || 'tv', false);
|
this.setLayout(this.defaultLayout || 'tv', false);
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
LayoutManager.prototype.init = function () {
|
init() {
|
||||||
var saved = this.getSavedLayout();
|
const saved = this.getSavedLayout();
|
||||||
if (saved) {
|
if (saved) {
|
||||||
this.setLayout(saved, false);
|
this.setLayout(saved, false);
|
||||||
} else {
|
} else {
|
||||||
this.autoLayout();
|
this.autoLayout();
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return new LayoutManager();
|
export default new LayoutManager();
|
||||||
});
|
|
||||||
|
|
|
@ -2,6 +2,7 @@ define(['serverNotifications', 'playbackManager', 'events', 'globalize', 'requir
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
playbackManager = playbackManager.default || playbackManager;
|
playbackManager = playbackManager.default || playbackManager;
|
||||||
|
serverNotifications = serverNotifications.default || serverNotifications;
|
||||||
|
|
||||||
function onOneDocumentClick() {
|
function onOneDocumentClick() {
|
||||||
document.removeEventListener('click', onOneDocumentClick);
|
document.removeEventListener('click', onOneDocumentClick);
|
||||||
|
|
|
@ -210,7 +210,7 @@ import 'emby-button';
|
||||||
}
|
}
|
||||||
|
|
||||||
function centerFocus(elem, horiz, on) {
|
function centerFocus(elem, horiz, on) {
|
||||||
import('scrollHelper').then(scrollHelper => {
|
import('scrollHelper').then((scrollHelper) => {
|
||||||
const fn = on ? 'on' : 'off';
|
const fn = on ? 'on' : 'off';
|
||||||
scrollHelper.centerFocus[fn](elem, horiz);
|
scrollHelper.centerFocus[fn](elem, horiz);
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
define(['globalize', 'connectionManager', 'require', 'loading', 'apphost', 'dom', 'recordingHelper', 'events', 'paper-icon-button-light', 'emby-button', 'css!./recordingfields'], function (globalize, connectionManager, require, loading, appHost, dom, recordingHelper, events) {
|
define(['globalize', 'connectionManager', 'require', 'loading', 'apphost', 'dom', 'recordingHelper', 'events', 'paper-icon-button-light', 'emby-button', 'css!./recordingfields'], function (globalize, connectionManager, require, loading, appHost, dom, recordingHelper, events) {
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
|
recordingHelper = recordingHelper.default || recordingHelper;
|
||||||
|
|
||||||
function onRecordingButtonClick(e) {
|
function onRecordingButtonClick(e) {
|
||||||
var item = this.item;
|
var item = this.item;
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
define(['dialogHelper', 'globalize', 'layoutManager', 'mediaInfo', 'apphost', 'connectionManager', 'require', 'loading', 'scrollHelper', 'datetime', 'imageLoader', 'recordingFields', 'events', 'emby-checkbox', 'emby-button', 'emby-collapse', 'emby-input', 'paper-icon-button-light', 'css!./../formdialog', 'css!./recordingcreator', 'material-icons'], function (dialogHelper, globalize, layoutManager, mediaInfo, appHost, connectionManager, require, loading, scrollHelper, datetime, imageLoader, recordingFields, events) {
|
define(['dialogHelper', 'globalize', 'layoutManager', 'mediaInfo', 'apphost', 'connectionManager', 'require', 'loading', 'scrollHelper', 'datetime', 'imageLoader', 'recordingFields', 'events', 'emby-checkbox', 'emby-button', 'emby-collapse', 'emby-input', 'paper-icon-button-light', 'css!./../formdialog', 'css!./recordingcreator', 'material-icons'], function (dialogHelper, globalize, layoutManager, mediaInfo, appHost, connectionManager, require, loading, scrollHelper, datetime, imageLoader, recordingFields, events) {
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
|
layoutManager = layoutManager.default || layoutManager;
|
||||||
|
scrollHelper = scrollHelper.default || scrollHelper;
|
||||||
|
|
||||||
var currentDialog;
|
var currentDialog;
|
||||||
var closeAction;
|
var closeAction;
|
||||||
var currentRecordingFields;
|
var currentRecordingFields;
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
define(['dialogHelper', 'globalize', 'layoutManager', 'mediaInfo', 'apphost', 'connectionManager', 'require', 'loading', 'scrollHelper', 'imageLoader', 'scrollStyles', 'emby-button', 'emby-collapse', 'emby-input', 'paper-icon-button-light', 'css!./../formdialog', 'css!./recordingcreator', 'material-icons', 'flexStyles'], function (dialogHelper, globalize, layoutManager, mediaInfo, appHost, connectionManager, require, loading, scrollHelper, imageLoader) {
|
define(['dialogHelper', 'globalize', 'layoutManager', 'mediaInfo', 'apphost', 'connectionManager', 'require', 'loading', 'scrollHelper', 'imageLoader', 'scrollStyles', 'emby-button', 'emby-collapse', 'emby-input', 'paper-icon-button-light', 'css!./../formdialog', 'css!./recordingcreator', 'material-icons', 'flexStyles'], function (dialogHelper, globalize, layoutManager, mediaInfo, appHost, connectionManager, require, loading, scrollHelper, imageLoader) {
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
|
scrollHelper = scrollHelper.default || scrollHelper;
|
||||||
loading = loading.default || loading;
|
loading = loading.default || loading;
|
||||||
|
layoutManager = layoutManager.default || layoutManager;
|
||||||
|
|
||||||
var currentDialog;
|
var currentDialog;
|
||||||
var recordingDeleted = false;
|
var recordingDeleted = false;
|
||||||
|
@ -12,6 +14,8 @@ define(['dialogHelper', 'globalize', 'layoutManager', 'mediaInfo', 'apphost', 'c
|
||||||
function deleteTimer(apiClient, timerId) {
|
function deleteTimer(apiClient, timerId) {
|
||||||
return new Promise(function (resolve, reject) {
|
return new Promise(function (resolve, reject) {
|
||||||
require(['recordingHelper'], function (recordingHelper) {
|
require(['recordingHelper'], function (recordingHelper) {
|
||||||
|
recordingHelper = recordingHelper.default || recordingHelper;
|
||||||
|
|
||||||
recordingHelper.cancelTimerWithConfirmation(timerId, apiClient.serverId()).then(resolve, reject);
|
recordingHelper.cancelTimerWithConfirmation(timerId, apiClient.serverId()).then(resolve, reject);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
define(['globalize', 'connectionManager', 'serverNotifications', 'require', 'loading', 'apphost', 'dom', 'recordingHelper', 'events', 'paper-icon-button-light', 'emby-button', 'css!./recordingfields', 'flexStyles'], function (globalize, connectionManager, serverNotifications, require, loading, appHost, dom, recordingHelper, events) {
|
define(['globalize', 'connectionManager', 'serverNotifications', 'require', 'loading', 'apphost', 'dom', 'recordingHelper', 'events', 'paper-icon-button-light', 'emby-button', 'css!./recordingfields', 'flexStyles'], function (globalize, connectionManager, serverNotifications, require, loading, appHost, dom, recordingHelper, events) {
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
|
serverNotifications = serverNotifications.default || serverNotifications;
|
||||||
|
recordingHelper = recordingHelper.default || recordingHelper;
|
||||||
loading = loading.default || loading;
|
loading = loading.default || loading;
|
||||||
|
|
||||||
function loadData(parent, program, apiClient) {
|
function loadData(parent, program, apiClient) {
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
define(['globalize', 'loading', 'connectionManager'], function (globalize, loading, connectionManager) {
|
import globalize from 'globalize';
|
||||||
'use strict';
|
import loading from 'loading';
|
||||||
|
import connectionManager from 'connectionManager';
|
||||||
|
|
||||||
loading = loading.default || loading;
|
/*eslint prefer-const: "error"*/
|
||||||
|
|
||||||
function changeRecordingToSeries(apiClient, timerId, programId, confirmTimerCancellation) {
|
function changeRecordingToSeries(apiClient, timerId, programId, confirmTimerCancellation) {
|
||||||
loading.show();
|
loading.show();
|
||||||
|
@ -28,7 +29,7 @@ define(['globalize', 'loading', 'connectionManager'], function (globalize, loadi
|
||||||
|
|
||||||
function cancelTimerWithConfirmation(timerId, serverId) {
|
function cancelTimerWithConfirmation(timerId, serverId) {
|
||||||
return new Promise(function (resolve, reject) {
|
return new Promise(function (resolve, reject) {
|
||||||
require(['confirm'], function (confirm) {
|
import('confirm').then(({ default: confirm }) => {
|
||||||
confirm.default({
|
confirm.default({
|
||||||
|
|
||||||
text: globalize.translate('MessageConfirmRecordingCancellation'),
|
text: globalize.translate('MessageConfirmRecordingCancellation'),
|
||||||
|
@ -39,7 +40,7 @@ define(['globalize', 'loading', 'connectionManager'], function (globalize, loadi
|
||||||
}).then(function () {
|
}).then(function () {
|
||||||
loading.show();
|
loading.show();
|
||||||
|
|
||||||
var apiClient = connectionManager.getApiClient(serverId);
|
const apiClient = connectionManager.getApiClient(serverId);
|
||||||
cancelTimer(apiClient, timerId, true).then(resolve, reject);
|
cancelTimer(apiClient, timerId, true).then(resolve, reject);
|
||||||
}, reject);
|
}, reject);
|
||||||
});
|
});
|
||||||
|
@ -48,7 +49,7 @@ define(['globalize', 'loading', 'connectionManager'], function (globalize, loadi
|
||||||
|
|
||||||
function cancelSeriesTimerWithConfirmation(timerId, serverId) {
|
function cancelSeriesTimerWithConfirmation(timerId, serverId) {
|
||||||
return new Promise(function (resolve, reject) {
|
return new Promise(function (resolve, reject) {
|
||||||
require(['confirm'], function (confirm) {
|
import('confirm').then(({ default: confirm }) => {
|
||||||
confirm.default({
|
confirm.default({
|
||||||
|
|
||||||
text: globalize.translate('MessageConfirmRecordingCancellation'),
|
text: globalize.translate('MessageConfirmRecordingCancellation'),
|
||||||
|
@ -59,9 +60,9 @@ define(['globalize', 'loading', 'connectionManager'], function (globalize, loadi
|
||||||
}).then(function () {
|
}).then(function () {
|
||||||
loading.show();
|
loading.show();
|
||||||
|
|
||||||
var apiClient = connectionManager.getApiClient(serverId);
|
const apiClient = connectionManager.getApiClient(serverId);
|
||||||
apiClient.cancelLiveTvSeriesTimer(timerId).then(function () {
|
apiClient.cancelLiveTvSeriesTimer(timerId).then(function () {
|
||||||
require(['toast'], function (toast) {
|
import('toast').then(({default: toast}) => {
|
||||||
toast(globalize.translate('SeriesCancelled'));
|
toast(globalize.translate('SeriesCancelled'));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -86,7 +87,7 @@ define(['globalize', 'loading', 'connectionManager'], function (globalize, loadi
|
||||||
function createRecording(apiClient, programId, isSeries) {
|
function createRecording(apiClient, programId, isSeries) {
|
||||||
loading.show();
|
loading.show();
|
||||||
return apiClient.getNewLiveTvTimerDefaults({ programId: programId }).then(function (item) {
|
return apiClient.getNewLiveTvTimerDefaults({ programId: programId }).then(function (item) {
|
||||||
var promise = isSeries ?
|
const promise = isSeries ?
|
||||||
apiClient.createLiveTvSeriesTimer(item) :
|
apiClient.createLiveTvSeriesTimer(item) :
|
||||||
apiClient.createLiveTvTimer(item);
|
apiClient.createLiveTvTimer(item);
|
||||||
|
|
||||||
|
@ -98,15 +99,15 @@ define(['globalize', 'loading', 'connectionManager'], function (globalize, loadi
|
||||||
}
|
}
|
||||||
|
|
||||||
function sendToast(msg) {
|
function sendToast(msg) {
|
||||||
require(['toast'], function (toast) {
|
import('toast').then(({ default: toast }) => {
|
||||||
toast(msg);
|
toast(msg);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function showMultiCancellationPrompt(serverId, programId, timerId, timerStatus, seriesTimerId) {
|
function showMultiCancellationPrompt(serverId, programId, timerId, timerStatus, seriesTimerId) {
|
||||||
return new Promise(function (resolve, reject) {
|
return new Promise(function (resolve, reject) {
|
||||||
require(['dialog'], function (dialog) {
|
import('dialog').then(({ default: dialog }) => {
|
||||||
var items = [];
|
const items = [];
|
||||||
|
|
||||||
items.push({
|
items.push({
|
||||||
name: globalize.translate('HeaderKeepRecording'),
|
name: globalize.translate('HeaderKeepRecording'),
|
||||||
|
@ -140,7 +141,7 @@ define(['globalize', 'loading', 'connectionManager'], function (globalize, loadi
|
||||||
buttons: items
|
buttons: items
|
||||||
|
|
||||||
}).then(function (result) {
|
}).then(function (result) {
|
||||||
var apiClient = connectionManager.getApiClient(serverId);
|
const apiClient = connectionManager.getApiClient(serverId);
|
||||||
|
|
||||||
if (result === 'canceltimer') {
|
if (result === 'canceltimer') {
|
||||||
loading.show();
|
loading.show();
|
||||||
|
@ -150,7 +151,7 @@ define(['globalize', 'loading', 'connectionManager'], function (globalize, loadi
|
||||||
loading.show();
|
loading.show();
|
||||||
|
|
||||||
apiClient.cancelLiveTvSeriesTimer(seriesTimerId).then(function () {
|
apiClient.cancelLiveTvSeriesTimer(seriesTimerId).then(function () {
|
||||||
require(['toast'], function (toast) {
|
import('toast').then(({ default: toast }) => {
|
||||||
toast(globalize.translate('SeriesCancelled'));
|
toast(globalize.translate('SeriesCancelled'));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -166,8 +167,8 @@ define(['globalize', 'loading', 'connectionManager'], function (globalize, loadi
|
||||||
}
|
}
|
||||||
|
|
||||||
function toggleRecording(serverId, programId, timerId, timerStatus, seriesTimerId) {
|
function toggleRecording(serverId, programId, timerId, timerStatus, seriesTimerId) {
|
||||||
var apiClient = connectionManager.getApiClient(serverId);
|
const apiClient = connectionManager.getApiClient(serverId);
|
||||||
var hasTimer = timerId && timerStatus !== 'Cancelled';
|
const hasTimer = timerId && timerStatus !== 'Cancelled';
|
||||||
if (seriesTimerId && hasTimer) {
|
if (seriesTimerId && hasTimer) {
|
||||||
// cancel
|
// cancel
|
||||||
return showMultiCancellationPrompt(serverId, programId, timerId, timerStatus, seriesTimerId);
|
return showMultiCancellationPrompt(serverId, programId, timerId, timerStatus, seriesTimerId);
|
||||||
|
@ -183,7 +184,7 @@ define(['globalize', 'loading', 'connectionManager'], function (globalize, loadi
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
export default {
|
||||||
cancelTimer: cancelTimer,
|
cancelTimer: cancelTimer,
|
||||||
createRecording: createRecording,
|
createRecording: createRecording,
|
||||||
changeRecordingToSeries: changeRecordingToSeries,
|
changeRecordingToSeries: changeRecordingToSeries,
|
||||||
|
@ -191,4 +192,4 @@ define(['globalize', 'loading', 'connectionManager'], function (globalize, loadi
|
||||||
cancelTimerWithConfirmation: cancelTimerWithConfirmation,
|
cancelTimerWithConfirmation: cancelTimerWithConfirmation,
|
||||||
cancelSeriesTimerWithConfirmation: cancelSeriesTimerWithConfirmation
|
cancelSeriesTimerWithConfirmation: cancelSeriesTimerWithConfirmation
|
||||||
};
|
};
|
||||||
});
|
|
||||||
|
|
|
@ -1,23 +1,38 @@
|
||||||
define(['dialogHelper', 'globalize', 'layoutManager', 'mediaInfo', 'apphost', 'connectionManager', 'require', 'loading', 'scrollHelper', 'imageLoader', 'datetime', 'scrollStyles', 'emby-button', 'emby-checkbox', 'emby-input', 'emby-select', 'paper-icon-button-light', 'css!./../formdialog', 'css!./recordingcreator', 'material-icons', 'flexStyles'], function (dialogHelper, globalize, layoutManager, mediaInfo, appHost, connectionManager, require, loading, scrollHelper, imageLoader, datetime) {
|
import dialogHelper from 'dialogHelper';
|
||||||
'use strict';
|
import globalize from 'globalize';
|
||||||
|
import layoutManager from 'layoutManager';
|
||||||
|
import connectionManager from 'connectionManager';
|
||||||
|
import loading from 'loading';
|
||||||
|
import scrollHelper from 'scrollHelper';
|
||||||
|
import datetime from 'datetime';
|
||||||
|
import 'scrollStyles';
|
||||||
|
import 'emby-button';
|
||||||
|
import 'emby-checkbox';
|
||||||
|
import 'emby-input';
|
||||||
|
import 'emby-select';
|
||||||
|
import 'paper-icon-button-light';
|
||||||
|
import 'css!./../formdialog';
|
||||||
|
import 'css!./recordingcreator';
|
||||||
|
import 'material-icons';
|
||||||
|
import 'flexStyles';
|
||||||
|
|
||||||
loading = loading.default || loading;
|
/*eslint prefer-const: "error"*/
|
||||||
|
|
||||||
var currentDialog;
|
let currentDialog;
|
||||||
var recordingUpdated = false;
|
let recordingUpdated = false;
|
||||||
var recordingDeleted = false;
|
let recordingDeleted = false;
|
||||||
var currentItemId;
|
let currentItemId;
|
||||||
var currentServerId;
|
let currentServerId;
|
||||||
|
|
||||||
function deleteTimer(apiClient, timerId) {
|
function deleteTimer(apiClient, timerId) {
|
||||||
return new Promise(function (resolve, reject) {
|
return new Promise(function (resolve, reject) {
|
||||||
require(['recordingHelper'], function (recordingHelper) {
|
import('recordingHelper').then(({ default: recordingHelper }) => {
|
||||||
recordingHelper.cancelSeriesTimerWithConfirmation(timerId, apiClient.serverId()).then(resolve, reject);
|
recordingHelper.cancelSeriesTimerWithConfirmation(timerId, apiClient.serverId()).then(resolve, reject);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function renderTimer(context, item, apiClient) {
|
function renderTimer(context, item) {
|
||||||
context.querySelector('#txtPrePaddingMinutes').value = item.PrePaddingSeconds / 60;
|
context.querySelector('#txtPrePaddingMinutes').value = item.PrePaddingSeconds / 60;
|
||||||
context.querySelector('#txtPostPaddingMinutes').value = item.PostPaddingSeconds / 60;
|
context.querySelector('#txtPostPaddingMinutes').value = item.PostPaddingSeconds / 60;
|
||||||
|
|
||||||
|
@ -47,9 +62,9 @@ define(['dialogHelper', 'globalize', 'layoutManager', 'mediaInfo', 'apphost', 'c
|
||||||
}
|
}
|
||||||
|
|
||||||
function onSubmit(e) {
|
function onSubmit(e) {
|
||||||
var form = this;
|
const form = this;
|
||||||
|
|
||||||
var apiClient = connectionManager.getApiClient(currentServerId);
|
const apiClient = connectionManager.getApiClient(currentServerId);
|
||||||
|
|
||||||
apiClient.getLiveTvSeriesTimer(currentItemId).then(function (item) {
|
apiClient.getLiveTvSeriesTimer(currentItemId).then(function (item) {
|
||||||
item.PrePaddingSeconds = form.querySelector('#txtPrePaddingMinutes').value * 60;
|
item.PrePaddingSeconds = form.querySelector('#txtPrePaddingMinutes').value * 60;
|
||||||
|
@ -77,7 +92,7 @@ define(['dialogHelper', 'globalize', 'layoutManager', 'mediaInfo', 'apphost', 'c
|
||||||
});
|
});
|
||||||
|
|
||||||
context.querySelector('.btnCancelRecording').addEventListener('click', function () {
|
context.querySelector('.btnCancelRecording').addEventListener('click', function () {
|
||||||
var apiClient = connectionManager.getApiClient(currentServerId);
|
const apiClient = connectionManager.getApiClient(currentServerId);
|
||||||
deleteTimer(apiClient, currentItemId).then(function () {
|
deleteTimer(apiClient, currentItemId).then(function () {
|
||||||
closeDialog(true);
|
closeDialog(true);
|
||||||
});
|
});
|
||||||
|
@ -87,29 +102,29 @@ define(['dialogHelper', 'globalize', 'layoutManager', 'mediaInfo', 'apphost', 'c
|
||||||
}
|
}
|
||||||
|
|
||||||
function reload(context, id) {
|
function reload(context, id) {
|
||||||
var apiClient = connectionManager.getApiClient(currentServerId);
|
const apiClient = connectionManager.getApiClient(currentServerId);
|
||||||
|
|
||||||
loading.show();
|
loading.show();
|
||||||
if (typeof id === 'string') {
|
if (typeof id === 'string') {
|
||||||
currentItemId = id;
|
currentItemId = id;
|
||||||
|
|
||||||
apiClient.getLiveTvSeriesTimer(id).then(function (result) {
|
apiClient.getLiveTvSeriesTimer(id).then(function (result) {
|
||||||
renderTimer(context, result, apiClient);
|
renderTimer(context, result);
|
||||||
loading.hide();
|
loading.hide();
|
||||||
});
|
});
|
||||||
} else if (id) {
|
} else if (id) {
|
||||||
currentItemId = id.Id;
|
currentItemId = id.Id;
|
||||||
|
|
||||||
renderTimer(context, id, apiClient);
|
renderTimer(context, id);
|
||||||
loading.hide();
|
loading.hide();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function fillKeepUpTo(context) {
|
function fillKeepUpTo(context) {
|
||||||
var html = '';
|
let html = '';
|
||||||
|
|
||||||
for (var i = 0; i <= 50; i++) {
|
for (let i = 0; i <= 50; i++) {
|
||||||
var text;
|
let text;
|
||||||
|
|
||||||
if (i === 0) {
|
if (i === 0) {
|
||||||
text = globalize.translate('AsManyAsPossible');
|
text = globalize.translate('AsManyAsPossible');
|
||||||
|
@ -125,7 +140,7 @@ define(['dialogHelper', 'globalize', 'layoutManager', 'mediaInfo', 'apphost', 'c
|
||||||
context.querySelector('.selectKeepUpTo').innerHTML = html;
|
context.querySelector('.selectKeepUpTo').innerHTML = html;
|
||||||
}
|
}
|
||||||
|
|
||||||
function onFieldChange(e) {
|
function onFieldChange() {
|
||||||
this.querySelector('.btnSubmit').click();
|
this.querySelector('.btnSubmit').click();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -136,8 +151,8 @@ define(['dialogHelper', 'globalize', 'layoutManager', 'mediaInfo', 'apphost', 'c
|
||||||
loading.show();
|
loading.show();
|
||||||
options = options || {};
|
options = options || {};
|
||||||
|
|
||||||
require(['text!./seriesrecordingeditor.template.html'], function (template) {
|
import('text!./seriesrecordingeditor.template.html').then(({ default: template }) => {
|
||||||
var dialogOptions = {
|
const dialogOptions = {
|
||||||
removeOnClose: true,
|
removeOnClose: true,
|
||||||
scrollY: false
|
scrollY: false
|
||||||
};
|
};
|
||||||
|
@ -148,7 +163,7 @@ define(['dialogHelper', 'globalize', 'layoutManager', 'mediaInfo', 'apphost', 'c
|
||||||
dialogOptions.size = 'small';
|
dialogOptions.size = 'small';
|
||||||
}
|
}
|
||||||
|
|
||||||
var dlg = options.context;
|
const dlg = options.context;
|
||||||
|
|
||||||
dlg.classList.add('hide');
|
dlg.classList.add('hide');
|
||||||
dlg.innerHTML = globalize.translateHtml(template, 'core');
|
dlg.innerHTML = globalize.translateHtml(template, 'core');
|
||||||
|
@ -178,8 +193,8 @@ define(['dialogHelper', 'globalize', 'layoutManager', 'mediaInfo', 'apphost', 'c
|
||||||
loading.show();
|
loading.show();
|
||||||
options = options || {};
|
options = options || {};
|
||||||
|
|
||||||
require(['text!./seriesrecordingeditor.template.html'], function (template) {
|
import('text!./seriesrecordingeditor.template.html').then(({ default: template }) => {
|
||||||
var dialogOptions = {
|
const dialogOptions = {
|
||||||
removeOnClose: true,
|
removeOnClose: true,
|
||||||
scrollY: false
|
scrollY: false
|
||||||
};
|
};
|
||||||
|
@ -190,7 +205,7 @@ define(['dialogHelper', 'globalize', 'layoutManager', 'mediaInfo', 'apphost', 'c
|
||||||
dialogOptions.size = 'small';
|
dialogOptions.size = 'small';
|
||||||
}
|
}
|
||||||
|
|
||||||
var dlg = dialogHelper.createDialog(dialogOptions);
|
const dlg = dialogHelper.createDialog(dialogOptions);
|
||||||
|
|
||||||
dlg.classList.add('formDialog');
|
dlg.classList.add('formDialog');
|
||||||
dlg.classList.add('recordingDialog');
|
dlg.classList.add('recordingDialog');
|
||||||
|
@ -199,7 +214,7 @@ define(['dialogHelper', 'globalize', 'layoutManager', 'mediaInfo', 'apphost', 'c
|
||||||
dlg.style['min-width'] = '20%';
|
dlg.style['min-width'] = '20%';
|
||||||
}
|
}
|
||||||
|
|
||||||
var html = '';
|
let html = '';
|
||||||
|
|
||||||
html += globalize.translateHtml(template, 'core');
|
html += globalize.translateHtml(template, 'core');
|
||||||
|
|
||||||
|
@ -241,8 +256,7 @@ define(['dialogHelper', 'globalize', 'layoutManager', 'mediaInfo', 'apphost', 'c
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
export default {
|
||||||
show: showEditor,
|
show: showEditor,
|
||||||
embed: embed
|
embed: embed
|
||||||
};
|
};
|
||||||
});
|
|
||||||
|
|
|
@ -2,11 +2,17 @@
|
||||||
* Image viewer component
|
* Image viewer component
|
||||||
* @module components/slideshow/slideshow
|
* @module components/slideshow/slideshow
|
||||||
*/
|
*/
|
||||||
define(['dialogHelper', 'inputManager', 'connectionManager', 'layoutManager', 'focusManager', 'browser', 'apphost', 'dom', 'css!./style', 'material-icons', 'paper-icon-button-light'], function (dialogHelper, inputManager, connectionManager, layoutManager, focusManager, browser, appHost, dom) {
|
import dialogHelper from 'dialogHelper';
|
||||||
'use strict';
|
import inputManager from 'inputManager';
|
||||||
|
import connectionManager from 'connectionManager';
|
||||||
browser = browser.default || browser;
|
import layoutManager from 'layoutManager';
|
||||||
focusManager = focusManager.default || focusManager;
|
import focusManager from 'focusManager';
|
||||||
|
import browser from 'browser';
|
||||||
|
import appHost from 'apphost';
|
||||||
|
import dom from 'dom';
|
||||||
|
import 'css!./style';
|
||||||
|
import 'material-icons';
|
||||||
|
import 'paper-icon-button-light';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Name of transition event.
|
* Name of transition event.
|
||||||
|
@ -79,8 +85,8 @@ define(['dialogHelper', 'inputManager', 'connectionManager', 'layoutManager', 'f
|
||||||
* @returns {string} URL of the item's image.
|
* @returns {string} URL of the item's image.
|
||||||
*/
|
*/
|
||||||
function getImgUrl(item, user) {
|
function getImgUrl(item, user) {
|
||||||
var apiClient = connectionManager.getApiClient(item.ServerId);
|
const apiClient = connectionManager.getApiClient(item.ServerId);
|
||||||
var imageOptions = {};
|
const imageOptions = {};
|
||||||
|
|
||||||
if (item.BackdropImageTags && item.BackdropImageTags.length) {
|
if (item.BackdropImageTags && item.BackdropImageTags.length) {
|
||||||
return getBackdropImageUrl(item, imageOptions, apiClient);
|
return getBackdropImageUrl(item, imageOptions, apiClient);
|
||||||
|
@ -102,7 +108,7 @@ define(['dialogHelper', 'inputManager', 'connectionManager', 'layoutManager', 'f
|
||||||
* @returns {string} The HTML markup of the button.
|
* @returns {string} The HTML markup of the button.
|
||||||
*/
|
*/
|
||||||
function getIcon(icon, cssClass, canFocus, autoFocus) {
|
function getIcon(icon, cssClass, canFocus, autoFocus) {
|
||||||
var tabIndex = canFocus ? '' : ' tabindex="-1"';
|
const tabIndex = canFocus ? '' : ' tabindex="-1"';
|
||||||
autoFocus = autoFocus ? ' autofocus' : '';
|
autoFocus = autoFocus ? ' autofocus' : '';
|
||||||
return '<button is="paper-icon-button-light" class="autoSize ' + cssClass + '"' + tabIndex + autoFocus + '><span class="material-icons slideshowButtonIcon ' + icon + '"></span></button>';
|
return '<button is="paper-icon-button-light" class="autoSize ' + cssClass + '"' + tabIndex + autoFocus + '><span class="material-icons slideshowButtonIcon ' + icon + '"></span></button>';
|
||||||
}
|
}
|
||||||
|
@ -119,18 +125,18 @@ define(['dialogHelper', 'inputManager', 'connectionManager', 'layoutManager', 'f
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return function (options) {
|
export default function (options) {
|
||||||
var self = this;
|
const self = this;
|
||||||
/** Initialized instance of Swiper. */
|
/** Initialized instance of Swiper. */
|
||||||
var swiperInstance;
|
let swiperInstance;
|
||||||
/** Initialized instance of the dialog containing the Swiper instance. */
|
/** Initialized instance of the dialog containing the Swiper instance. */
|
||||||
var dialog;
|
let dialog;
|
||||||
/** Options of the slideshow components */
|
/** Options of the slideshow components */
|
||||||
var currentOptions;
|
let currentOptions;
|
||||||
/** ID of the timeout used to hide the OSD. */
|
/** ID of the timeout used to hide the OSD. */
|
||||||
var hideTimeout;
|
let hideTimeout;
|
||||||
/** Last coordinates of the mouse pointer. */
|
/** Last coordinates of the mouse pointer. */
|
||||||
var lastMouseMoveData;
|
let lastMouseMoveData;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates the HTML markup for the dialog and the OSD.
|
* Creates the HTML markup for the dialog and the OSD.
|
||||||
|
@ -150,12 +156,12 @@ define(['dialogHelper', 'inputManager', 'connectionManager', 'layoutManager', 'f
|
||||||
|
|
||||||
dialog.classList.add('slideshowDialog');
|
dialog.classList.add('slideshowDialog');
|
||||||
|
|
||||||
var html = '';
|
let html = '';
|
||||||
|
|
||||||
html += '<div class="slideshowSwiperContainer"><div class="swiper-wrapper"></div></div>';
|
html += '<div class="slideshowSwiperContainer"><div class="swiper-wrapper"></div></div>';
|
||||||
|
|
||||||
if (options.interactive && !layoutManager.tv) {
|
if (options.interactive && !layoutManager.tv) {
|
||||||
var actionButtonsOnTop = layoutManager.mobile;
|
const actionButtonsOnTop = layoutManager.mobile;
|
||||||
|
|
||||||
html += getIcon('keyboard_arrow_left', 'btnSlideshowPrevious slideshowButton hide-mouse-idle-tv', false);
|
html += getIcon('keyboard_arrow_left', 'btnSlideshowPrevious slideshowButton hide-mouse-idle-tv', false);
|
||||||
html += getIcon('keyboard_arrow_right', 'btnSlideshowNext slideshowButton hide-mouse-idle-tv', false);
|
html += getIcon('keyboard_arrow_right', 'btnSlideshowNext slideshowButton hide-mouse-idle-tv', false);
|
||||||
|
@ -196,17 +202,17 @@ define(['dialogHelper', 'inputManager', 'connectionManager', 'layoutManager', 'f
|
||||||
dialogHelper.close(dialog);
|
dialogHelper.close(dialog);
|
||||||
});
|
});
|
||||||
|
|
||||||
var btnPause = dialog.querySelector('.btnSlideshowPause');
|
const btnPause = dialog.querySelector('.btnSlideshowPause');
|
||||||
if (btnPause) {
|
if (btnPause) {
|
||||||
btnPause.addEventListener('click', playPause);
|
btnPause.addEventListener('click', playPause);
|
||||||
}
|
}
|
||||||
|
|
||||||
var btnDownload = dialog.querySelector('.btnDownload');
|
const btnDownload = dialog.querySelector('.btnDownload');
|
||||||
if (btnDownload) {
|
if (btnDownload) {
|
||||||
btnDownload.addEventListener('click', download);
|
btnDownload.addEventListener('click', download);
|
||||||
}
|
}
|
||||||
|
|
||||||
var btnShare = dialog.querySelector('.btnShare');
|
const btnShare = dialog.querySelector('.btnShare');
|
||||||
if (btnShare) {
|
if (btnShare) {
|
||||||
btnShare.addEventListener('click', share);
|
btnShare.addEventListener('click', share);
|
||||||
}
|
}
|
||||||
|
@ -231,7 +237,7 @@ define(['dialogHelper', 'inputManager', 'connectionManager', 'layoutManager', 'f
|
||||||
* Handles OSD changes when the autoplay is started.
|
* Handles OSD changes when the autoplay is started.
|
||||||
*/
|
*/
|
||||||
function onAutoplayStart() {
|
function onAutoplayStart() {
|
||||||
var btnSlideshowPause = dialog.querySelector('.btnSlideshowPause .material-icons');
|
const btnSlideshowPause = dialog.querySelector('.btnSlideshowPause .material-icons');
|
||||||
if (btnSlideshowPause) {
|
if (btnSlideshowPause) {
|
||||||
btnSlideshowPause.classList.replace('play_arrow', 'pause');
|
btnSlideshowPause.classList.replace('play_arrow', 'pause');
|
||||||
}
|
}
|
||||||
|
@ -241,7 +247,7 @@ define(['dialogHelper', 'inputManager', 'connectionManager', 'layoutManager', 'f
|
||||||
* Handles OSD changes when the autoplay is stopped.
|
* Handles OSD changes when the autoplay is stopped.
|
||||||
*/
|
*/
|
||||||
function onAutoplayStop() {
|
function onAutoplayStop() {
|
||||||
var btnSlideshowPause = dialog.querySelector('.btnSlideshowPause .material-icons');
|
const btnSlideshowPause = dialog.querySelector('.btnSlideshowPause .material-icons');
|
||||||
if (btnSlideshowPause) {
|
if (btnSlideshowPause) {
|
||||||
btnSlideshowPause.classList.replace('pause', 'play_arrow');
|
btnSlideshowPause.classList.replace('pause', 'play_arrow');
|
||||||
}
|
}
|
||||||
|
@ -288,14 +294,14 @@ define(['dialogHelper', 'inputManager', 'connectionManager', 'layoutManager', 'f
|
||||||
* @param {Object} options - Options used to initialize the Swiper instance.
|
* @param {Object} options - Options used to initialize the Swiper instance.
|
||||||
*/
|
*/
|
||||||
function loadSwiper(dialog, options) {
|
function loadSwiper(dialog, options) {
|
||||||
var slides;
|
let slides;
|
||||||
if (currentOptions.slides) {
|
if (currentOptions.slides) {
|
||||||
slides = currentOptions.slides;
|
slides = currentOptions.slides;
|
||||||
} else {
|
} else {
|
||||||
slides = currentOptions.items;
|
slides = currentOptions.items;
|
||||||
}
|
}
|
||||||
|
|
||||||
require(['swiper'], function (Swiper) {
|
import('swiper').then(({default: Swiper}) => {
|
||||||
swiperInstance = new Swiper(dialog.querySelector('.slideshowSwiperContainer'), {
|
swiperInstance = new Swiper(dialog.querySelector('.slideshowSwiperContainer'), {
|
||||||
direction: 'horizontal',
|
direction: 'horizontal',
|
||||||
// Loop is disabled due to the virtual slides option not supporting it.
|
// Loop is disabled due to the virtual slides option not supporting it.
|
||||||
|
@ -369,7 +375,7 @@ define(['dialogHelper', 'inputManager', 'connectionManager', 'layoutManager', 'f
|
||||||
* @returns {string} The HTML markup of the slide.
|
* @returns {string} The HTML markup of the slide.
|
||||||
*/
|
*/
|
||||||
function getSwiperSlideHtmlFromSlide(item) {
|
function getSwiperSlideHtmlFromSlide(item) {
|
||||||
var html = '';
|
let html = '';
|
||||||
html += '<div class="swiper-slide" data-original="' + item.originalImage + '" data-itemid="' + item.Id + '" data-serverid="' + item.ServerId + '">';
|
html += '<div class="swiper-slide" data-original="' + item.originalImage + '" data-itemid="' + item.Id + '" data-serverid="' + item.ServerId + '">';
|
||||||
html += '<div class="swiper-zoom-container">';
|
html += '<div class="swiper-zoom-container">';
|
||||||
if (useFakeZoomImage) {
|
if (useFakeZoomImage) {
|
||||||
|
@ -404,7 +410,7 @@ define(['dialogHelper', 'inputManager', 'connectionManager', 'layoutManager', 'f
|
||||||
*/
|
*/
|
||||||
function getCurrentImageInfo() {
|
function getCurrentImageInfo() {
|
||||||
if (swiperInstance) {
|
if (swiperInstance) {
|
||||||
var slide = document.querySelector('.swiper-slide-active');
|
const slide = document.querySelector('.swiper-slide-active');
|
||||||
|
|
||||||
if (slide) {
|
if (slide) {
|
||||||
return {
|
return {
|
||||||
|
@ -424,9 +430,9 @@ define(['dialogHelper', 'inputManager', 'connectionManager', 'layoutManager', 'f
|
||||||
* Starts a download for the currently displayed slide.
|
* Starts a download for the currently displayed slide.
|
||||||
*/
|
*/
|
||||||
function download() {
|
function download() {
|
||||||
var imageInfo = getCurrentImageInfo();
|
const imageInfo = getCurrentImageInfo();
|
||||||
|
|
||||||
require(['fileDownloader'], function (fileDownloader) {
|
import('fileDownloader').then(({default: fileDownloader}) => {
|
||||||
fileDownloader.download([imageInfo]);
|
fileDownloader.download([imageInfo]);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -435,7 +441,7 @@ define(['dialogHelper', 'inputManager', 'connectionManager', 'layoutManager', 'f
|
||||||
* Shares the currently displayed slide using the browser's built-in sharing feature.
|
* Shares the currently displayed slide using the browser's built-in sharing feature.
|
||||||
*/
|
*/
|
||||||
function share() {
|
function share() {
|
||||||
var imageInfo = getCurrentImageInfo();
|
const imageInfo = getCurrentImageInfo();
|
||||||
|
|
||||||
navigator.share({
|
navigator.share({
|
||||||
url: imageInfo.shareUrl
|
url: imageInfo.shareUrl
|
||||||
|
@ -464,7 +470,7 @@ define(['dialogHelper', 'inputManager', 'connectionManager', 'layoutManager', 'f
|
||||||
* Toggles the autoplay feature of the Swiper instance.
|
* Toggles the autoplay feature of the Swiper instance.
|
||||||
*/
|
*/
|
||||||
function playPause() {
|
function playPause() {
|
||||||
var paused = !dialog.querySelector('.btnSlideshowPause .material-icons').classList.contains('pause');
|
const paused = !dialog.querySelector('.btnSlideshowPause .material-icons').classList.contains('pause');
|
||||||
if (paused) {
|
if (paused) {
|
||||||
play();
|
play();
|
||||||
} else {
|
} else {
|
||||||
|
@ -476,7 +482,7 @@ define(['dialogHelper', 'inputManager', 'connectionManager', 'layoutManager', 'f
|
||||||
* Closes the dialog and destroys the Swiper instance.
|
* Closes the dialog and destroys the Swiper instance.
|
||||||
*/
|
*/
|
||||||
function onDialogClosed() {
|
function onDialogClosed() {
|
||||||
var swiper = swiperInstance;
|
const swiper = swiperInstance;
|
||||||
if (swiper) {
|
if (swiper) {
|
||||||
swiper.destroy(true, true);
|
swiper.destroy(true, true);
|
||||||
swiperInstance = null;
|
swiperInstance = null;
|
||||||
|
@ -494,7 +500,7 @@ define(['dialogHelper', 'inputManager', 'connectionManager', 'layoutManager', 'f
|
||||||
* Shows the OSD.
|
* Shows the OSD.
|
||||||
*/
|
*/
|
||||||
function showOsd() {
|
function showOsd() {
|
||||||
var bottom = dialog.querySelector('.slideshowBottomBar');
|
const bottom = dialog.querySelector('.slideshowBottomBar');
|
||||||
if (bottom) {
|
if (bottom) {
|
||||||
slideUpToShow(bottom);
|
slideUpToShow(bottom);
|
||||||
startHideTimer();
|
startHideTimer();
|
||||||
|
@ -505,7 +511,7 @@ define(['dialogHelper', 'inputManager', 'connectionManager', 'layoutManager', 'f
|
||||||
* Hides the OSD.
|
* Hides the OSD.
|
||||||
*/
|
*/
|
||||||
function hideOsd() {
|
function hideOsd() {
|
||||||
var bottom = dialog.querySelector('.slideshowBottomBar');
|
const bottom = dialog.querySelector('.slideshowBottomBar');
|
||||||
if (bottom) {
|
if (bottom) {
|
||||||
slideDownToHide(bottom);
|
slideDownToHide(bottom);
|
||||||
}
|
}
|
||||||
|
@ -540,7 +546,7 @@ define(['dialogHelper', 'inputManager', 'connectionManager', 'layoutManager', 'f
|
||||||
|
|
||||||
element.classList.remove('hide');
|
element.classList.remove('hide');
|
||||||
|
|
||||||
var onFinish = function () {
|
const onFinish = function () {
|
||||||
focusManager.focus(element.querySelector('.btnSlideshowPause'));
|
focusManager.focus(element.querySelector('.btnSlideshowPause'));
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -550,11 +556,11 @@ define(['dialogHelper', 'inputManager', 'connectionManager', 'layoutManager', 'f
|
||||||
}
|
}
|
||||||
|
|
||||||
requestAnimationFrame(function () {
|
requestAnimationFrame(function () {
|
||||||
var keyframes = [
|
const keyframes = [
|
||||||
{ transform: 'translate3d(0,' + element.offsetHeight + 'px,0)', opacity: '.3', offset: 0 },
|
{ transform: 'translate3d(0,' + element.offsetHeight + 'px,0)', opacity: '.3', offset: 0 },
|
||||||
{ transform: 'translate3d(0,0,0)', opacity: '1', offset: 1 }
|
{ transform: 'translate3d(0,0,0)', opacity: '1', offset: 1 }
|
||||||
];
|
];
|
||||||
var timing = { duration: 300, iterations: 1, easing: 'ease-out' };
|
const timing = { duration: 300, iterations: 1, easing: 'ease-out' };
|
||||||
element.animate(keyframes, timing).onfinish = onFinish;
|
element.animate(keyframes, timing).onfinish = onFinish;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -568,7 +574,7 @@ define(['dialogHelper', 'inputManager', 'connectionManager', 'layoutManager', 'f
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var onFinish = function () {
|
const onFinish = function () {
|
||||||
element.classList.add('hide');
|
element.classList.add('hide');
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -578,11 +584,11 @@ define(['dialogHelper', 'inputManager', 'connectionManager', 'layoutManager', 'f
|
||||||
}
|
}
|
||||||
|
|
||||||
requestAnimationFrame(function () {
|
requestAnimationFrame(function () {
|
||||||
var keyframes = [
|
const keyframes = [
|
||||||
{ transform: 'translate3d(0,0,0)', opacity: '1', offset: 0 },
|
{ transform: 'translate3d(0,0,0)', opacity: '1', offset: 0 },
|
||||||
{ transform: 'translate3d(0,' + element.offsetHeight + 'px,0)', opacity: '.3', offset: 1 }
|
{ transform: 'translate3d(0,' + element.offsetHeight + 'px,0)', opacity: '.3', offset: 1 }
|
||||||
];
|
];
|
||||||
var timing = { duration: 300, iterations: 1, easing: 'ease-out' };
|
const timing = { duration: 300, iterations: 1, easing: 'ease-out' };
|
||||||
element.animate(keyframes, timing).onfinish = onFinish;
|
element.animate(keyframes, timing).onfinish = onFinish;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -592,13 +598,13 @@ define(['dialogHelper', 'inputManager', 'connectionManager', 'layoutManager', 'f
|
||||||
* @param {Event} event - Pointer movement event.
|
* @param {Event} event - Pointer movement event.
|
||||||
*/
|
*/
|
||||||
function onPointerMove(event) {
|
function onPointerMove(event) {
|
||||||
var pointerType = event.pointerType || (layoutManager.mobile ? 'touch' : 'mouse');
|
const pointerType = event.pointerType || (layoutManager.mobile ? 'touch' : 'mouse');
|
||||||
|
|
||||||
if (pointerType === 'mouse') {
|
if (pointerType === 'mouse') {
|
||||||
var eventX = event.screenX || 0;
|
const eventX = event.screenX || 0;
|
||||||
var eventY = event.screenY || 0;
|
const eventY = event.screenY || 0;
|
||||||
|
|
||||||
var obj = lastMouseMoveData;
|
const obj = lastMouseMoveData;
|
||||||
if (!obj) {
|
if (!obj) {
|
||||||
lastMouseMoveData = {
|
lastMouseMoveData = {
|
||||||
x: eventX,
|
x: eventX,
|
||||||
|
@ -664,5 +670,4 @@ define(['dialogHelper', 'inputManager', 'connectionManager', 'layoutManager', 'f
|
||||||
dialogHelper.close(dialog);
|
dialogHelper.close(dialog);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
});
|
|
||||||
|
|
|
@ -1,7 +1,13 @@
|
||||||
define(['require', 'dom', 'focusManager', 'dialogHelper', 'loading', 'layoutManager', 'connectionManager', 'globalize', 'userSettings', 'emby-select', 'paper-icon-button-light', 'material-icons', 'css!./../formdialog', 'emby-button', 'flexStyles'], function (require, dom, focusManager, dialogHelper, loading, layoutManager, connectionManager, globalize, userSettings) {
|
import dialogHelper from 'dialogHelper';
|
||||||
'use strict';
|
import layoutManager from 'layoutManager';
|
||||||
|
import globalize from 'globalize';
|
||||||
focusManager = focusManager.default || focusManager;
|
import * as userSettings from 'userSettings';
|
||||||
|
import 'emby-select';
|
||||||
|
import 'paper-icon-button-light';
|
||||||
|
import 'material-icons';
|
||||||
|
import 'css!./../formdialog';
|
||||||
|
import 'emby-button';
|
||||||
|
import 'flexStyles';
|
||||||
|
|
||||||
function onSubmit(e) {
|
function onSubmit(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
@ -16,33 +22,30 @@ define(['require', 'dom', 'focusManager', 'dialogHelper', 'loading', 'layoutMana
|
||||||
}
|
}
|
||||||
|
|
||||||
function centerFocus(elem, horiz, on) {
|
function centerFocus(elem, horiz, on) {
|
||||||
require(['scrollHelper'], function (scrollHelper) {
|
import('scrollHelper').then(({default: scrollHelper}) => {
|
||||||
var fn = on ? 'on' : 'off';
|
const fn = on ? 'on' : 'off';
|
||||||
scrollHelper.centerFocus[fn](elem, horiz);
|
scrollHelper.centerFocus[fn](elem, horiz);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function fillSortBy(context, options) {
|
function fillSortBy(context, options) {
|
||||||
var selectSortBy = context.querySelector('.selectSortBy');
|
const selectSortBy = context.querySelector('.selectSortBy');
|
||||||
|
|
||||||
selectSortBy.innerHTML = options.map(function (o) {
|
selectSortBy.innerHTML = options.map(function (o) {
|
||||||
return '<option value="' + o.value + '">' + o.name + '</option>';
|
return '<option value="' + o.value + '">' + o.name + '</option>';
|
||||||
}).join('');
|
}).join('');
|
||||||
}
|
}
|
||||||
|
|
||||||
function saveValues(context, settings, settingsKey) {
|
function saveValues(context, settingsKey) {
|
||||||
userSettings.setFilter(settingsKey + '-sortorder', context.querySelector('.selectSortOrder').value);
|
userSettings.setFilter(settingsKey + '-sortorder', context.querySelector('.selectSortOrder').value);
|
||||||
userSettings.setFilter(settingsKey + '-sortby', context.querySelector('.selectSortBy').value);
|
userSettings.setFilter(settingsKey + '-sortby', context.querySelector('.selectSortBy').value);
|
||||||
}
|
}
|
||||||
|
|
||||||
function SortMenu() {
|
class SortMenu {
|
||||||
|
show(options) {
|
||||||
}
|
|
||||||
|
|
||||||
SortMenu.prototype.show = function (options) {
|
|
||||||
return new Promise(function (resolve, reject) {
|
return new Promise(function (resolve, reject) {
|
||||||
require(['text!./sortmenu.template.html'], function (template) {
|
import('text!./sortmenu.template.html').then(({default: template}) => {
|
||||||
var dialogOptions = {
|
const dialogOptions = {
|
||||||
removeOnClose: true,
|
removeOnClose: true,
|
||||||
scrollY: false
|
scrollY: false
|
||||||
};
|
};
|
||||||
|
@ -53,11 +56,11 @@ define(['require', 'dom', 'focusManager', 'dialogHelper', 'loading', 'layoutMana
|
||||||
dialogOptions.size = 'small';
|
dialogOptions.size = 'small';
|
||||||
}
|
}
|
||||||
|
|
||||||
var dlg = dialogHelper.createDialog(dialogOptions);
|
const dlg = dialogHelper.createDialog(dialogOptions);
|
||||||
|
|
||||||
dlg.classList.add('formDialog');
|
dlg.classList.add('formDialog');
|
||||||
|
|
||||||
var html = '';
|
let html = '';
|
||||||
|
|
||||||
html += '<div class="formDialogHeader">';
|
html += '<div class="formDialogHeader">';
|
||||||
html += '<button is="paper-icon-button-light" class="btnCancel hide-mouse-idle-tv" tabindex="-1"><span class="material-icons arrow_back"></span></button>';
|
html += '<button is="paper-icon-button-light" class="btnCancel hide-mouse-idle-tv" tabindex="-1"><span class="material-icons arrow_back"></span></button>';
|
||||||
|
@ -80,7 +83,7 @@ define(['require', 'dom', 'focusManager', 'dialogHelper', 'loading', 'layoutMana
|
||||||
centerFocus(dlg.querySelector('.formDialogContent'), false, true);
|
centerFocus(dlg.querySelector('.formDialogContent'), false, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
var submitted;
|
let submitted;
|
||||||
|
|
||||||
dlg.querySelector('form').addEventListener('change', function () {
|
dlg.querySelector('form').addEventListener('change', function () {
|
||||||
submitted = true;
|
submitted = true;
|
||||||
|
@ -92,7 +95,7 @@ define(['require', 'dom', 'focusManager', 'dialogHelper', 'loading', 'layoutMana
|
||||||
}
|
}
|
||||||
|
|
||||||
if (submitted) {
|
if (submitted) {
|
||||||
saveValues(dlg, options.settings, options.settingsKey);
|
saveValues(dlg, options.settingsKey);
|
||||||
resolve();
|
resolve();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -101,7 +104,7 @@ define(['require', 'dom', 'focusManager', 'dialogHelper', 'loading', 'layoutMana
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
};
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return SortMenu;
|
export default SortMenu;
|
||||||
});
|
|
||||||
|
|
|
@ -1,16 +1,27 @@
|
||||||
define(['dialogHelper', 'require', 'layoutManager', 'globalize', 'userSettings', 'connectionManager', 'loading', 'focusManager', 'dom', 'apphost', 'emby-select', 'listViewStyle', 'paper-icon-button-light', 'css!./../formdialog', 'material-icons', 'css!./subtitleeditor', 'emby-button', 'flexStyles'], function (dialogHelper, require, layoutManager, globalize, userSettings, connectionManager, loading, focusManager, dom, appHost) {
|
import dialogHelper from 'dialogHelper';
|
||||||
'use strict';
|
import layoutManager from 'layoutManager';
|
||||||
|
import globalize from 'globalize';
|
||||||
|
import * as userSettings from 'userSettings';
|
||||||
|
import connectionManager from 'connectionManager';
|
||||||
|
import loading from 'loading';
|
||||||
|
import focusManager from 'focusManager';
|
||||||
|
import dom from 'dom';
|
||||||
|
import 'emby-select';
|
||||||
|
import 'listViewStyle';
|
||||||
|
import 'paper-icon-button-light';
|
||||||
|
import 'css!./../formdialog';
|
||||||
|
import 'material-icons';
|
||||||
|
import 'css!./subtitleeditor';
|
||||||
|
import 'emby-button';
|
||||||
|
import 'flexStyles';
|
||||||
|
|
||||||
loading = loading.default || loading;
|
let currentItem;
|
||||||
focusManager = focusManager.default || focusManager;
|
let hasChanges;
|
||||||
|
|
||||||
var currentItem;
|
|
||||||
var hasChanges;
|
|
||||||
|
|
||||||
function downloadRemoteSubtitles(context, id) {
|
function downloadRemoteSubtitles(context, id) {
|
||||||
var url = 'Items/' + currentItem.Id + '/RemoteSearch/Subtitles/' + id;
|
let url = 'Items/' + currentItem.Id + '/RemoteSearch/Subtitles/' + id;
|
||||||
|
|
||||||
var apiClient = connectionManager.getApiClient(currentItem.ServerId);
|
let apiClient = connectionManager.getApiClient(currentItem.ServerId);
|
||||||
apiClient.ajax({
|
apiClient.ajax({
|
||||||
|
|
||||||
type: 'POST',
|
type: 'POST',
|
||||||
|
@ -19,7 +30,7 @@ define(['dialogHelper', 'require', 'layoutManager', 'globalize', 'userSettings',
|
||||||
}).then(function () {
|
}).then(function () {
|
||||||
hasChanges = true;
|
hasChanges = true;
|
||||||
|
|
||||||
require(['toast'], function (toast) {
|
import('toast').then(({default: toast}) => {
|
||||||
toast(globalize.translate('MessageDownloadQueued'));
|
toast(globalize.translate('MessageDownloadQueued'));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -28,10 +39,10 @@ define(['dialogHelper', 'require', 'layoutManager', 'globalize', 'userSettings',
|
||||||
}
|
}
|
||||||
|
|
||||||
function deleteLocalSubtitle(context, index) {
|
function deleteLocalSubtitle(context, index) {
|
||||||
var msg = globalize.translate('MessageAreYouSureDeleteSubtitles');
|
let msg = globalize.translate('MessageAreYouSureDeleteSubtitles');
|
||||||
|
|
||||||
require(['confirm'], function (confirm) {
|
import('confirm').then(({default: confirm}) => {
|
||||||
confirm.default({
|
confirm({
|
||||||
|
|
||||||
title: globalize.translate('ConfirmDeletion'),
|
title: globalize.translate('ConfirmDeletion'),
|
||||||
text: msg,
|
text: msg,
|
||||||
|
@ -41,10 +52,10 @@ define(['dialogHelper', 'require', 'layoutManager', 'globalize', 'userSettings',
|
||||||
}).then(function () {
|
}).then(function () {
|
||||||
loading.show();
|
loading.show();
|
||||||
|
|
||||||
var itemId = currentItem.Id;
|
let itemId = currentItem.Id;
|
||||||
var url = 'Videos/' + itemId + '/Subtitles/' + index;
|
let url = 'Videos/' + itemId + '/Subtitles/' + index;
|
||||||
|
|
||||||
var apiClient = connectionManager.getApiClient(currentItem.ServerId);
|
let apiClient = connectionManager.getApiClient(currentItem.ServerId);
|
||||||
|
|
||||||
apiClient.ajax({
|
apiClient.ajax({
|
||||||
|
|
||||||
|
@ -60,13 +71,13 @@ define(['dialogHelper', 'require', 'layoutManager', 'globalize', 'userSettings',
|
||||||
}
|
}
|
||||||
|
|
||||||
function fillSubtitleList(context, item) {
|
function fillSubtitleList(context, item) {
|
||||||
var streams = item.MediaStreams || [];
|
let streams = item.MediaStreams || [];
|
||||||
|
|
||||||
var subs = streams.filter(function (s) {
|
let subs = streams.filter(function (s) {
|
||||||
return s.Type === 'Subtitle';
|
return s.Type === 'Subtitle';
|
||||||
});
|
});
|
||||||
|
|
||||||
var html = '';
|
let html = '';
|
||||||
|
|
||||||
if (subs.length) {
|
if (subs.length) {
|
||||||
html += '<h2>' + globalize.translate('MySubtitles') + '</h2>';
|
html += '<h2>' + globalize.translate('MySubtitles') + '</h2>';
|
||||||
|
@ -74,10 +85,10 @@ define(['dialogHelper', 'require', 'layoutManager', 'globalize', 'userSettings',
|
||||||
html += '<div>';
|
html += '<div>';
|
||||||
|
|
||||||
html += subs.map(function (s) {
|
html += subs.map(function (s) {
|
||||||
var itemHtml = '';
|
let itemHtml = '';
|
||||||
|
|
||||||
var tagName = layoutManager.tv ? 'button' : 'div';
|
let tagName = layoutManager.tv ? 'button' : 'div';
|
||||||
var className = layoutManager.tv && s.Path ? 'listItem listItem-border btnDelete' : 'listItem listItem-border';
|
let className = layoutManager.tv && s.Path ? 'listItem listItem-border btnDelete' : 'listItem listItem-border';
|
||||||
|
|
||||||
if (layoutManager.tv) {
|
if (layoutManager.tv) {
|
||||||
className += ' listItem-focusscale listItem-button';
|
className += ' listItem-focusscale listItem-button';
|
||||||
|
@ -116,7 +127,7 @@ define(['dialogHelper', 'require', 'layoutManager', 'globalize', 'userSettings',
|
||||||
html += '</div>';
|
html += '</div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
var elem = context.querySelector('.subtitleList');
|
let elem = context.querySelector('.subtitleList');
|
||||||
|
|
||||||
if (subs.length) {
|
if (subs.length) {
|
||||||
elem.classList.remove('hide');
|
elem.classList.remove('hide');
|
||||||
|
@ -127,18 +138,18 @@ define(['dialogHelper', 'require', 'layoutManager', 'globalize', 'userSettings',
|
||||||
}
|
}
|
||||||
|
|
||||||
function fillLanguages(context, apiClient, languages) {
|
function fillLanguages(context, apiClient, languages) {
|
||||||
var selectLanguage = context.querySelector('#selectLanguage');
|
let selectLanguage = context.querySelector('#selectLanguage');
|
||||||
|
|
||||||
selectLanguage.innerHTML = languages.map(function (l) {
|
selectLanguage.innerHTML = languages.map(function (l) {
|
||||||
return '<option value="' + l.ThreeLetterISOLanguageName + '">' + l.DisplayName + '</option>';
|
return '<option value="' + l.ThreeLetterISOLanguageName + '">' + l.DisplayName + '</option>';
|
||||||
});
|
});
|
||||||
|
|
||||||
var lastLanguage = userSettings.get('subtitleeditor-language');
|
let lastLanguage = userSettings.get('subtitleeditor-language');
|
||||||
if (lastLanguage) {
|
if (lastLanguage) {
|
||||||
selectLanguage.value = lastLanguage;
|
selectLanguage.value = lastLanguage;
|
||||||
} else {
|
} else {
|
||||||
apiClient.getCurrentUser().then(function (user) {
|
apiClient.getCurrentUser().then(function (user) {
|
||||||
var lang = user.Configuration.SubtitleLanguagePreference;
|
let lang = user.Configuration.SubtitleLanguagePreference;
|
||||||
|
|
||||||
if (lang) {
|
if (lang) {
|
||||||
selectLanguage.value = lang;
|
selectLanguage.value = lang;
|
||||||
|
@ -148,8 +159,8 @@ define(['dialogHelper', 'require', 'layoutManager', 'globalize', 'userSettings',
|
||||||
}
|
}
|
||||||
|
|
||||||
function renderSearchResults(context, results) {
|
function renderSearchResults(context, results) {
|
||||||
var lastProvider = '';
|
let lastProvider = '';
|
||||||
var html = '';
|
let html = '';
|
||||||
|
|
||||||
if (!results.length) {
|
if (!results.length) {
|
||||||
context.querySelector('.noSearchResults').classList.remove('hide');
|
context.querySelector('.noSearchResults').classList.remove('hide');
|
||||||
|
@ -160,10 +171,10 @@ define(['dialogHelper', 'require', 'layoutManager', 'globalize', 'userSettings',
|
||||||
|
|
||||||
context.querySelector('.noSearchResults').classList.add('hide');
|
context.querySelector('.noSearchResults').classList.add('hide');
|
||||||
|
|
||||||
for (var i = 0, length = results.length; i < length; i++) {
|
for (let i = 0, length = results.length; i < length; i++) {
|
||||||
var result = results[i];
|
let result = results[i];
|
||||||
|
|
||||||
var provider = result.ProviderName;
|
let provider = result.ProviderName;
|
||||||
|
|
||||||
if (provider !== lastProvider) {
|
if (provider !== lastProvider) {
|
||||||
if (i > 0) {
|
if (i > 0) {
|
||||||
|
@ -174,8 +185,8 @@ define(['dialogHelper', 'require', 'layoutManager', 'globalize', 'userSettings',
|
||||||
lastProvider = provider;
|
lastProvider = provider;
|
||||||
}
|
}
|
||||||
|
|
||||||
var tagName = layoutManager.tv ? 'button' : 'div';
|
let tagName = layoutManager.tv ? 'button' : 'div';
|
||||||
var className = layoutManager.tv ? 'listItem listItem-border btnOptions' : 'listItem listItem-border';
|
let className = layoutManager.tv ? 'listItem listItem-border btnOptions' : 'listItem listItem-border';
|
||||||
if (layoutManager.tv) {
|
if (layoutManager.tv) {
|
||||||
className += ' listItem-focusscale listItem-button';
|
className += ' listItem-focusscale listItem-button';
|
||||||
}
|
}
|
||||||
|
@ -184,7 +195,7 @@ define(['dialogHelper', 'require', 'layoutManager', 'globalize', 'userSettings',
|
||||||
|
|
||||||
html += '<span class="listItemIcon material-icons closed_caption"></span>';
|
html += '<span class="listItemIcon material-icons closed_caption"></span>';
|
||||||
|
|
||||||
var bodyClass = result.Comment || result.IsHashMatch ? 'three-line' : 'two-line';
|
let bodyClass = result.Comment || result.IsHashMatch ? 'three-line' : 'two-line';
|
||||||
|
|
||||||
html += '<div class="listItemBody ' + bodyClass + '">';
|
html += '<div class="listItemBody ' + bodyClass + '">';
|
||||||
|
|
||||||
|
@ -221,7 +232,7 @@ define(['dialogHelper', 'require', 'layoutManager', 'globalize', 'userSettings',
|
||||||
html += '</div>';
|
html += '</div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
var elem = context.querySelector('.subtitleResults');
|
let elem = context.querySelector('.subtitleResults');
|
||||||
elem.innerHTML = html;
|
elem.innerHTML = html;
|
||||||
|
|
||||||
loading.hide();
|
loading.hide();
|
||||||
|
@ -232,8 +243,8 @@ define(['dialogHelper', 'require', 'layoutManager', 'globalize', 'userSettings',
|
||||||
|
|
||||||
loading.show();
|
loading.show();
|
||||||
|
|
||||||
var apiClient = connectionManager.getApiClient(currentItem.ServerId);
|
let apiClient = connectionManager.getApiClient(currentItem.ServerId);
|
||||||
var url = apiClient.getUrl('Items/' + currentItem.Id + '/RemoteSearch/Subtitles/' + language);
|
let url = apiClient.getUrl('Items/' + currentItem.Id + '/RemoteSearch/Subtitles/' + language);
|
||||||
|
|
||||||
apiClient.getJSON(url).then(function (results) {
|
apiClient.getJSON(url).then(function (results) {
|
||||||
renderSearchResults(context, results);
|
renderSearchResults(context, results);
|
||||||
|
@ -247,8 +258,8 @@ define(['dialogHelper', 'require', 'layoutManager', 'globalize', 'userSettings',
|
||||||
currentItem = item;
|
currentItem = item;
|
||||||
|
|
||||||
fillSubtitleList(context, item);
|
fillSubtitleList(context, item);
|
||||||
var file = item.Path || '';
|
let file = item.Path || '';
|
||||||
var index = Math.max(file.lastIndexOf('/'), file.lastIndexOf('\\'));
|
let index = Math.max(file.lastIndexOf('/'), file.lastIndexOf('\\'));
|
||||||
if (index > -1) {
|
if (index > -1) {
|
||||||
file = file.substring(index + 1);
|
file = file.substring(index + 1);
|
||||||
}
|
}
|
||||||
|
@ -272,9 +283,9 @@ define(['dialogHelper', 'require', 'layoutManager', 'globalize', 'userSettings',
|
||||||
}
|
}
|
||||||
|
|
||||||
function onSearchSubmit(e) {
|
function onSearchSubmit(e) {
|
||||||
var form = this;
|
let form = this;
|
||||||
|
|
||||||
var lang = form.querySelector('#selectLanguage', form).value;
|
let lang = form.querySelector('#selectLanguage', form).value;
|
||||||
|
|
||||||
searchForSubtitles(dom.parentWithClass(form, 'formDialogContent'), lang);
|
searchForSubtitles(dom.parentWithClass(form, 'formDialogContent'), lang);
|
||||||
|
|
||||||
|
@ -283,26 +294,26 @@ define(['dialogHelper', 'require', 'layoutManager', 'globalize', 'userSettings',
|
||||||
}
|
}
|
||||||
|
|
||||||
function onSubtitleListClick(e) {
|
function onSubtitleListClick(e) {
|
||||||
var btnDelete = dom.parentWithClass(e.target, 'btnDelete');
|
let btnDelete = dom.parentWithClass(e.target, 'btnDelete');
|
||||||
if (btnDelete) {
|
if (btnDelete) {
|
||||||
var index = btnDelete.getAttribute('data-index');
|
let index = btnDelete.getAttribute('data-index');
|
||||||
var context = dom.parentWithClass(btnDelete, 'subtitleEditorDialog');
|
let context = dom.parentWithClass(btnDelete, 'subtitleEditorDialog');
|
||||||
deleteLocalSubtitle(context, index);
|
deleteLocalSubtitle(context, index);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function onSubtitleResultsClick(e) {
|
function onSubtitleResultsClick(e) {
|
||||||
var subtitleId;
|
let subtitleId;
|
||||||
var context;
|
let context;
|
||||||
|
|
||||||
var btnOptions = dom.parentWithClass(e.target, 'btnOptions');
|
let btnOptions = dom.parentWithClass(e.target, 'btnOptions');
|
||||||
if (btnOptions) {
|
if (btnOptions) {
|
||||||
subtitleId = btnOptions.getAttribute('data-subid');
|
subtitleId = btnOptions.getAttribute('data-subid');
|
||||||
context = dom.parentWithClass(btnOptions, 'subtitleEditorDialog');
|
context = dom.parentWithClass(btnOptions, 'subtitleEditorDialog');
|
||||||
showDownloadOptions(btnOptions, context, subtitleId);
|
showDownloadOptions(btnOptions, context, subtitleId);
|
||||||
}
|
}
|
||||||
|
|
||||||
var btnDownload = dom.parentWithClass(e.target, 'btnDownload');
|
let btnDownload = dom.parentWithClass(e.target, 'btnDownload');
|
||||||
if (btnDownload) {
|
if (btnDownload) {
|
||||||
subtitleId = btnDownload.getAttribute('data-subid');
|
subtitleId = btnDownload.getAttribute('data-subid');
|
||||||
context = dom.parentWithClass(btnDownload, 'subtitleEditorDialog');
|
context = dom.parentWithClass(btnDownload, 'subtitleEditorDialog');
|
||||||
|
@ -311,14 +322,14 @@ define(['dialogHelper', 'require', 'layoutManager', 'globalize', 'userSettings',
|
||||||
}
|
}
|
||||||
|
|
||||||
function showDownloadOptions(button, context, subtitleId) {
|
function showDownloadOptions(button, context, subtitleId) {
|
||||||
var items = [];
|
let items = [];
|
||||||
|
|
||||||
items.push({
|
items.push({
|
||||||
name: globalize.translate('Download'),
|
name: globalize.translate('Download'),
|
||||||
id: 'download'
|
id: 'download'
|
||||||
});
|
});
|
||||||
|
|
||||||
require(['actionsheet'], function (actionsheet) {
|
import('actionsheet').then(({default: actionsheet}) => {
|
||||||
actionsheet.show({
|
actionsheet.show({
|
||||||
items: items,
|
items: items,
|
||||||
positionTo: button
|
positionTo: button
|
||||||
|
@ -336,8 +347,8 @@ define(['dialogHelper', 'require', 'layoutManager', 'globalize', 'userSettings',
|
||||||
}
|
}
|
||||||
|
|
||||||
function centerFocus(elem, horiz, on) {
|
function centerFocus(elem, horiz, on) {
|
||||||
require(['scrollHelper'], function (scrollHelper) {
|
import('scrollHelper').then(({default: scrollHelper}) => {
|
||||||
var fn = on ? 'on' : 'off';
|
let fn = on ? 'on' : 'off';
|
||||||
scrollHelper.centerFocus[fn](elem, horiz);
|
scrollHelper.centerFocus[fn](elem, horiz);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -345,9 +356,9 @@ define(['dialogHelper', 'require', 'layoutManager', 'globalize', 'userSettings',
|
||||||
function showEditorInternal(itemId, serverId, template) {
|
function showEditorInternal(itemId, serverId, template) {
|
||||||
hasChanges = false;
|
hasChanges = false;
|
||||||
|
|
||||||
var apiClient = connectionManager.getApiClient(serverId);
|
let apiClient = connectionManager.getApiClient(serverId);
|
||||||
return apiClient.getItem(apiClient.getCurrentUserId(), itemId).then(function (item) {
|
return apiClient.getItem(apiClient.getCurrentUserId(), itemId).then(function (item) {
|
||||||
var dialogOptions = {
|
let dialogOptions = {
|
||||||
removeOnClose: true,
|
removeOnClose: true,
|
||||||
scrollY: false
|
scrollY: false
|
||||||
};
|
};
|
||||||
|
@ -358,7 +369,7 @@ define(['dialogHelper', 'require', 'layoutManager', 'globalize', 'userSettings',
|
||||||
dialogOptions.size = 'small';
|
dialogOptions.size = 'small';
|
||||||
}
|
}
|
||||||
|
|
||||||
var dlg = dialogHelper.createDialog(dialogOptions);
|
let dlg = dialogHelper.createDialog(dialogOptions);
|
||||||
|
|
||||||
dlg.classList.add('formDialog');
|
dlg.classList.add('formDialog');
|
||||||
dlg.classList.add('subtitleEditorDialog');
|
dlg.classList.add('subtitleEditorDialog');
|
||||||
|
@ -369,7 +380,7 @@ define(['dialogHelper', 'require', 'layoutManager', 'globalize', 'userSettings',
|
||||||
|
|
||||||
dlg.querySelector('.subtitleSearchForm').addEventListener('submit', onSearchSubmit);
|
dlg.querySelector('.subtitleSearchForm').addEventListener('submit', onSearchSubmit);
|
||||||
|
|
||||||
var btnSubmit = dlg.querySelector('.btnSubmit');
|
let btnSubmit = dlg.querySelector('.btnSubmit');
|
||||||
|
|
||||||
if (layoutManager.tv) {
|
if (layoutManager.tv) {
|
||||||
centerFocus(dlg.querySelector('.formDialogContent'), false, true);
|
centerFocus(dlg.querySelector('.formDialogContent'), false, true);
|
||||||
|
@ -378,7 +389,7 @@ define(['dialogHelper', 'require', 'layoutManager', 'globalize', 'userSettings',
|
||||||
btnSubmit.classList.add('hide');
|
btnSubmit.classList.add('hide');
|
||||||
}
|
}
|
||||||
|
|
||||||
var editorContent = dlg.querySelector('.formDialogContent');
|
let editorContent = dlg.querySelector('.formDialogContent');
|
||||||
|
|
||||||
dlg.querySelector('.subtitleList').addEventListener('click', onSubtitleListClick);
|
dlg.querySelector('.subtitleList').addEventListener('click', onSubtitleListClick);
|
||||||
dlg.querySelector('.subtitleResults').addEventListener('click', onSubtitleResultsClick);
|
dlg.querySelector('.subtitleResults').addEventListener('click', onSubtitleResultsClick);
|
||||||
|
@ -415,13 +426,12 @@ define(['dialogHelper', 'require', 'layoutManager', 'globalize', 'userSettings',
|
||||||
loading.show();
|
loading.show();
|
||||||
|
|
||||||
return new Promise(function (resolve, reject) {
|
return new Promise(function (resolve, reject) {
|
||||||
require(['text!./subtitleeditor.template.html'], function (template) {
|
import('text!./subtitleeditor.template.html').then(({default: template}) => {
|
||||||
showEditorInternal(itemId, serverId, template).then(resolve, reject);
|
showEditorInternal(itemId, serverId, template).then(resolve, reject);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
export default {
|
||||||
show: showEditor
|
show: showEditor
|
||||||
};
|
};
|
||||||
});
|
|
||||||
|
|
|
@ -3,31 +3,9 @@
|
||||||
* @module components/subtitleSettings/subtitleAppearanceHelper
|
* @module components/subtitleSettings/subtitleAppearanceHelper
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function getTextStyles(settings, isCue) {
|
function getTextStyles(settings, preview) {
|
||||||
let list = [];
|
let list = [];
|
||||||
|
|
||||||
if (isCue) {
|
|
||||||
switch (settings.textSize || '') {
|
|
||||||
case 'smaller':
|
|
||||||
list.push({ name: 'font-size', value: '.5em' });
|
|
||||||
break;
|
|
||||||
case 'small':
|
|
||||||
list.push({ name: 'font-size', value: '.7em' });
|
|
||||||
break;
|
|
||||||
case 'large':
|
|
||||||
list.push({ name: 'font-size', value: '1.3em' });
|
|
||||||
break;
|
|
||||||
case 'larger':
|
|
||||||
list.push({ name: 'font-size', value: '1.72em' });
|
|
||||||
break;
|
|
||||||
case 'extralarge':
|
|
||||||
list.push({ name: 'font-size', value: '2em' });
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
case 'medium':
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
switch (settings.textSize || '') {
|
switch (settings.textSize || '') {
|
||||||
case 'smaller':
|
case 'smaller':
|
||||||
list.push({ name: 'font-size', value: '.8em' });
|
list.push({ name: 'font-size', value: '.8em' });
|
||||||
|
@ -49,7 +27,6 @@ function getTextStyles(settings, isCue) {
|
||||||
list.push({ name: 'font-size', value: '1.36em' });
|
list.push({ name: 'font-size', value: '1.36em' });
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
switch (settings.dropShadow || '') {
|
switch (settings.dropShadow || '') {
|
||||||
case 'raised':
|
case 'raised':
|
||||||
|
@ -111,13 +88,43 @@ function getTextStyles(settings, isCue) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!preview) {
|
||||||
|
const pos = parseInt(settings.verticalPosition, 10);
|
||||||
|
const lineHeight = 1.35; // FIXME: It is better to read this value from element
|
||||||
|
const line = Math.abs(pos * lineHeight);
|
||||||
|
if (pos < 0) {
|
||||||
|
list.push({ name: 'min-height', value: `${line}em` });
|
||||||
|
list.push({ name: 'margin-top', value: '' });
|
||||||
|
} else {
|
||||||
|
list.push({ name: 'min-height', value: '' });
|
||||||
|
list.push({ name: 'margin-top', value: `${line}em` });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getStyles(settings, isCue) {
|
function getWindowStyles(settings, preview) {
|
||||||
|
const list = [];
|
||||||
|
|
||||||
|
if (!preview) {
|
||||||
|
const pos = parseInt(settings.verticalPosition, 10);
|
||||||
|
if (pos < 0) {
|
||||||
|
list.push({ name: 'top', value: '' });
|
||||||
|
list.push({ name: 'bottom', value: '0' });
|
||||||
|
} else {
|
||||||
|
list.push({ name: 'top', value: '0' });
|
||||||
|
list.push({ name: 'bottom', value: '' });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getStyles(settings, preview) {
|
||||||
return {
|
return {
|
||||||
text: getTextStyles(settings, isCue),
|
text: getTextStyles(settings, preview),
|
||||||
window: []
|
window: getWindowStyles(settings, preview)
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -130,7 +137,7 @@ function applyStyleList(styles, elem) {
|
||||||
}
|
}
|
||||||
|
|
||||||
export function applyStyles(elements, appearanceSettings) {
|
export function applyStyles(elements, appearanceSettings) {
|
||||||
let styles = getStyles(appearanceSettings);
|
let styles = getStyles(appearanceSettings, !!elements.preview);
|
||||||
|
|
||||||
if (elements.text) {
|
if (elements.text) {
|
||||||
applyStyleList(styles.text, elements.text);
|
applyStyleList(styles.text, elements.text);
|
||||||
|
|
26
src/components/subtitlesettings/subtitlesettings.css
Normal file
26
src/components/subtitlesettings/subtitlesettings.css
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
.subtitleappearance-fullpreview {
|
||||||
|
position: fixed;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
z-index: 1000;
|
||||||
|
pointer-events: none;
|
||||||
|
transition: 0.2s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.subtitleappearance-fullpreview-hide {
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.subtitleappearance-fullpreview-window {
|
||||||
|
position: absolute;
|
||||||
|
width: 100%;
|
||||||
|
font-size: 170%;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.subtitleappearance-fullpreview-text {
|
||||||
|
display: inline-block;
|
||||||
|
max-width: 70%;
|
||||||
|
}
|
|
@ -2,6 +2,7 @@ import globalize from 'globalize';
|
||||||
import appHost from 'apphost';
|
import appHost from 'apphost';
|
||||||
import appSettings from 'appSettings';
|
import appSettings from 'appSettings';
|
||||||
import focusManager from 'focusManager';
|
import focusManager from 'focusManager';
|
||||||
|
import layoutManager from 'layoutManager';
|
||||||
import loading from 'loading';
|
import loading from 'loading';
|
||||||
import connectionManager from 'connectionManager';
|
import connectionManager from 'connectionManager';
|
||||||
import subtitleAppearanceHelper from 'subtitleAppearanceHelper';
|
import subtitleAppearanceHelper from 'subtitleAppearanceHelper';
|
||||||
|
@ -10,9 +11,11 @@ import dom from 'dom';
|
||||||
import events from 'events';
|
import events from 'events';
|
||||||
import 'listViewStyle';
|
import 'listViewStyle';
|
||||||
import 'emby-select';
|
import 'emby-select';
|
||||||
|
import 'emby-slider';
|
||||||
import 'emby-input';
|
import 'emby-input';
|
||||||
import 'emby-checkbox';
|
import 'emby-checkbox';
|
||||||
import 'flexStyles';
|
import 'flexStyles';
|
||||||
|
import 'css!./subtitlesettings';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Subtitle settings.
|
* Subtitle settings.
|
||||||
|
@ -27,6 +30,7 @@ function getSubtitleAppearanceObject(context) {
|
||||||
appearanceSettings.font = context.querySelector('#selectFont').value;
|
appearanceSettings.font = context.querySelector('#selectFont').value;
|
||||||
appearanceSettings.textBackground = context.querySelector('#inputTextBackground').value;
|
appearanceSettings.textBackground = context.querySelector('#inputTextBackground').value;
|
||||||
appearanceSettings.textColor = context.querySelector('#inputTextColor').value;
|
appearanceSettings.textColor = context.querySelector('#inputTextColor').value;
|
||||||
|
appearanceSettings.verticalPosition = context.querySelector('#sliderVerticalPosition').value;
|
||||||
|
|
||||||
return appearanceSettings;
|
return appearanceSettings;
|
||||||
}
|
}
|
||||||
|
@ -51,6 +55,7 @@ function loadForm(context, user, userSettings, appearanceSettings, apiClient) {
|
||||||
context.querySelector('#inputTextBackground').value = appearanceSettings.textBackground || 'transparent';
|
context.querySelector('#inputTextBackground').value = appearanceSettings.textBackground || 'transparent';
|
||||||
context.querySelector('#inputTextColor').value = appearanceSettings.textColor || '#ffffff';
|
context.querySelector('#inputTextColor').value = appearanceSettings.textColor || '#ffffff';
|
||||||
context.querySelector('#selectFont').value = appearanceSettings.font || '';
|
context.querySelector('#selectFont').value = appearanceSettings.font || '';
|
||||||
|
context.querySelector('#sliderVerticalPosition').value = appearanceSettings.verticalPosition;
|
||||||
|
|
||||||
context.querySelector('#selectSubtitleBurnIn').value = appSettings.get('subtitleburnin') || '';
|
context.querySelector('#selectSubtitleBurnIn').value = appSettings.get('subtitleburnin') || '';
|
||||||
|
|
||||||
|
@ -112,10 +117,45 @@ function onAppearanceFieldChange(e) {
|
||||||
|
|
||||||
let elements = {
|
let elements = {
|
||||||
window: view.querySelector('.subtitleappearance-preview-window'),
|
window: view.querySelector('.subtitleappearance-preview-window'),
|
||||||
text: view.querySelector('.subtitleappearance-preview-text')
|
text: view.querySelector('.subtitleappearance-preview-text'),
|
||||||
|
preview: true
|
||||||
};
|
};
|
||||||
|
|
||||||
subtitleAppearanceHelper.applyStyles(elements, appearanceSettings);
|
subtitleAppearanceHelper.applyStyles(elements, appearanceSettings);
|
||||||
|
|
||||||
|
subtitleAppearanceHelper.applyStyles({
|
||||||
|
window: view.querySelector('.subtitleappearance-fullpreview-window'),
|
||||||
|
text: view.querySelector('.subtitleappearance-fullpreview-text')
|
||||||
|
}, appearanceSettings);
|
||||||
|
}
|
||||||
|
|
||||||
|
const subtitlePreviewDelay = 1000;
|
||||||
|
let subtitlePreviewTimer;
|
||||||
|
|
||||||
|
function showSubtitlePreview(persistent) {
|
||||||
|
clearTimeout(subtitlePreviewTimer);
|
||||||
|
|
||||||
|
this._fullPreview.classList.remove('subtitleappearance-fullpreview-hide');
|
||||||
|
|
||||||
|
if (persistent) {
|
||||||
|
this._refFullPreview++;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this._refFullPreview === 0) {
|
||||||
|
subtitlePreviewTimer = setTimeout(hideSubtitlePreview.bind(this), subtitlePreviewDelay);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function hideSubtitlePreview(persistent) {
|
||||||
|
clearTimeout(subtitlePreviewTimer);
|
||||||
|
|
||||||
|
if (persistent) {
|
||||||
|
this._refFullPreview--;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this._refFullPreview === 0) {
|
||||||
|
this._fullPreview.classList.add('subtitleappearance-fullpreview-hide');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function embed(options, self) {
|
function embed(options, self) {
|
||||||
|
@ -138,6 +178,36 @@ function embed(options, self) {
|
||||||
|
|
||||||
if (appHost.supports('subtitleappearancesettings')) {
|
if (appHost.supports('subtitleappearancesettings')) {
|
||||||
options.element.querySelector('.subtitleAppearanceSection').classList.remove('hide');
|
options.element.querySelector('.subtitleAppearanceSection').classList.remove('hide');
|
||||||
|
|
||||||
|
self._fullPreview = options.element.querySelector('.subtitleappearance-fullpreview');
|
||||||
|
self._refFullPreview = 0;
|
||||||
|
|
||||||
|
const sliderVerticalPosition = options.element.querySelector('#sliderVerticalPosition');
|
||||||
|
sliderVerticalPosition.addEventListener('input', onAppearanceFieldChange);
|
||||||
|
sliderVerticalPosition.addEventListener('input', () => showSubtitlePreview.call(self));
|
||||||
|
|
||||||
|
const eventPrefix = window.PointerEvent ? 'pointer' : 'mouse';
|
||||||
|
sliderVerticalPosition.addEventListener(`${eventPrefix}enter`, () => showSubtitlePreview.call(self, true));
|
||||||
|
sliderVerticalPosition.addEventListener(`${eventPrefix}leave`, () => hideSubtitlePreview.call(self, true));
|
||||||
|
|
||||||
|
if (layoutManager.tv) {
|
||||||
|
sliderVerticalPosition.addEventListener('focus', () => showSubtitlePreview.call(self, true));
|
||||||
|
sliderVerticalPosition.addEventListener('blur', () => hideSubtitlePreview.call(self, true));
|
||||||
|
|
||||||
|
// Give CustomElements time to attach
|
||||||
|
setTimeout(() => {
|
||||||
|
sliderVerticalPosition.classList.add('focusable');
|
||||||
|
sliderVerticalPosition.enableKeyboardDragging();
|
||||||
|
}, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
options.element.querySelector('.chkPreview').addEventListener('change', (e) => {
|
||||||
|
if (e.target.checked) {
|
||||||
|
showSubtitlePreview.call(self, true);
|
||||||
|
} else {
|
||||||
|
hideSubtitlePreview.call(self, true);
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
self.loadData();
|
self.loadData();
|
||||||
|
|
|
@ -38,6 +38,16 @@
|
||||||
${HeaderSubtitleAppearance}
|
${HeaderSubtitleAppearance}
|
||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
|
<div class="subtitleappearance-fullpreview subtitleappearance-fullpreview-hide">
|
||||||
|
<div class="subtitleappearance-fullpreview-window">
|
||||||
|
<div class="subtitleappearance-fullpreview-text">
|
||||||
|
${HeaderSubtitleAppearance}
|
||||||
|
<br>
|
||||||
|
${TheseSettingsAffectSubtitlesOnThisDevice}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div style="margin: 2em 0 2em;">
|
<div style="margin: 2em 0 2em;">
|
||||||
<div class="subtitleappearance-preview flex align-items-center justify-content-center" style="margin:2em 0;padding:1.6em;color:black;background:linear-gradient(140deg,#aa5cc3,#00a4dc);">
|
<div class="subtitleappearance-preview flex align-items-center justify-content-center" style="margin:2em 0;padding:1.6em;color:black;background:linear-gradient(140deg,#aa5cc3,#00a4dc);">
|
||||||
<div class="subtitleappearance-preview-window flex align-items-center justify-content-center" style="width: 90%; padding: .25em;">
|
<div class="subtitleappearance-preview-window flex align-items-center justify-content-center" style="width: 90%; padding: .25em;">
|
||||||
|
@ -89,6 +99,20 @@
|
||||||
<option value="">${DropShadow}</option>
|
<option value="">${DropShadow}</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="sliderContainer-settings">
|
||||||
|
<div class="sliderContainer">
|
||||||
|
<input is="emby-slider" id="sliderVerticalPosition" label="${LabelSubtitleVerticalPosition}" type="range" min="-16" max="16" />
|
||||||
|
</div>
|
||||||
|
<div class="fieldDescription">${SubtitleVerticalPositionHelp}</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="checkboxContainer">
|
||||||
|
<label>
|
||||||
|
<input is="emby-checkbox" type="checkbox" class="chkPreview" />
|
||||||
|
<span>${Preview}</span>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<button is="emby-button" type="submit" class="raised button-submit block btnSave hide">
|
<button is="emby-button" type="submit" class="raised button-submit block btnSave hide">
|
||||||
|
|
|
@ -1,16 +1,16 @@
|
||||||
define(['playbackManager', 'layoutManager', 'text!./subtitlesync.template.html', 'css!./subtitlesync'], function (playbackManager, layoutManager, template, css) {
|
import playbackManager from 'playbackManager';
|
||||||
'use strict';
|
import layoutManager from 'layoutManager';
|
||||||
|
import template from 'text!./subtitlesync.template.html';
|
||||||
|
import 'css!./subtitlesync';
|
||||||
|
|
||||||
playbackManager = playbackManager.default || playbackManager;
|
let player;
|
||||||
|
let subtitleSyncSlider;
|
||||||
var player;
|
let subtitleSyncTextField;
|
||||||
var subtitleSyncSlider;
|
let subtitleSyncCloseButton;
|
||||||
var subtitleSyncTextField;
|
let subtitleSyncContainer;
|
||||||
var subtitleSyncCloseButton;
|
|
||||||
var subtitleSyncContainer;
|
|
||||||
|
|
||||||
function init(instance) {
|
function init(instance) {
|
||||||
var parent = document.createElement('div');
|
const parent = document.createElement('div');
|
||||||
document.body.appendChild(parent);
|
document.body.appendChild(parent);
|
||||||
parent.innerHTML = template;
|
parent.innerHTML = template;
|
||||||
|
|
||||||
|
@ -41,7 +41,7 @@ define(['playbackManager', 'layoutManager', 'text!./subtitlesync.template.html',
|
||||||
subtitleSyncTextField.addEventListener('keydown', function (event) {
|
subtitleSyncTextField.addEventListener('keydown', function (event) {
|
||||||
if (event.key === 'Enter') {
|
if (event.key === 'Enter') {
|
||||||
// if input key is enter search for float pattern
|
// if input key is enter search for float pattern
|
||||||
var inputOffset = /[-+]?\d+\.?\d*/g.exec(this.textContent);
|
let inputOffset = /[-+]?\d+\.?\d*/g.exec(this.textContent);
|
||||||
if (inputOffset) {
|
if (inputOffset) {
|
||||||
inputOffset = inputOffset[0];
|
inputOffset = inputOffset[0];
|
||||||
|
|
||||||
|
@ -92,7 +92,7 @@ define(['playbackManager', 'layoutManager', 'text!./subtitlesync.template.html',
|
||||||
});
|
});
|
||||||
|
|
||||||
subtitleSyncSlider.getBubbleHtml = function (value) {
|
subtitleSyncSlider.getBubbleHtml = function (value) {
|
||||||
var newOffset = getOffsetFromPercentage(value);
|
const newOffset = getOffsetFromPercentage(value);
|
||||||
return '<h1 class="sliderBubbleText">' +
|
return '<h1 class="sliderBubbleText">' +
|
||||||
(newOffset > 0 ? '+' : '') + parseFloat(newOffset) + 's' +
|
(newOffset > 0 ? '+' : '') + parseFloat(newOffset) + 's' +
|
||||||
'</h1>';
|
'</h1>';
|
||||||
|
@ -108,7 +108,7 @@ define(['playbackManager', 'layoutManager', 'text!./subtitlesync.template.html',
|
||||||
|
|
||||||
function getOffsetFromPercentage(value) {
|
function getOffsetFromPercentage(value) {
|
||||||
// convert percent to fraction
|
// convert percent to fraction
|
||||||
var offset = (value - 50) / 50;
|
let offset = (value - 50) / 50;
|
||||||
// multiply by offset min/max range value (-x to +x) :
|
// multiply by offset min/max range value (-x to +x) :
|
||||||
offset *= 30;
|
offset *= 30;
|
||||||
return offset.toFixed(1);
|
return offset.toFixed(1);
|
||||||
|
@ -116,32 +116,33 @@ define(['playbackManager', 'layoutManager', 'text!./subtitlesync.template.html',
|
||||||
|
|
||||||
function getPercentageFromOffset(value) {
|
function getPercentageFromOffset(value) {
|
||||||
// divide by offset min/max range value (-x to +x) :
|
// divide by offset min/max range value (-x to +x) :
|
||||||
var percentValue = value / 30;
|
let percentValue = value / 30;
|
||||||
// convert fraction to percent
|
// convert fraction to percent
|
||||||
percentValue *= 50;
|
percentValue *= 50;
|
||||||
percentValue += 50;
|
percentValue += 50;
|
||||||
return Math.min(100, Math.max(0, percentValue.toFixed()));
|
return Math.min(100, Math.max(0, percentValue.toFixed()));
|
||||||
}
|
}
|
||||||
|
|
||||||
function SubtitleSync(currentPlayer) {
|
class SubtitleSync {
|
||||||
|
constructor(currentPlayer) {
|
||||||
player = currentPlayer;
|
player = currentPlayer;
|
||||||
init(this);
|
init(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
SubtitleSync.prototype.destroy = function() {
|
destroy() {
|
||||||
SubtitleSync.prototype.toggle('forceToHide');
|
SubtitleSync.prototype.toggle('forceToHide');
|
||||||
if (player) {
|
if (player) {
|
||||||
playbackManager.disableShowingSubtitleOffset(player);
|
playbackManager.disableShowingSubtitleOffset(player);
|
||||||
playbackManager.setSubtitleOffset(0, player);
|
playbackManager.setSubtitleOffset(0, player);
|
||||||
}
|
}
|
||||||
var elem = this.element;
|
const elem = this.element;
|
||||||
if (elem) {
|
if (elem) {
|
||||||
elem.parentNode.removeChild(elem);
|
elem.parentNode.removeChild(elem);
|
||||||
this.element = null;
|
this.element = null;
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
SubtitleSync.prototype.toggle = function(action) {
|
toggle(action) {
|
||||||
if (player && playbackManager.supportSubtitleOffset(player)) {
|
if (player && playbackManager.supportSubtitleOffset(player)) {
|
||||||
/* eslint-disable no-fallthrough */
|
/* eslint-disable no-fallthrough */
|
||||||
switch (action) {
|
switch (action) {
|
||||||
|
@ -170,7 +171,7 @@ define(['playbackManager', 'layoutManager', 'text!./subtitlesync.template.html',
|
||||||
}
|
}
|
||||||
/* eslint-enable no-fallthrough */
|
/* eslint-enable no-fallthrough */
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return SubtitleSync;
|
export default SubtitleSync;
|
||||||
});
|
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
define(['backdrop', 'mainTabsManager', 'layoutManager', 'emby-tabs'], function (backdrop, mainTabsManager, layoutManager) {
|
define(['backdrop', 'mainTabsManager', 'layoutManager', 'emby-tabs'], function (backdrop, mainTabsManager, layoutManager) {
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
|
layoutManager = layoutManager.default || layoutManager;
|
||||||
|
|
||||||
function onViewDestroy(e) {
|
function onViewDestroy(e) {
|
||||||
var tabControllers = this.tabControllers;
|
var tabControllers = this.tabControllers;
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,9 @@ define(['dialogHelper', 'dom', 'layoutManager', 'connectionManager', 'globalize'
|
||||||
|
|
||||||
browser = browser.default || browser;
|
browser = browser.default || browser;
|
||||||
loading = loading.default || loading;
|
loading = loading.default || loading;
|
||||||
|
layoutManager = layoutManager.default || layoutManager;
|
||||||
focusManager = focusManager.default || focusManager;
|
focusManager = focusManager.default || focusManager;
|
||||||
|
scrollHelper = scrollHelper.default || scrollHelper;
|
||||||
|
|
||||||
var enableFocusTransform = !browser.slow && !browser.edge;
|
var enableFocusTransform = !browser.slow && !browser.edge;
|
||||||
|
|
||||||
|
|
|
@ -1,22 +1,22 @@
|
||||||
define(['viewContainer', 'focusManager', 'queryString', 'layoutManager'], function (viewContainer, focusManager, queryString, layoutManager) {
|
import viewContainer from 'viewContainer';
|
||||||
'use strict';
|
import focusManager from 'focusManager';
|
||||||
|
import queryString from 'queryString';
|
||||||
|
import layoutManager from 'layoutManager';
|
||||||
|
|
||||||
focusManager = focusManager.default || focusManager;
|
let currentView;
|
||||||
|
let dispatchPageEvents;
|
||||||
var currentView;
|
|
||||||
var dispatchPageEvents;
|
|
||||||
|
|
||||||
viewContainer.setOnBeforeChange(function (newView, isRestored, options) {
|
viewContainer.setOnBeforeChange(function (newView, isRestored, options) {
|
||||||
var lastView = currentView;
|
const lastView = currentView;
|
||||||
if (lastView) {
|
if (lastView) {
|
||||||
var beforeHideResult = dispatchViewEvent(lastView, null, 'viewbeforehide', true);
|
const beforeHideResult = dispatchViewEvent(lastView, null, 'viewbeforehide', true);
|
||||||
|
|
||||||
if (!beforeHideResult) {
|
if (!beforeHideResult) {
|
||||||
// todo: cancel
|
// todo: cancel
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var eventDetail = getViewEventDetail(newView, options, isRestored);
|
const eventDetail = getViewEventDetail(newView, options, isRestored);
|
||||||
|
|
||||||
if (!newView.initComplete) {
|
if (!newView.initComplete) {
|
||||||
newView.initComplete = true;
|
newView.initComplete = true;
|
||||||
|
@ -36,14 +36,14 @@ define(['viewContainer', 'focusManager', 'queryString', 'layoutManager'], functi
|
||||||
});
|
});
|
||||||
|
|
||||||
function onViewChange(view, options, isRestore) {
|
function onViewChange(view, options, isRestore) {
|
||||||
var lastView = currentView;
|
const lastView = currentView;
|
||||||
if (lastView) {
|
if (lastView) {
|
||||||
dispatchViewEvent(lastView, null, 'viewhide');
|
dispatchViewEvent(lastView, null, 'viewhide');
|
||||||
}
|
}
|
||||||
|
|
||||||
currentView = view;
|
currentView = view;
|
||||||
|
|
||||||
var eventDetail = getViewEventDetail(view, options, isRestore);
|
const eventDetail = getViewEventDetail(view, options, isRestore);
|
||||||
|
|
||||||
if (!isRestore) {
|
if (!isRestore) {
|
||||||
if (options.autoFocus !== false) {
|
if (options.autoFocus !== false) {
|
||||||
|
@ -65,7 +65,7 @@ define(['viewContainer', 'focusManager', 'queryString', 'layoutManager'], functi
|
||||||
}
|
}
|
||||||
|
|
||||||
function getProperties(view) {
|
function getProperties(view) {
|
||||||
var props = view.getAttribute('data-properties');
|
const props = view.getAttribute('data-properties');
|
||||||
|
|
||||||
if (props) {
|
if (props) {
|
||||||
return props.split(',');
|
return props.split(',');
|
||||||
|
@ -88,7 +88,7 @@ define(['viewContainer', 'focusManager', 'queryString', 'layoutManager'], functi
|
||||||
|
|
||||||
eventInfo.cancelable = isCancellable || false;
|
eventInfo.cancelable = isCancellable || false;
|
||||||
|
|
||||||
var eventResult = view.dispatchEvent(new CustomEvent(eventName, eventInfo));
|
const eventResult = view.dispatchEvent(new CustomEvent(eventName, eventInfo));
|
||||||
|
|
||||||
if (dispatchPageEvents) {
|
if (dispatchPageEvents) {
|
||||||
eventInfo.cancelable = false;
|
eventInfo.cancelable = false;
|
||||||
|
@ -99,9 +99,9 @@ define(['viewContainer', 'focusManager', 'queryString', 'layoutManager'], functi
|
||||||
}
|
}
|
||||||
|
|
||||||
function getViewEventDetail(view, options, isRestore) {
|
function getViewEventDetail(view, options, isRestore) {
|
||||||
var url = options.url;
|
const url = options.url;
|
||||||
var index = url.indexOf('?');
|
const index = url.indexOf('?');
|
||||||
var params = index === -1 ? {} : queryString.parse(url.substring(index + 1));
|
const params = index === -1 ? {} : queryString.parse(url.substring(index + 1));
|
||||||
|
|
||||||
return {
|
return {
|
||||||
detail: {
|
detail: {
|
||||||
|
@ -126,11 +126,9 @@ define(['viewContainer', 'focusManager', 'queryString', 'layoutManager'], functi
|
||||||
|
|
||||||
document.addEventListener('skinunload', resetCachedViews);
|
document.addEventListener('skinunload', resetCachedViews);
|
||||||
|
|
||||||
function ViewManager() {
|
class ViewManager {
|
||||||
}
|
loadView(options) {
|
||||||
|
const lastView = currentView;
|
||||||
ViewManager.prototype.loadView = function (options) {
|
|
||||||
var lastView = currentView;
|
|
||||||
|
|
||||||
// Record the element that has focus
|
// Record the element that has focus
|
||||||
if (lastView) {
|
if (lastView) {
|
||||||
|
@ -144,9 +142,9 @@ define(['viewContainer', 'focusManager', 'queryString', 'layoutManager'], functi
|
||||||
viewContainer.loadView(options).then(function (view) {
|
viewContainer.loadView(options).then(function (view) {
|
||||||
onViewChange(view, options);
|
onViewChange(view, options);
|
||||||
});
|
});
|
||||||
};
|
}
|
||||||
|
|
||||||
ViewManager.prototype.tryRestoreView = function (options, onViewChanging) {
|
tryRestoreView(options, onViewChanging) {
|
||||||
if (options.cancel) {
|
if (options.cancel) {
|
||||||
return Promise.reject({ cancelled: true });
|
return Promise.reject({ cancelled: true });
|
||||||
}
|
}
|
||||||
|
@ -160,15 +158,15 @@ define(['viewContainer', 'focusManager', 'queryString', 'layoutManager'], functi
|
||||||
onViewChanging();
|
onViewChanging();
|
||||||
onViewChange(view, options, true);
|
onViewChange(view, options, true);
|
||||||
});
|
});
|
||||||
};
|
}
|
||||||
|
|
||||||
ViewManager.prototype.currentView = function () {
|
currentView() {
|
||||||
return currentView;
|
return currentView;
|
||||||
};
|
}
|
||||||
|
|
||||||
ViewManager.prototype.dispatchPageEvents = function (value) {
|
dispatchPageEvents(value) {
|
||||||
dispatchPageEvents = value;
|
dispatchPageEvents = value;
|
||||||
};
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return new ViewManager();
|
export default new ViewManager();
|
||||||
});
|
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
define(['require', 'dialogHelper', 'loading', 'apphost', 'layoutManager', 'connectionManager', 'appRouter', 'globalize', 'userSettings', 'emby-checkbox', 'emby-input', 'paper-icon-button-light', 'emby-select', 'material-icons', 'css!./../formdialog', 'emby-button', 'flexStyles'], function (require, dialogHelper, loading, appHost, layoutManager, connectionManager, appRouter, globalize, userSettings) {
|
define(['require', 'dialogHelper', 'loading', 'apphost', 'layoutManager', 'connectionManager', 'appRouter', 'globalize', 'userSettings', 'emby-checkbox', 'emby-input', 'paper-icon-button-light', 'emby-select', 'material-icons', 'css!./../formdialog', 'emby-button', 'flexStyles'], function (require, dialogHelper, loading, appHost, layoutManager, connectionManager, appRouter, globalize, userSettings) {
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
|
layoutManager = layoutManager.default || layoutManager;
|
||||||
|
|
||||||
function onSubmit(e) {
|
function onSubmit(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
return false;
|
return false;
|
||||||
|
@ -29,6 +31,7 @@ define(['require', 'dialogHelper', 'loading', 'apphost', 'layoutManager', 'conne
|
||||||
|
|
||||||
function centerFocus(elem, horiz, on) {
|
function centerFocus(elem, horiz, on) {
|
||||||
require(['scrollHelper'], function (scrollHelper) {
|
require(['scrollHelper'], function (scrollHelper) {
|
||||||
|
scrollHelper = scrollHelper.default || scrollHelper;
|
||||||
var fn = on ? 'on' : 'off';
|
var fn = on ? 'on' : 'off';
|
||||||
scrollHelper.centerFocus[fn](elem, horiz);
|
scrollHelper.centerFocus[fn](elem, horiz);
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
define(['jQuery', 'loading', 'libraryMenu', 'globalize', 'connectionManager', 'emby-button'], function ($, loading, libraryMenu, globalize, connectionManager) {
|
import $ from 'jQuery';
|
||||||
'use strict';
|
import loading from 'loading';
|
||||||
|
import globalize from 'globalize';
|
||||||
loading = loading.default || loading;
|
import 'emby-button';
|
||||||
|
|
||||||
function populateHistory(packageInfo, page) {
|
function populateHistory(packageInfo, page) {
|
||||||
var html = '';
|
let html = '';
|
||||||
var length = Math.min(packageInfo.versions.length, 10);
|
const length = Math.min(packageInfo.versions.length, 10);
|
||||||
|
|
||||||
for (var i = 0; i < length; i++) {
|
for (let i = 0; i < length; i++) {
|
||||||
var version = packageInfo.versions[i];
|
let version = packageInfo.versions[i];
|
||||||
html += '<h2 style="margin:.5em 0;">' + version.version + '</h2>';
|
html += '<h2 style="margin:.5em 0;">' + version.version + '</h2>';
|
||||||
html += '<div style="margin-bottom:1.5em;">' + version.changelog + '</div>';
|
html += '<div style="margin-bottom:1.5em;">' + version.changelog + '</div>';
|
||||||
}
|
}
|
||||||
|
@ -17,27 +17,27 @@ define(['jQuery', 'loading', 'libraryMenu', 'globalize', 'connectionManager', 'e
|
||||||
}
|
}
|
||||||
|
|
||||||
function populateVersions(packageInfo, page, installedPlugin) {
|
function populateVersions(packageInfo, page, installedPlugin) {
|
||||||
var html = '';
|
let html = '';
|
||||||
|
|
||||||
for (var i = 0; i < packageInfo.versions.length; i++) {
|
for (let i = 0; i < packageInfo.versions.length; i++) {
|
||||||
var version = packageInfo.versions[i];
|
const version = packageInfo.versions[i];
|
||||||
html += '<option value="' + version.version + '">' + version.version + '</option>';
|
html += '<option value="' + version.version + '">' + version.version + '</option>';
|
||||||
}
|
}
|
||||||
|
|
||||||
var selectmenu = $('#selectVersion', page).html(html);
|
const selectmenu = $('#selectVersion', page).html(html);
|
||||||
|
|
||||||
if (!installedPlugin) {
|
if (!installedPlugin) {
|
||||||
$('#pCurrentVersion', page).hide().html('');
|
$('#pCurrentVersion', page).hide().html('');
|
||||||
}
|
}
|
||||||
|
|
||||||
var packageVersion = packageInfo.versions[0];
|
const packageVersion = packageInfo.versions[0];
|
||||||
if (packageVersion) {
|
if (packageVersion) {
|
||||||
selectmenu.val(packageVersion.version);
|
selectmenu.val(packageVersion.version);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function renderPackage(pkg, installedPlugins, page) {
|
function renderPackage(pkg, installedPlugins, page) {
|
||||||
var installedPlugin = installedPlugins.filter(function (ip) {
|
const installedPlugin = installedPlugins.filter(function (ip) {
|
||||||
return ip.Name == pkg.name;
|
return ip.Name == pkg.name;
|
||||||
})[0];
|
})[0];
|
||||||
|
|
||||||
|
@ -58,7 +58,7 @@ define(['jQuery', 'loading', 'libraryMenu', 'globalize', 'connectionManager', 'e
|
||||||
$('#developer', page).html(pkg.owner);
|
$('#developer', page).html(pkg.owner);
|
||||||
|
|
||||||
if (installedPlugin) {
|
if (installedPlugin) {
|
||||||
var currentVersionText = globalize.translate('MessageYouHaveVersionInstalled', '<strong>' + installedPlugin.Version + '</strong>');
|
const currentVersionText = globalize.translate('MessageYouHaveVersionInstalled', '<strong>' + installedPlugin.Version + '</strong>');
|
||||||
$('#pCurrentVersion', page).show().html(currentVersionText);
|
$('#pCurrentVersion', page).show().html(currentVersionText);
|
||||||
} else {
|
} else {
|
||||||
$('#pCurrentVersion', page).hide().html('');
|
$('#pCurrentVersion', page).hide().html('');
|
||||||
|
@ -68,34 +68,36 @@ define(['jQuery', 'loading', 'libraryMenu', 'globalize', 'connectionManager', 'e
|
||||||
}
|
}
|
||||||
|
|
||||||
function alertText(options) {
|
function alertText(options) {
|
||||||
require(['alert'], function ({default: alert}) {
|
import('alert').then(({default: alert}) => {
|
||||||
alert(options);
|
alert(options);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function performInstallation(page, name, guid, version) {
|
function performInstallation(page, name, guid, version) {
|
||||||
var developer = $('#developer', page).html().toLowerCase();
|
const developer = $('#developer', page).html().toLowerCase();
|
||||||
|
|
||||||
var alertCallback = function () {
|
const alertCallback = function () {
|
||||||
loading.show();
|
loading.show();
|
||||||
page.querySelector('#btnInstall').disabled = true;
|
page.querySelector('#btnInstall').disabled = true;
|
||||||
ApiClient.installPlugin(name, guid, version).then(function () {
|
ApiClient.installPlugin(name, guid, version).then(() => {
|
||||||
loading.hide();
|
loading.hide();
|
||||||
alertText(globalize.translate('MessagePluginInstalled'));
|
alertText(globalize.translate('MessagePluginInstalled'));
|
||||||
|
}).catch(() => {
|
||||||
|
alertText(globalize.translate('MessagePluginInstallError'));
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
if (developer !== 'jellyfin') {
|
if (developer !== 'jellyfin') {
|
||||||
loading.hide();
|
loading.hide();
|
||||||
var msg = globalize.translate('MessagePluginInstallDisclaimer');
|
let msg = globalize.translate('MessagePluginInstallDisclaimer');
|
||||||
msg += '<br/>';
|
msg += '<br/>';
|
||||||
msg += '<br/>';
|
msg += '<br/>';
|
||||||
msg += globalize.translate('PleaseConfirmPluginInstallation');
|
msg += globalize.translate('PleaseConfirmPluginInstallation');
|
||||||
|
|
||||||
require(['confirm'], function (confirm) {
|
import('confirm').then(({default: confirm}) => {
|
||||||
confirm.default(msg, globalize.translate('HeaderConfirmPluginInstallation')).then(function () {
|
confirm(msg, globalize.translate('HeaderConfirmPluginInstallation')).then(function () {
|
||||||
alertCallback();
|
alertCallback();
|
||||||
}, function () {
|
}).catch(() => {
|
||||||
console.debug('plugin not installed');
|
console.debug('plugin not installed');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -104,18 +106,18 @@ define(['jQuery', 'loading', 'libraryMenu', 'globalize', 'connectionManager', 'e
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return function (view, params) {
|
export default function(view, params) {
|
||||||
$('.addPluginForm', view).on('submit', function () {
|
$('.addPluginForm', view).on('submit', function () {
|
||||||
loading.show();
|
loading.show();
|
||||||
var page = $(this).parents('#addPluginPage')[0];
|
const page = $(this).parents('#addPluginPage')[0];
|
||||||
var name = params.name;
|
const name = params.name;
|
||||||
var guid = params.guid;
|
const guid = params.guid;
|
||||||
ApiClient.getInstalledPlugins().then(function (plugins) {
|
ApiClient.getInstalledPlugins().then(function (plugins) {
|
||||||
var installedPlugin = plugins.filter(function (plugin) {
|
const installedPlugin = plugins.filter(function (plugin) {
|
||||||
return plugin.Name == name;
|
return plugin.Name == name;
|
||||||
})[0];
|
})[0];
|
||||||
|
|
||||||
var version = $('#selectVersion', page).val();
|
const version = $('#selectVersion', page).val();
|
||||||
if (installedPlugin && installedPlugin.Version === version) {
|
if (installedPlugin && installedPlugin.Version === version) {
|
||||||
loading.hide();
|
loading.hide();
|
||||||
Dashboard.alert({
|
Dashboard.alert({
|
||||||
|
@ -125,19 +127,20 @@ define(['jQuery', 'loading', 'libraryMenu', 'globalize', 'connectionManager', 'e
|
||||||
} else {
|
} else {
|
||||||
performInstallation(page, name, guid, version);
|
performInstallation(page, name, guid, version);
|
||||||
}
|
}
|
||||||
|
}).catch(() => {
|
||||||
|
alertText(globalize.translate('MessageGetInstalledPluginsError'));
|
||||||
});
|
});
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
view.addEventListener('viewshow', function () {
|
view.addEventListener('viewshow', function () {
|
||||||
var page = this;
|
const page = this;
|
||||||
loading.show();
|
loading.show();
|
||||||
var name = params.name;
|
const name = params.name;
|
||||||
var guid = params.guid;
|
const guid = params.guid;
|
||||||
var promise1 = ApiClient.getPackageInfo(name, guid);
|
const promise1 = ApiClient.getPackageInfo(name, guid);
|
||||||
var promise2 = ApiClient.getInstalledPlugins();
|
const promise2 = ApiClient.getInstalledPlugins();
|
||||||
Promise.all([promise1, promise2]).then(function (responses) {
|
Promise.all([promise1, promise2]).then(function (responses) {
|
||||||
renderPackage(responses[0], responses[1], page);
|
renderPackage(responses[0], responses[1], page);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
};
|
}
|
||||||
});
|
|
||||||
|
|
|
@ -1,12 +1,15 @@
|
||||||
define(['loading', 'libraryMenu', 'globalize', 'cardStyle', 'emby-button', 'emby-checkbox', 'emby-select'], function (loading, libraryMenu, globalize) {
|
import loading from 'loading';
|
||||||
'use strict';
|
import libraryMenu from 'libraryMenu';
|
||||||
|
import globalize from 'globalize';
|
||||||
loading = loading.default || loading;
|
import 'cardStyle';
|
||||||
|
import 'emby-button';
|
||||||
|
import 'emby-checkbox';
|
||||||
|
import 'emby-select';
|
||||||
|
|
||||||
function reloadList(page) {
|
function reloadList(page) {
|
||||||
loading.show();
|
loading.show();
|
||||||
var promise1 = ApiClient.getAvailablePlugins();
|
const promise1 = ApiClient.getAvailablePlugins();
|
||||||
var promise2 = ApiClient.getInstalledPlugins();
|
const promise2 = ApiClient.getInstalledPlugins();
|
||||||
Promise.all([promise1, promise2]).then(function (responses) {
|
Promise.all([promise1, promise2]).then(function (responses) {
|
||||||
populateList({
|
populateList({
|
||||||
catalogElement: page.querySelector('#pluginTiles'),
|
catalogElement: page.querySelector('#pluginTiles'),
|
||||||
|
@ -19,6 +22,7 @@ define(['loading', 'libraryMenu', 'globalize', 'cardStyle', 'emby-button', 'emby
|
||||||
|
|
||||||
function getHeaderText(category) {
|
function getHeaderText(category) {
|
||||||
category = category.replace(' ', '');
|
category = category.replace(' ', '');
|
||||||
|
// TODO: Replace with switch
|
||||||
if (category === 'Channel') {
|
if (category === 'Channel') {
|
||||||
category = 'Channels';
|
category = 'Channels';
|
||||||
} else if (category === 'Theme') {
|
} else if (category === 'Theme') {
|
||||||
|
@ -33,8 +37,8 @@ define(['loading', 'libraryMenu', 'globalize', 'cardStyle', 'emby-button', 'emby
|
||||||
}
|
}
|
||||||
|
|
||||||
function populateList(options) {
|
function populateList(options) {
|
||||||
var availablePlugins = options.availablePlugins;
|
const availablePlugins = options.availablePlugins;
|
||||||
var installedPlugins = options.installedPlugins;
|
const installedPlugins = options.installedPlugins;
|
||||||
|
|
||||||
availablePlugins.forEach(function (plugin, index, array) {
|
availablePlugins.forEach(function (plugin, index, array) {
|
||||||
plugin.category = plugin.category || 'General';
|
plugin.category = plugin.category || 'General';
|
||||||
|
@ -56,12 +60,12 @@ define(['loading', 'libraryMenu', 'globalize', 'cardStyle', 'emby-button', 'emby
|
||||||
return 0;
|
return 0;
|
||||||
});
|
});
|
||||||
|
|
||||||
var currentCategory = null;
|
let currentCategory = null;
|
||||||
var html = '';
|
let html = '';
|
||||||
|
|
||||||
for (var i = 0; i < availablePlugins.length; i++) {
|
for (let i = 0; i < availablePlugins.length; i++) {
|
||||||
var plugin = availablePlugins[i];
|
const plugin = availablePlugins[i];
|
||||||
var category = plugin.categoryDisplayName;
|
const category = plugin.categoryDisplayName;
|
||||||
if (category != currentCategory) {
|
if (category != currentCategory) {
|
||||||
if (currentCategory) {
|
if (currentCategory) {
|
||||||
html += '</div>';
|
html += '</div>';
|
||||||
|
@ -86,14 +90,14 @@ define(['loading', 'libraryMenu', 'globalize', 'cardStyle', 'emby-button', 'emby
|
||||||
}
|
}
|
||||||
|
|
||||||
function getPluginHtml(plugin, options, installedPlugins) {
|
function getPluginHtml(plugin, options, installedPlugins) {
|
||||||
var html = '';
|
let html = '';
|
||||||
var href = plugin.externalUrl ? plugin.externalUrl : 'addplugin.html?name=' + encodeURIComponent(plugin.name) + '&guid=' + plugin.guid;
|
let href = plugin.externalUrl ? plugin.externalUrl : 'addplugin.html?name=' + encodeURIComponent(plugin.name) + '&guid=' + plugin.guid;
|
||||||
|
|
||||||
if (options.context) {
|
if (options.context) {
|
||||||
href += '&context=' + options.context;
|
href += '&context=' + options.context;
|
||||||
}
|
}
|
||||||
|
|
||||||
var target = plugin.externalUrl ? ' target="_blank"' : '';
|
const target = plugin.externalUrl ? ' target="_blank"' : '';
|
||||||
html += "<div class='card backdropCard'>";
|
html += "<div class='card backdropCard'>";
|
||||||
html += '<div class="cardBox visualCardBox">';
|
html += '<div class="cardBox visualCardBox">';
|
||||||
html += '<div class="cardScalable visualCardBox-cardScalable">';
|
html += '<div class="cardScalable visualCardBox-cardScalable">';
|
||||||
|
@ -106,7 +110,7 @@ define(['loading', 'libraryMenu', 'globalize', 'cardStyle', 'emby-button', 'emby
|
||||||
html += "<div class='cardText'>";
|
html += "<div class='cardText'>";
|
||||||
html += plugin.name;
|
html += plugin.name;
|
||||||
html += '</div>';
|
html += '</div>';
|
||||||
var installedPlugin = installedPlugins.filter(function (ip) {
|
const installedPlugin = installedPlugins.filter(function (ip) {
|
||||||
return ip.Id == plugin.guid;
|
return ip.Id == plugin.guid;
|
||||||
})[0];
|
})[0];
|
||||||
html += "<div class='cardText cardText-secondary'>";
|
html += "<div class='cardText cardText-secondary'>";
|
||||||
|
@ -130,14 +134,9 @@ define(['loading', 'libraryMenu', 'globalize', 'cardStyle', 'emby-button', 'emby
|
||||||
}];
|
}];
|
||||||
}
|
}
|
||||||
|
|
||||||
window.PluginCatalog = {
|
export default function (view) {
|
||||||
renderCatalog: populateList
|
|
||||||
};
|
|
||||||
|
|
||||||
return function (view, params) {
|
|
||||||
view.addEventListener('viewshow', function () {
|
view.addEventListener('viewshow', function () {
|
||||||
libraryMenu.setTabs('plugins', 1, getTabs);
|
libraryMenu.setTabs('plugins', 1, getTabs);
|
||||||
reloadList(this);
|
reloadList(this);
|
||||||
});
|
});
|
||||||
};
|
}
|
||||||
});
|
|
||||||
|
|
|
@ -1,12 +1,14 @@
|
||||||
define(['loading', 'libraryMenu', 'dom', 'globalize', 'cardStyle', 'emby-button'], function (loading, libraryMenu, dom, globalize) {
|
import loading from 'loading';
|
||||||
'use strict';
|
import libraryMenu from 'libraryMenu';
|
||||||
|
import dom from 'dom';
|
||||||
loading = loading.default || loading;
|
import globalize from 'globalize';
|
||||||
|
import 'cardStyle';
|
||||||
|
import 'emby-button';
|
||||||
|
|
||||||
function deletePlugin(page, uniqueid, name) {
|
function deletePlugin(page, uniqueid, name) {
|
||||||
var msg = globalize.translate('UninstallPluginConfirmation', name);
|
const msg = globalize.translate('UninstallPluginConfirmation', name);
|
||||||
|
|
||||||
require(['confirm'], function (confirm) {
|
import('confirm').then(({default: confirm}) => {
|
||||||
confirm.default({
|
confirm.default({
|
||||||
title: globalize.translate('HeaderUninstallPlugin'),
|
title: globalize.translate('HeaderUninstallPlugin'),
|
||||||
text: msg,
|
text: msg,
|
||||||
|
@ -34,11 +36,11 @@ define(['loading', 'libraryMenu', 'dom', 'globalize', 'cardStyle', 'emby-button'
|
||||||
}
|
}
|
||||||
|
|
||||||
function getPluginCardHtml(plugin, pluginConfigurationPages) {
|
function getPluginCardHtml(plugin, pluginConfigurationPages) {
|
||||||
var configPage = pluginConfigurationPages.filter(function (pluginConfigurationPage) {
|
const configPage = pluginConfigurationPages.filter(function (pluginConfigurationPage) {
|
||||||
return pluginConfigurationPage.PluginId == plugin.Id;
|
return pluginConfigurationPage.PluginId == plugin.Id;
|
||||||
})[0];
|
})[0];
|
||||||
var configPageUrl = configPage ? Dashboard.getConfigurationPageUrl(configPage.Name) : null;
|
const configPageUrl = configPage ? Dashboard.getConfigurationPageUrl(configPage.Name) : null;
|
||||||
var html = '';
|
let html = '';
|
||||||
html += "<div data-id='" + plugin.Id + "' data-name='" + plugin.Name + "' data-removable='" + plugin.CanUninstall + "' class='card backdropCard'>";
|
html += "<div data-id='" + plugin.Id + "' data-name='" + plugin.Name + "' data-removable='" + plugin.CanUninstall + "' class='card backdropCard'>";
|
||||||
html += '<div class="cardBox visualCardBox">';
|
html += '<div class="cardBox visualCardBox">';
|
||||||
html += '<div class="cardScalable">';
|
html += '<div class="cardScalable">';
|
||||||
|
@ -82,11 +84,11 @@ define(['loading', 'libraryMenu', 'dom', 'globalize', 'cardStyle', 'emby-button'
|
||||||
return -1;
|
return -1;
|
||||||
});
|
});
|
||||||
|
|
||||||
var html = plugins.map(function (p) {
|
let html = plugins.map(function (p) {
|
||||||
return getPluginCardHtml(p, pluginConfigurationPages);
|
return getPluginCardHtml(p, pluginConfigurationPages);
|
||||||
}).join('');
|
}).join('');
|
||||||
|
|
||||||
var installedPluginsElement = page.querySelector('.installedPlugins');
|
const installedPluginsElement = page.querySelector('.installedPlugins');
|
||||||
installedPluginsElement.removeEventListener('click', onInstalledPluginsClick);
|
installedPluginsElement.removeEventListener('click', onInstalledPluginsClick);
|
||||||
installedPluginsElement.addEventListener('click', onInstalledPluginsClick);
|
installedPluginsElement.addEventListener('click', onInstalledPluginsClick);
|
||||||
|
|
||||||
|
@ -107,12 +109,12 @@ define(['loading', 'libraryMenu', 'dom', 'globalize', 'cardStyle', 'emby-button'
|
||||||
}
|
}
|
||||||
|
|
||||||
function showPluginMenu(page, elem) {
|
function showPluginMenu(page, elem) {
|
||||||
var card = dom.parentWithClass(elem, 'card');
|
const card = dom.parentWithClass(elem, 'card');
|
||||||
var id = card.getAttribute('data-id');
|
const id = card.getAttribute('data-id');
|
||||||
var name = card.getAttribute('data-name');
|
const name = card.getAttribute('data-name');
|
||||||
var removable = card.getAttribute('data-removable');
|
const removable = card.getAttribute('data-removable');
|
||||||
var configHref = card.querySelector('.cardContent').getAttribute('href');
|
const configHref = card.querySelector('.cardContent').getAttribute('href');
|
||||||
var menuItems = [];
|
const menuItems = [];
|
||||||
|
|
||||||
if (configHref) {
|
if (configHref) {
|
||||||
menuItems.push({
|
menuItems.push({
|
||||||
|
@ -130,7 +132,7 @@ define(['loading', 'libraryMenu', 'dom', 'globalize', 'cardStyle', 'emby-button'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
require(['actionsheet'], function (actionsheet) {
|
import('actionsheet').then(({default: actionsheet}) => {
|
||||||
actionsheet.show({
|
actionsheet.show({
|
||||||
items: menuItems,
|
items: menuItems,
|
||||||
positionTo: elem,
|
positionTo: elem,
|
||||||
|
@ -174,7 +176,7 @@ define(['loading', 'libraryMenu', 'dom', 'globalize', 'cardStyle', 'emby-button'
|
||||||
} else if (dom.parentWithClass(e.target, 'connectModePluginCard')) {
|
} else if (dom.parentWithClass(e.target, 'connectModePluginCard')) {
|
||||||
showConnectMessage();
|
showConnectMessage();
|
||||||
} else {
|
} else {
|
||||||
var btnCardMenu = dom.parentWithClass(e.target, 'btnCardMenu');
|
const btnCardMenu = dom.parentWithClass(e.target, 'btnCardMenu');
|
||||||
if (btnCardMenu) {
|
if (btnCardMenu) {
|
||||||
showPluginMenu(dom.parentWithClass(btnCardMenu, 'page'), btnCardMenu);
|
showPluginMenu(dom.parentWithClass(btnCardMenu, 'page'), btnCardMenu);
|
||||||
}
|
}
|
||||||
|
@ -189,4 +191,3 @@ define(['loading', 'libraryMenu', 'dom', 'globalize', 'cardStyle', 'emby-button'
|
||||||
window.PluginsPage = {
|
window.PluginsPage = {
|
||||||
renderPlugins: renderPlugins
|
renderPlugins: renderPlugins
|
||||||
};
|
};
|
||||||
});
|
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import appHost from 'apphost';
|
||||||
import loading from 'loading';
|
import loading from 'loading';
|
||||||
import appRouter from 'appRouter';
|
import appRouter from 'appRouter';
|
||||||
import layoutManager from 'layoutManager';
|
import layoutManager from 'layoutManager';
|
||||||
|
@ -657,7 +658,7 @@ import 'emby-select';
|
||||||
setPeopleHeader(page, item);
|
setPeopleHeader(page, item);
|
||||||
loading.hide();
|
loading.hide();
|
||||||
|
|
||||||
if (item.Type === 'Book') {
|
if (item.Type === 'Book' && item.CanDownload && appHost.supports('filedownload')) {
|
||||||
hideAll(page, 'btnDownload', true);
|
hideAll(page, 'btnDownload', true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,12 +1,21 @@
|
||||||
define(['globalize', 'listView', 'layoutManager', 'userSettings', 'focusManager', 'cardBuilder', 'loading', 'connectionManager', 'alphaNumericShortcuts', 'scroller', 'playbackManager', 'alphaPicker', 'emby-itemscontainer', 'emby-scroller'], function (globalize, listView, layoutManager, userSettings, focusManager, cardBuilder, loading, connectionManager, AlphaNumericShortcuts, scroller, playbackManager, AlphaPicker) {
|
import globalize from 'globalize';
|
||||||
'use strict';
|
import listView from 'listView';
|
||||||
|
import layoutManager from 'layoutManager';
|
||||||
|
import * as userSettings from 'userSettings';
|
||||||
|
import focusManager from 'focusManager';
|
||||||
|
import cardBuilder from 'cardBuilder';
|
||||||
|
import loading from 'loading';
|
||||||
|
import connectionManager from 'connectionManager';
|
||||||
|
import AlphaNumericShortcuts from 'alphaNumericShortcuts';
|
||||||
|
import playbackManager from 'playbackManager';
|
||||||
|
import AlphaPicker from 'alphaPicker';
|
||||||
|
import 'emby-itemscontainer';
|
||||||
|
import 'emby-scroller';
|
||||||
|
|
||||||
playbackManager = playbackManager.default || playbackManager;
|
/* eslint-disable indent */
|
||||||
loading = loading.default || loading;
|
|
||||||
focusManager = focusManager.default || focusManager;
|
|
||||||
|
|
||||||
function getInitialLiveTvQuery(instance, params) {
|
function getInitialLiveTvQuery(instance, params) {
|
||||||
var query = {
|
const query = {
|
||||||
UserId: connectionManager.getApiClient(params.serverId).getCurrentUserId(),
|
UserId: connectionManager.getApiClient(params.serverId).getCurrentUserId(),
|
||||||
StartIndex: 0,
|
StartIndex: 0,
|
||||||
Fields: 'ChannelInfo,PrimaryImageAspectRatio',
|
Fields: 'ChannelInfo,PrimaryImageAspectRatio',
|
||||||
|
@ -63,7 +72,7 @@ define(['globalize', 'listView', 'layoutManager', 'userSettings', 'focusManager'
|
||||||
}
|
}
|
||||||
|
|
||||||
function modifyQueryWithFilters(instance, query) {
|
function modifyQueryWithFilters(instance, query) {
|
||||||
var sortValues = instance.getSortValues();
|
const sortValues = instance.getSortValues();
|
||||||
|
|
||||||
if (!query.SortBy) {
|
if (!query.SortBy) {
|
||||||
query.SortBy = sortValues.sortBy;
|
query.SortBy = sortValues.sortBy;
|
||||||
|
@ -72,9 +81,9 @@ define(['globalize', 'listView', 'layoutManager', 'userSettings', 'focusManager'
|
||||||
|
|
||||||
query.Fields = query.Fields ? query.Fields + ',PrimaryImageAspectRatio' : 'PrimaryImageAspectRatio';
|
query.Fields = query.Fields ? query.Fields + ',PrimaryImageAspectRatio' : 'PrimaryImageAspectRatio';
|
||||||
query.ImageTypeLimit = 1;
|
query.ImageTypeLimit = 1;
|
||||||
var hasFilters;
|
let hasFilters;
|
||||||
var queryFilters = [];
|
const queryFilters = [];
|
||||||
var filters = instance.getFilters();
|
const filters = instance.getFilters();
|
||||||
|
|
||||||
if (filters.IsPlayed) {
|
if (filters.IsPlayed) {
|
||||||
queryFilters.push('IsPlayed');
|
queryFilters.push('IsPlayed');
|
||||||
|
@ -168,21 +177,21 @@ define(['globalize', 'listView', 'layoutManager', 'userSettings', 'focusManager'
|
||||||
}
|
}
|
||||||
|
|
||||||
function updateSortText(instance) {
|
function updateSortText(instance) {
|
||||||
var btnSortText = instance.btnSortText;
|
const btnSortText = instance.btnSortText;
|
||||||
|
|
||||||
if (btnSortText) {
|
if (btnSortText) {
|
||||||
var options = instance.getSortMenuOptions();
|
const options = instance.getSortMenuOptions();
|
||||||
var values = instance.getSortValues();
|
const values = instance.getSortValues();
|
||||||
var sortBy = values.sortBy;
|
const sortBy = values.sortBy;
|
||||||
|
|
||||||
for (var i = 0, length = options.length; i < length; i++) {
|
for (const option of options) {
|
||||||
if (sortBy === options[i].value) {
|
if (sortBy === option.value) {
|
||||||
btnSortText.innerHTML = globalize.translate('SortByValue', options[i].name);
|
btnSortText.innerHTML = globalize.translate('SortByValue', option.name);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var btnSortIcon = instance.btnSortIcon;
|
const btnSortIcon = instance.btnSortIcon;
|
||||||
|
|
||||||
if (btnSortIcon) {
|
if (btnSortIcon) {
|
||||||
setSortButtonIcon(btnSortIcon, values.sortOrder === 'Descending' ? 'arrow_downward' : 'arrow_upward');
|
setSortButtonIcon(btnSortIcon, values.sortOrder === 'Descending' ? 'arrow_downward' : 'arrow_upward');
|
||||||
|
@ -202,10 +211,10 @@ define(['globalize', 'listView', 'layoutManager', 'userSettings', 'focusManager'
|
||||||
|
|
||||||
function updateAlphaPickerState(instance, numItems) {
|
function updateAlphaPickerState(instance, numItems) {
|
||||||
if (instance.alphaPicker) {
|
if (instance.alphaPicker) {
|
||||||
var alphaPicker = instance.alphaPickerElement;
|
const alphaPicker = instance.alphaPickerElement;
|
||||||
|
|
||||||
if (alphaPicker) {
|
if (alphaPicker) {
|
||||||
var values = instance.getSortValues();
|
const values = instance.getSortValues();
|
||||||
|
|
||||||
if (numItems == null) {
|
if (numItems == null) {
|
||||||
numItems = 100;
|
numItems = 100;
|
||||||
|
@ -223,7 +232,7 @@ define(['globalize', 'listView', 'layoutManager', 'userSettings', 'focusManager'
|
||||||
}
|
}
|
||||||
|
|
||||||
function getItems(instance, params, item, sortBy, startIndex, limit) {
|
function getItems(instance, params, item, sortBy, startIndex, limit) {
|
||||||
var apiClient = connectionManager.getApiClient(params.serverId);
|
const apiClient = connectionManager.getApiClient(params.serverId);
|
||||||
|
|
||||||
instance.queryRecursive = false;
|
instance.queryRecursive = false;
|
||||||
if (params.type === 'Recordings') {
|
if (params.type === 'Recordings') {
|
||||||
|
@ -252,7 +261,7 @@ define(['globalize', 'listView', 'layoutManager', 'userSettings', 'focusManager'
|
||||||
|
|
||||||
if (!item) {
|
if (!item) {
|
||||||
instance.queryRecursive = true;
|
instance.queryRecursive = true;
|
||||||
var method = 'getItems';
|
let method = 'getItems';
|
||||||
|
|
||||||
if (params.type === 'MusicArtist') {
|
if (params.type === 'MusicArtist') {
|
||||||
method = 'getArtists';
|
method = 'getArtists';
|
||||||
|
@ -275,7 +284,7 @@ define(['globalize', 'listView', 'layoutManager', 'userSettings', 'focusManager'
|
||||||
|
|
||||||
if (item.Type === 'Genre' || item.Type === 'MusicGenre' || item.Type === 'Studio' || item.Type === 'Person') {
|
if (item.Type === 'Genre' || item.Type === 'MusicGenre' || item.Type === 'Studio' || item.Type === 'Person') {
|
||||||
instance.queryRecursive = true;
|
instance.queryRecursive = true;
|
||||||
var query = {
|
const query = {
|
||||||
StartIndex: startIndex,
|
StartIndex: startIndex,
|
||||||
Limit: limit,
|
Limit: limit,
|
||||||
Fields: 'PrimaryImageAspectRatio,SortName',
|
Fields: 'PrimaryImageAspectRatio,SortName',
|
||||||
|
@ -324,8 +333,8 @@ define(['globalize', 'listView', 'layoutManager', 'userSettings', 'focusManager'
|
||||||
return Promise.resolve(null);
|
return Promise.resolve(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
var apiClient = connectionManager.getApiClient(params.serverId);
|
const apiClient = connectionManager.getApiClient(params.serverId);
|
||||||
var itemId = params.genreId || params.musicGenreId || params.studioId || params.personId || params.parentId;
|
const itemId = params.genreId || params.musicGenreId || params.studioId || params.personId || params.parentId;
|
||||||
|
|
||||||
if (itemId) {
|
if (itemId) {
|
||||||
return apiClient.getItem(apiClient.getCurrentUserId(), itemId);
|
return apiClient.getItem(apiClient.getCurrentUserId(), itemId);
|
||||||
|
@ -335,9 +344,9 @@ define(['globalize', 'listView', 'layoutManager', 'userSettings', 'focusManager'
|
||||||
}
|
}
|
||||||
|
|
||||||
function showViewSettingsMenu() {
|
function showViewSettingsMenu() {
|
||||||
var instance = this;
|
const instance = this;
|
||||||
|
|
||||||
require(['viewSettings'], function (ViewSettings) {
|
import('viewSettings').then(({default: ViewSettings}) => {
|
||||||
new ViewSettings().show({
|
new ViewSettings().show({
|
||||||
settingsKey: instance.getSettingsKey(),
|
settingsKey: instance.getSettingsKey(),
|
||||||
settings: instance.getViewSettings(),
|
settings: instance.getViewSettings(),
|
||||||
|
@ -350,9 +359,9 @@ define(['globalize', 'listView', 'layoutManager', 'userSettings', 'focusManager'
|
||||||
}
|
}
|
||||||
|
|
||||||
function showFilterMenu() {
|
function showFilterMenu() {
|
||||||
var instance = this;
|
const instance = this;
|
||||||
|
|
||||||
require(['filterMenu'], function (FilterMenu) {
|
import('filterMenu').then(({default: FilterMenu}) => {
|
||||||
new FilterMenu().show({
|
new FilterMenu().show({
|
||||||
settingsKey: instance.getSettingsKey(),
|
settingsKey: instance.getSettingsKey(),
|
||||||
settings: instance.getFilters(),
|
settings: instance.getFilters(),
|
||||||
|
@ -369,9 +378,9 @@ define(['globalize', 'listView', 'layoutManager', 'userSettings', 'focusManager'
|
||||||
}
|
}
|
||||||
|
|
||||||
function showSortMenu() {
|
function showSortMenu() {
|
||||||
var instance = this;
|
const instance = this;
|
||||||
|
|
||||||
require(['sortMenu'], function (SortMenu) {
|
import('sortMenu').then(({default: SortMenu}) => {
|
||||||
new SortMenu().show({
|
new SortMenu().show({
|
||||||
settingsKey: instance.getSettingsKey(),
|
settingsKey: instance.getSettingsKey(),
|
||||||
settings: instance.getSortValues(),
|
settings: instance.getSortValues(),
|
||||||
|
@ -387,10 +396,10 @@ define(['globalize', 'listView', 'layoutManager', 'userSettings', 'focusManager'
|
||||||
}
|
}
|
||||||
|
|
||||||
function onNewItemClick() {
|
function onNewItemClick() {
|
||||||
var instance = this;
|
const instance = this;
|
||||||
|
|
||||||
require(['playlistEditor'], function (playlistEditor) {
|
import('playlistEditor').then(({default: playlistEditor}) => {
|
||||||
new playlistEditor.showEditor({
|
new playlistEditor({
|
||||||
items: [],
|
items: [],
|
||||||
serverId: instance.params.serverId
|
serverId: instance.params.serverId
|
||||||
});
|
});
|
||||||
|
@ -398,22 +407,23 @@ define(['globalize', 'listView', 'layoutManager', 'userSettings', 'focusManager'
|
||||||
}
|
}
|
||||||
|
|
||||||
function hideOrShowAll(elems, hide) {
|
function hideOrShowAll(elems, hide) {
|
||||||
for (var i = 0, length = elems.length; i < length; i++) {
|
for (const elem of elems) {
|
||||||
if (hide) {
|
if (hide) {
|
||||||
elems[i].classList.add('hide');
|
elem.classList.add('hide');
|
||||||
} else {
|
} else {
|
||||||
elems[i].classList.remove('hide');
|
elem.classList.remove('hide');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function bindAll(elems, eventName, fn) {
|
function bindAll(elems, eventName, fn) {
|
||||||
for (var i = 0, length = elems.length; i < length; i++) {
|
for (const elem of elems) {
|
||||||
elems[i].addEventListener(eventName, fn);
|
elem.addEventListener(eventName, fn);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function ItemsView(view, params) {
|
class ItemsView {
|
||||||
|
constructor(view, params) {
|
||||||
function fetchData() {
|
function fetchData() {
|
||||||
return getItems(self, params, self.currentItem).then(function (result) {
|
return getItems(self, params, self.currentItem).then(function (result) {
|
||||||
if (self.totalItemCount == null) {
|
if (self.totalItemCount == null) {
|
||||||
|
@ -426,7 +436,7 @@ define(['globalize', 'listView', 'layoutManager', 'userSettings', 'focusManager'
|
||||||
}
|
}
|
||||||
|
|
||||||
function getItemsHtml(items) {
|
function getItemsHtml(items) {
|
||||||
var settings = self.getViewSettings();
|
const settings = self.getViewSettings();
|
||||||
|
|
||||||
if (settings.imageType === 'list') {
|
if (settings.imageType === 'list') {
|
||||||
return listView.getListViewHtml({
|
return listView.getListViewHtml({
|
||||||
|
@ -434,13 +444,13 @@ define(['globalize', 'listView', 'layoutManager', 'userSettings', 'focusManager'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
var shape;
|
let shape;
|
||||||
var preferThumb;
|
let preferThumb;
|
||||||
var preferDisc;
|
let preferDisc;
|
||||||
var preferLogo;
|
let preferLogo;
|
||||||
var defaultShape;
|
let defaultShape;
|
||||||
var item = self.currentItem;
|
const item = self.currentItem;
|
||||||
var lines = settings.showTitle ? 2 : 0;
|
let lines = settings.showTitle ? 2 : 0;
|
||||||
|
|
||||||
if (settings.imageType === 'banner') {
|
if (settings.imageType === 'banner') {
|
||||||
shape = 'banner';
|
shape = 'banner';
|
||||||
|
@ -464,7 +474,7 @@ define(['globalize', 'listView', 'layoutManager', 'userSettings', 'focusManager'
|
||||||
shape = 'autoVertical';
|
shape = 'autoVertical';
|
||||||
}
|
}
|
||||||
|
|
||||||
var posterOptions = {
|
let posterOptions = {
|
||||||
shape: shape,
|
shape: shape,
|
||||||
showTitle: settings.showTitle,
|
showTitle: settings.showTitle,
|
||||||
showYear: settings.showTitle,
|
showYear: settings.showTitle,
|
||||||
|
@ -497,19 +507,19 @@ define(['globalize', 'listView', 'layoutManager', 'userSettings', 'focusManager'
|
||||||
lines = 1;
|
lines = 1;
|
||||||
} else if (params.type === 'Programs') {
|
} else if (params.type === 'Programs') {
|
||||||
lines = settings.showTitle ? 1 : 0;
|
lines = settings.showTitle ? 1 : 0;
|
||||||
var showParentTitle = settings.showTitle && params.IsMovie !== 'true';
|
const showParentTitle = settings.showTitle && params.IsMovie !== 'true';
|
||||||
|
|
||||||
if (showParentTitle) {
|
if (showParentTitle) {
|
||||||
lines++;
|
lines++;
|
||||||
}
|
}
|
||||||
|
|
||||||
var showAirTime = settings.showTitle && params.type !== 'Recordings';
|
const showAirTime = settings.showTitle && params.type !== 'Recordings';
|
||||||
|
|
||||||
if (showAirTime) {
|
if (showAirTime) {
|
||||||
lines++;
|
lines++;
|
||||||
}
|
}
|
||||||
|
|
||||||
var showYear = settings.showTitle && params.IsMovie === 'true' && params.type === 'Recordings';
|
const showYear = settings.showTitle && params.IsMovie === 'true' && params.type === 'Recordings';
|
||||||
|
|
||||||
if (showYear) {
|
if (showYear) {
|
||||||
lines++;
|
lines++;
|
||||||
|
@ -542,13 +552,13 @@ define(['globalize', 'listView', 'layoutManager', 'userSettings', 'focusManager'
|
||||||
|
|
||||||
function initAlphaPicker() {
|
function initAlphaPicker() {
|
||||||
self.scroller = view.querySelector('.scrollFrameY');
|
self.scroller = view.querySelector('.scrollFrameY');
|
||||||
var alphaPickerElement = self.alphaPickerElement;
|
const alphaPickerElement = self.alphaPickerElement;
|
||||||
|
|
||||||
alphaPickerElement.classList.add('alphaPicker-fixed-right');
|
alphaPickerElement.classList.add('alphaPicker-fixed-right');
|
||||||
alphaPickerElement.classList.add('focuscontainer-right');
|
alphaPickerElement.classList.add('focuscontainer-right');
|
||||||
self.itemsContainer.parentNode.classList.add('padded-right-withalphapicker');
|
self.itemsContainer.parentNode.classList.add('padded-right-withalphapicker');
|
||||||
|
|
||||||
self.alphaPicker = new AlphaPicker.default({
|
self.alphaPicker = new AlphaPicker({
|
||||||
element: alphaPickerElement,
|
element: alphaPickerElement,
|
||||||
itemsContainer: layoutManager.tv ? self.itemsContainer : null,
|
itemsContainer: layoutManager.tv ? self.itemsContainer : null,
|
||||||
itemClass: 'card',
|
itemClass: 'card',
|
||||||
|
@ -653,7 +663,7 @@ define(['globalize', 'listView', 'layoutManager', 'userSettings', 'focusManager'
|
||||||
}
|
}
|
||||||
|
|
||||||
function play() {
|
function play() {
|
||||||
var currentItem = self.currentItem;
|
const currentItem = self.currentItem;
|
||||||
|
|
||||||
if (currentItem && !self.hasFilters) {
|
if (currentItem && !self.hasFilters) {
|
||||||
playbackManager.play({
|
playbackManager.play({
|
||||||
|
@ -669,7 +679,7 @@ define(['globalize', 'listView', 'layoutManager', 'userSettings', 'focusManager'
|
||||||
}
|
}
|
||||||
|
|
||||||
function queue() {
|
function queue() {
|
||||||
var currentItem = self.currentItem;
|
const currentItem = self.currentItem;
|
||||||
|
|
||||||
if (currentItem && !self.hasFilters) {
|
if (currentItem && !self.hasFilters) {
|
||||||
playbackManager.queue({
|
playbackManager.queue({
|
||||||
|
@ -685,7 +695,7 @@ define(['globalize', 'listView', 'layoutManager', 'userSettings', 'focusManager'
|
||||||
}
|
}
|
||||||
|
|
||||||
function shuffle() {
|
function shuffle() {
|
||||||
var currentItem = self.currentItem;
|
const currentItem = self.currentItem;
|
||||||
|
|
||||||
if (currentItem && !self.hasFilters) {
|
if (currentItem && !self.hasFilters) {
|
||||||
playbackManager.shuffle(currentItem);
|
playbackManager.shuffle(currentItem);
|
||||||
|
@ -698,7 +708,7 @@ define(['globalize', 'listView', 'layoutManager', 'userSettings', 'focusManager'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var self = this;
|
const self = this;
|
||||||
self.params = params;
|
self.params = params;
|
||||||
this.itemsContainer = view.querySelector('.itemsContainer');
|
this.itemsContainer = view.querySelector('.itemsContainer');
|
||||||
|
|
||||||
|
@ -712,20 +722,17 @@ define(['globalize', 'listView', 'layoutManager', 'userSettings', 'focusManager'
|
||||||
this.itemsContainer.setAttribute('data-refreshinterval', '300000');
|
this.itemsContainer.setAttribute('data-refreshinterval', '300000');
|
||||||
}
|
}
|
||||||
|
|
||||||
var i;
|
const btnViewSettings = view.querySelectorAll('.btnViewSettings');
|
||||||
var length;
|
|
||||||
var btnViewSettings = view.querySelectorAll('.btnViewSettings');
|
|
||||||
|
|
||||||
for (i = 0, length = btnViewSettings.length; i < length; i++) {
|
for (const btnViewSetting of btnViewSettings) {
|
||||||
btnViewSettings[i].addEventListener('click', showViewSettingsMenu.bind(this));
|
btnViewSetting.addEventListener('click', showViewSettingsMenu.bind(this));
|
||||||
}
|
}
|
||||||
|
|
||||||
var filterButtons = view.querySelectorAll('.btnFilter');
|
const filterButtons = view.querySelectorAll('.btnFilter');
|
||||||
this.filterButtons = filterButtons;
|
this.filterButtons = filterButtons;
|
||||||
var hasVisibleFilters = this.getVisibleFilters().length;
|
const hasVisibleFilters = this.getVisibleFilters().length;
|
||||||
|
|
||||||
for (i = 0, length = filterButtons.length; i < length; i++) {
|
for (const btnFilter of filterButtons) {
|
||||||
var btnFilter = filterButtons[i];
|
|
||||||
btnFilter.addEventListener('click', showFilterMenu.bind(this));
|
btnFilter.addEventListener('click', showFilterMenu.bind(this));
|
||||||
|
|
||||||
if (hasVisibleFilters) {
|
if (hasVisibleFilters) {
|
||||||
|
@ -735,10 +742,10 @@ define(['globalize', 'listView', 'layoutManager', 'userSettings', 'focusManager'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var sortButtons = view.querySelectorAll('.btnSort');
|
const sortButtons = view.querySelectorAll('.btnSort');
|
||||||
|
|
||||||
for (this.sortButtons = sortButtons, i = 0, length = sortButtons.length; i < length; i++) {
|
this.sortButtons = sortButtons;
|
||||||
var sortButton = sortButtons[i];
|
for (const sortButton of sortButtons) {
|
||||||
sortButton.addEventListener('click', showSortMenu.bind(this));
|
sortButton.addEventListener('click', showSortMenu.bind(this));
|
||||||
|
|
||||||
if (params.type !== 'nextup') {
|
if (params.type !== 'nextup') {
|
||||||
|
@ -753,7 +760,7 @@ define(['globalize', 'listView', 'layoutManager', 'userSettings', 'focusManager'
|
||||||
self.itemsContainer.fetchData = fetchData;
|
self.itemsContainer.fetchData = fetchData;
|
||||||
self.itemsContainer.getItemsHtml = getItemsHtml;
|
self.itemsContainer.getItemsHtml = getItemsHtml;
|
||||||
view.addEventListener('viewshow', function (e) {
|
view.addEventListener('viewshow', function (e) {
|
||||||
var isRestored = e.detail.isRestored;
|
const isRestored = e.detail.isRestored;
|
||||||
|
|
||||||
if (!isRestored) {
|
if (!isRestored) {
|
||||||
loading.show();
|
loading.show();
|
||||||
|
@ -765,7 +772,7 @@ define(['globalize', 'listView', 'layoutManager', 'userSettings', 'focusManager'
|
||||||
getItem(params).then(function (item) {
|
getItem(params).then(function (item) {
|
||||||
setTitle(item);
|
setTitle(item);
|
||||||
self.currentItem = item;
|
self.currentItem = item;
|
||||||
var refresh = !isRestored;
|
const refresh = !isRestored;
|
||||||
self.itemsContainer.resume({
|
self.itemsContainer.resume({
|
||||||
refresh: refresh
|
refresh: refresh
|
||||||
}).then(function () {
|
}).then(function () {
|
||||||
|
@ -780,7 +787,7 @@ define(['globalize', 'listView', 'layoutManager', 'userSettings', 'focusManager'
|
||||||
initAlphaPicker();
|
initAlphaPicker();
|
||||||
}
|
}
|
||||||
|
|
||||||
var itemType = item ? item.Type : null;
|
const itemType = item ? item.Type : null;
|
||||||
|
|
||||||
if (itemType === 'MusicGenre' || params.type !== 'Programs' && itemType !== 'Channel') {
|
if (itemType === 'MusicGenre' || params.type !== 'Programs' && itemType !== 'Channel') {
|
||||||
hideOrShowAll(view.querySelectorAll('.btnPlay'), false);
|
hideOrShowAll(view.querySelectorAll('.btnPlay'), false);
|
||||||
|
@ -807,18 +814,18 @@ define(['globalize', 'listView', 'layoutManager', 'userSettings', 'focusManager'
|
||||||
bindAll(view.querySelectorAll('.btnShuffle'), 'click', shuffle);
|
bindAll(view.querySelectorAll('.btnShuffle'), 'click', shuffle);
|
||||||
}
|
}
|
||||||
|
|
||||||
self.alphaNumericShortcuts = new AlphaNumericShortcuts.default({
|
self.alphaNumericShortcuts = new AlphaNumericShortcuts({
|
||||||
itemsContainer: self.itemsContainer
|
itemsContainer: self.itemsContainer
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
view.addEventListener('viewhide', function (e) {
|
view.addEventListener('viewhide', function (e) {
|
||||||
var itemsContainer = self.itemsContainer;
|
const itemsContainer = self.itemsContainer;
|
||||||
|
|
||||||
if (itemsContainer) {
|
if (itemsContainer) {
|
||||||
itemsContainer.pause();
|
itemsContainer.pause();
|
||||||
}
|
}
|
||||||
|
|
||||||
var alphaNumericShortcuts = self.alphaNumericShortcuts;
|
const alphaNumericShortcuts = self.alphaNumericShortcuts;
|
||||||
|
|
||||||
if (alphaNumericShortcuts) {
|
if (alphaNumericShortcuts) {
|
||||||
alphaNumericShortcuts.destroy();
|
alphaNumericShortcuts.destroy();
|
||||||
|
@ -846,8 +853,8 @@ define(['globalize', 'listView', 'layoutManager', 'userSettings', 'focusManager'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
ItemsView.prototype.getFilters = function () {
|
getFilters() {
|
||||||
var basekey = this.getSettingsKey();
|
const basekey = this.getSettingsKey();
|
||||||
return {
|
return {
|
||||||
IsPlayed: userSettings.getFilter(basekey + '-filter-IsPlayed') === 'true',
|
IsPlayed: userSettings.getFilter(basekey + '-filter-IsPlayed') === 'true',
|
||||||
IsUnplayed: userSettings.getFilter(basekey + '-filter-IsUnplayed') === 'true',
|
IsUnplayed: userSettings.getFilter(basekey + '-filter-IsUnplayed') === 'true',
|
||||||
|
@ -866,39 +873,37 @@ define(['globalize', 'listView', 'layoutManager', 'userSettings', 'focusManager'
|
||||||
HasThemeVideo: userSettings.getFilter(basekey + '-filter-HasThemeVideo'),
|
HasThemeVideo: userSettings.getFilter(basekey + '-filter-HasThemeVideo'),
|
||||||
GenreIds: userSettings.getFilter(basekey + '-filter-GenreIds')
|
GenreIds: userSettings.getFilter(basekey + '-filter-GenreIds')
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
ItemsView.prototype.getSortValues = function () {
|
getSortValues() {
|
||||||
var basekey = this.getSettingsKey();
|
const basekey = this.getSettingsKey();
|
||||||
return {
|
return {
|
||||||
sortBy: userSettings.getFilter(basekey + '-sortby') || this.getDefaultSortBy(),
|
sortBy: userSettings.getFilter(basekey + '-sortby') || this.getDefaultSortBy(),
|
||||||
sortOrder: userSettings.getFilter(basekey + '-sortorder') === 'Descending' ? 'Descending' : 'Ascending'
|
sortOrder: userSettings.getFilter(basekey + '-sortorder') === 'Descending' ? 'Descending' : 'Ascending'
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
ItemsView.prototype.getDefaultSortBy = function () {
|
getDefaultSortBy() {
|
||||||
var params = this.params;
|
const sortNameOption = this.getNameSortOption(this.params);
|
||||||
var sortNameOption = this.getNameSortOption(params);
|
|
||||||
|
|
||||||
if (params.type) {
|
if (this.params.type) {
|
||||||
return sortNameOption.value;
|
return sortNameOption.value;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 'IsFolder,' + sortNameOption.value;
|
return 'IsFolder,' + sortNameOption.value;
|
||||||
};
|
}
|
||||||
|
|
||||||
ItemsView.prototype.getSortMenuOptions = function () {
|
getSortMenuOptions() {
|
||||||
var sortBy = [];
|
const sortBy = [];
|
||||||
var params = this.params;
|
|
||||||
|
|
||||||
if (params.type === 'Programs') {
|
if (this.params.type === 'Programs') {
|
||||||
sortBy.push({
|
sortBy.push({
|
||||||
name: globalize.translate('AirDate'),
|
name: globalize.translate('AirDate'),
|
||||||
value: 'StartDate,SortName'
|
value: 'StartDate,SortName'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
var option = this.getNameSortOption(params);
|
let option = this.getNameSortOption(this.params);
|
||||||
|
|
||||||
if (option) {
|
if (option) {
|
||||||
sortBy.push(option);
|
sortBy.push(option);
|
||||||
|
@ -916,7 +921,7 @@ define(['globalize', 'listView', 'layoutManager', 'userSettings', 'focusManager'
|
||||||
sortBy.push(option);
|
sortBy.push(option);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (params.type !== 'Programs') {
|
if (this.params.type !== 'Programs') {
|
||||||
sortBy.push({
|
sortBy.push({
|
||||||
name: globalize.translate('DateAdded'),
|
name: globalize.translate('DateAdded'),
|
||||||
value: 'DateCreated,SortName'
|
value: 'DateCreated,SortName'
|
||||||
|
@ -929,8 +934,8 @@ define(['globalize', 'listView', 'layoutManager', 'userSettings', 'focusManager'
|
||||||
sortBy.push(option);
|
sortBy.push(option);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!params.type) {
|
if (!this.params.type) {
|
||||||
option = this.getNameSortOption(params);
|
option = this.getNameSortOption(this.params);
|
||||||
sortBy.push({
|
sortBy.push({
|
||||||
name: globalize.translate('Folders'),
|
name: globalize.translate('Folders'),
|
||||||
value: 'IsFolder,' + option.value
|
value: 'IsFolder,' + option.value
|
||||||
|
@ -956,9 +961,9 @@ define(['globalize', 'listView', 'layoutManager', 'userSettings', 'focusManager'
|
||||||
value: 'Runtime,SortName'
|
value: 'Runtime,SortName'
|
||||||
});
|
});
|
||||||
return sortBy;
|
return sortBy;
|
||||||
};
|
}
|
||||||
|
|
||||||
ItemsView.prototype.getNameSortOption = function (params) {
|
getNameSortOption(params) {
|
||||||
if (params.type === 'Episode') {
|
if (params.type === 'Episode') {
|
||||||
return {
|
return {
|
||||||
name: globalize.translate('Name'),
|
name: globalize.translate('Name'),
|
||||||
|
@ -970,9 +975,9 @@ define(['globalize', 'listView', 'layoutManager', 'userSettings', 'focusManager'
|
||||||
name: globalize.translate('Name'),
|
name: globalize.translate('Name'),
|
||||||
value: 'SortName'
|
value: 'SortName'
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
ItemsView.prototype.getPlayCountSortOption = function () {
|
getPlayCountSortOption() {
|
||||||
if (this.params.type === 'Programs') {
|
if (this.params.type === 'Programs') {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
@ -981,9 +986,9 @@ define(['globalize', 'listView', 'layoutManager', 'userSettings', 'focusManager'
|
||||||
name: globalize.translate('PlayCount'),
|
name: globalize.translate('PlayCount'),
|
||||||
value: 'PlayCount,SortName'
|
value: 'PlayCount,SortName'
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
ItemsView.prototype.getDatePlayedSortOption = function () {
|
getDatePlayedSortOption() {
|
||||||
if (this.params.type === 'Programs') {
|
if (this.params.type === 'Programs') {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
@ -992,9 +997,9 @@ define(['globalize', 'listView', 'layoutManager', 'userSettings', 'focusManager'
|
||||||
name: globalize.translate('DatePlayed'),
|
name: globalize.translate('DatePlayed'),
|
||||||
value: 'DatePlayed,SortName'
|
value: 'DatePlayed,SortName'
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
ItemsView.prototype.getCriticRatingSortOption = function () {
|
getCriticRatingSortOption() {
|
||||||
if (this.params.type === 'Programs') {
|
if (this.params.type === 'Programs') {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
@ -1003,18 +1008,18 @@ define(['globalize', 'listView', 'layoutManager', 'userSettings', 'focusManager'
|
||||||
name: globalize.translate('CriticRating'),
|
name: globalize.translate('CriticRating'),
|
||||||
value: 'CriticRating,SortName'
|
value: 'CriticRating,SortName'
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
ItemsView.prototype.getCommunityRatingSortOption = function () {
|
getCommunityRatingSortOption() {
|
||||||
return {
|
return {
|
||||||
name: globalize.translate('CommunityRating'),
|
name: globalize.translate('CommunityRating'),
|
||||||
value: 'CommunityRating,SortName'
|
value: 'CommunityRating,SortName'
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
ItemsView.prototype.getVisibleFilters = function () {
|
getVisibleFilters() {
|
||||||
var filters = [];
|
const filters = [];
|
||||||
var params = this.params;
|
const params = this.params;
|
||||||
|
|
||||||
if (!(params.type === 'nextup')) {
|
if (!(params.type === 'nextup')) {
|
||||||
if (params.type === 'Programs') {
|
if (params.type === 'Programs') {
|
||||||
|
@ -1038,16 +1043,15 @@ define(['globalize', 'listView', 'layoutManager', 'userSettings', 'focusManager'
|
||||||
}
|
}
|
||||||
|
|
||||||
return filters;
|
return filters;
|
||||||
};
|
}
|
||||||
|
|
||||||
ItemsView.prototype.setFilterStatus = function (hasFilters) {
|
setFilterStatus(hasFilters) {
|
||||||
this.hasFilters = hasFilters;
|
this.hasFilters = hasFilters;
|
||||||
var filterButtons = this.filterButtons;
|
const filterButtons = this.filterButtons;
|
||||||
|
|
||||||
if (filterButtons.length) {
|
if (filterButtons.length) {
|
||||||
for (var i = 0, length = filterButtons.length; i < length; i++) {
|
for (const btnFilter of filterButtons) {
|
||||||
var btnFilter = filterButtons[i];
|
let bubble = btnFilter.querySelector('.filterButtonBubble');
|
||||||
var bubble = btnFilter.querySelector('.filterButtonBubble');
|
|
||||||
|
|
||||||
if (!bubble) {
|
if (!bubble) {
|
||||||
if (!hasFilters) {
|
if (!hasFilters) {
|
||||||
|
@ -1066,10 +1070,10 @@ define(['globalize', 'listView', 'layoutManager', 'userSettings', 'focusManager'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
ItemsView.prototype.getFilterMenuOptions = function () {
|
getFilterMenuOptions() {
|
||||||
var params = this.params;
|
const params = this.params;
|
||||||
return {
|
return {
|
||||||
IsAiring: params.IsAiring,
|
IsAiring: params.IsAiring,
|
||||||
IsMovie: params.IsMovie,
|
IsMovie: params.IsMovie,
|
||||||
|
@ -1079,11 +1083,11 @@ define(['globalize', 'listView', 'layoutManager', 'userSettings', 'focusManager'
|
||||||
IsSeries: params.IsSeries,
|
IsSeries: params.IsSeries,
|
||||||
Recursive: this.queryRecursive
|
Recursive: this.queryRecursive
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
ItemsView.prototype.getVisibleViewSettings = function () {
|
getVisibleViewSettings() {
|
||||||
var item = (this.params, this.currentItem);
|
const item = (this.params, this.currentItem);
|
||||||
var fields = ['showTitle'];
|
const fields = ['showTitle'];
|
||||||
|
|
||||||
if (!item || item.Type !== 'PhotoAlbum' && item.Type !== 'ChannelFolderItem') {
|
if (!item || item.Type !== 'PhotoAlbum' && item.Type !== 'ChannelFolderItem') {
|
||||||
fields.push('imageType');
|
fields.push('imageType');
|
||||||
|
@ -1091,13 +1095,13 @@ define(['globalize', 'listView', 'layoutManager', 'userSettings', 'focusManager'
|
||||||
|
|
||||||
fields.push('viewType');
|
fields.push('viewType');
|
||||||
return fields;
|
return fields;
|
||||||
};
|
}
|
||||||
|
|
||||||
ItemsView.prototype.getViewSettings = function () {
|
getViewSettings() {
|
||||||
var basekey = this.getSettingsKey();
|
const basekey = this.getSettingsKey();
|
||||||
var params = this.params;
|
const params = this.params;
|
||||||
var item = this.currentItem;
|
const item = this.currentItem;
|
||||||
var showTitle = userSettings.get(basekey + '-showTitle');
|
let showTitle = userSettings.get(basekey + '-showTitle');
|
||||||
|
|
||||||
if (showTitle === 'true') {
|
if (showTitle === 'true') {
|
||||||
showTitle = true;
|
showTitle = true;
|
||||||
|
@ -1109,7 +1113,7 @@ define(['globalize', 'listView', 'layoutManager', 'userSettings', 'focusManager'
|
||||||
showTitle = true;
|
showTitle = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
var imageType = userSettings.get(basekey + '-imageType');
|
let imageType = userSettings.get(basekey + '-imageType');
|
||||||
|
|
||||||
if (!imageType && params.type === 'nextup') {
|
if (!imageType && params.type === 'nextup') {
|
||||||
imageType = 'thumb';
|
imageType = 'thumb';
|
||||||
|
@ -1121,10 +1125,10 @@ define(['globalize', 'listView', 'layoutManager', 'userSettings', 'focusManager'
|
||||||
imageType: imageType || 'primary',
|
imageType: imageType || 'primary',
|
||||||
viewType: userSettings.get(basekey + '-viewType') || 'images'
|
viewType: userSettings.get(basekey + '-viewType') || 'images'
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
ItemsView.prototype.getItemTypes = function () {
|
getItemTypes() {
|
||||||
var params = this.params;
|
const params = this.params;
|
||||||
|
|
||||||
if (params.type === 'nextup') {
|
if (params.type === 'nextup') {
|
||||||
return ['Episode'];
|
return ['Episode'];
|
||||||
|
@ -1135,12 +1139,12 @@ define(['globalize', 'listView', 'layoutManager', 'userSettings', 'focusManager'
|
||||||
}
|
}
|
||||||
|
|
||||||
return [];
|
return [];
|
||||||
};
|
}
|
||||||
|
|
||||||
ItemsView.prototype.getSettingsKey = function () {
|
getSettingsKey() {
|
||||||
var values = [];
|
const values = [];
|
||||||
values.push('items');
|
values.push('items');
|
||||||
var params = this.params;
|
const params = this.params;
|
||||||
|
|
||||||
if (params.type) {
|
if (params.type) {
|
||||||
values.push(params.type);
|
values.push(params.type);
|
||||||
|
@ -1197,7 +1201,9 @@ define(['globalize', 'listView', 'layoutManager', 'userSettings', 'focusManager'
|
||||||
}
|
}
|
||||||
|
|
||||||
return values.join('-');
|
return values.join('-');
|
||||||
};
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return ItemsView;
|
export default ItemsView;
|
||||||
});
|
|
||||||
|
/* eslint-enable indent */
|
||||||
|
|
|
@ -2,6 +2,7 @@ define(['layoutManager', 'userSettings', 'inputManager', 'loading', 'globalize',
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
loading = loading.default || loading;
|
loading = loading.default || loading;
|
||||||
|
layoutManager = layoutManager.default || layoutManager;
|
||||||
|
|
||||||
function enableScrollX() {
|
function enableScrollX() {
|
||||||
return !layoutManager.desktop;
|
return !layoutManager.desktop;
|
||||||
|
@ -169,9 +170,6 @@ define(['layoutManager', 'userSettings', 'inputManager', 'loading', 'globalize',
|
||||||
name: globalize.translate('HeaderSchedule')
|
name: globalize.translate('HeaderSchedule')
|
||||||
}, {
|
}, {
|
||||||
name: globalize.translate('TabSeries')
|
name: globalize.translate('TabSeries')
|
||||||
}, {
|
|
||||||
name: globalize.translate('ButtonSearch'),
|
|
||||||
cssClass: 'searchTabButton'
|
|
||||||
}];
|
}];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -255,9 +253,6 @@ define(['layoutManager', 'userSettings', 'inputManager', 'loading', 'globalize',
|
||||||
case 5:
|
case 5:
|
||||||
depends.push('controllers/livetv/livetvseriestimers');
|
depends.push('controllers/livetv/livetvseriestimers');
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 6:
|
|
||||||
depends.push('scripts/searchtab');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
require(depends, function (controllerFactory) {
|
require(depends, function (controllerFactory) {
|
||||||
|
|
|
@ -1,13 +1,18 @@
|
||||||
define(['loading', 'events', 'libraryBrowser', 'imageLoader', 'listView', 'cardBuilder', 'userSettings', 'globalize', 'emby-itemscontainer'], function (loading, events, libraryBrowser, imageLoader, listView, cardBuilder, userSettings, globalize) {
|
import loading from 'loading';
|
||||||
'use strict';
|
import libraryBrowser from 'libraryBrowser';
|
||||||
|
import imageLoader from 'imageLoader';
|
||||||
|
import listView from 'listView';
|
||||||
|
import cardBuilder from 'cardBuilder';
|
||||||
|
import * as userSettings from 'userSettings';
|
||||||
|
import globalize from 'globalize';
|
||||||
|
import 'emby-itemscontainer';
|
||||||
|
|
||||||
loading = loading.default || loading;
|
/* eslint-disable indent */
|
||||||
libraryBrowser = libraryBrowser.default || libraryBrowser;
|
|
||||||
|
|
||||||
return function (view, params, tabContent) {
|
export default function (view, params, tabContent) {
|
||||||
function getPageData(context) {
|
function getPageData(context) {
|
||||||
var key = getSavedQueryKey(context);
|
const key = getSavedQueryKey(context);
|
||||||
var pageData = data[key];
|
let pageData = data[key];
|
||||||
|
|
||||||
if (!pageData) {
|
if (!pageData) {
|
||||||
pageData = data[key] = {
|
pageData = data[key] = {
|
||||||
|
@ -47,9 +52,9 @@ define(['loading', 'events', 'libraryBrowser', 'imageLoader', 'listView', 'cardB
|
||||||
return context.savedQueryKey;
|
return context.savedQueryKey;
|
||||||
}
|
}
|
||||||
|
|
||||||
function onViewStyleChange() {
|
const onViewStyleChange = () => {
|
||||||
var viewStyle = self.getCurrentViewStyle();
|
const viewStyle = this.getCurrentViewStyle();
|
||||||
var itemsContainer = tabContent.querySelector('.itemsContainer');
|
const itemsContainer = tabContent.querySelector('.itemsContainer');
|
||||||
|
|
||||||
if (viewStyle == 'List') {
|
if (viewStyle == 'List') {
|
||||||
itemsContainer.classList.add('vertical-list');
|
itemsContainer.classList.add('vertical-list');
|
||||||
|
@ -60,13 +65,13 @@ define(['loading', 'events', 'libraryBrowser', 'imageLoader', 'listView', 'cardB
|
||||||
}
|
}
|
||||||
|
|
||||||
itemsContainer.innerHTML = '';
|
itemsContainer.innerHTML = '';
|
||||||
}
|
};
|
||||||
|
|
||||||
function reloadItems(page) {
|
const reloadItems = (page) => {
|
||||||
loading.show();
|
loading.show();
|
||||||
isLoading = true;
|
isLoading = true;
|
||||||
var query = getQuery(page);
|
const query = getQuery(page);
|
||||||
ApiClient.getItems(ApiClient.getCurrentUserId(), query).then(function (result) {
|
ApiClient.getItems(ApiClient.getCurrentUserId(), query).then((result) => {
|
||||||
function onNextPageClick() {
|
function onNextPageClick() {
|
||||||
if (isLoading) {
|
if (isLoading) {
|
||||||
return;
|
return;
|
||||||
|
@ -90,8 +95,8 @@ define(['loading', 'events', 'libraryBrowser', 'imageLoader', 'listView', 'cardB
|
||||||
}
|
}
|
||||||
|
|
||||||
window.scrollTo(0, 0);
|
window.scrollTo(0, 0);
|
||||||
var html;
|
let html;
|
||||||
var pagingHtml = libraryBrowser.getQueryPagingHtml({
|
const pagingHtml = libraryBrowser.getQueryPagingHtml({
|
||||||
startIndex: query.StartIndex,
|
startIndex: query.StartIndex,
|
||||||
limit: query.Limit,
|
limit: query.Limit,
|
||||||
totalRecordCount: result.TotalRecordCount,
|
totalRecordCount: result.TotalRecordCount,
|
||||||
|
@ -101,7 +106,7 @@ define(['loading', 'events', 'libraryBrowser', 'imageLoader', 'listView', 'cardB
|
||||||
sortButton: false,
|
sortButton: false,
|
||||||
filterButton: false
|
filterButton: false
|
||||||
});
|
});
|
||||||
var viewStyle = self.getCurrentViewStyle();
|
const viewStyle = this.getCurrentViewStyle();
|
||||||
if (viewStyle == 'Thumb') {
|
if (viewStyle == 'Thumb') {
|
||||||
html = cardBuilder.getCardsHtml({
|
html = cardBuilder.getCardsHtml({
|
||||||
items: result.Items,
|
items: result.Items,
|
||||||
|
@ -155,22 +160,21 @@ define(['loading', 'events', 'libraryBrowser', 'imageLoader', 'listView', 'cardB
|
||||||
showTitle: true
|
showTitle: true
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
var i;
|
|
||||||
var length;
|
|
||||||
var elems = tabContent.querySelectorAll('.paging');
|
|
||||||
|
|
||||||
for (i = 0, length = elems.length; i < length; i++) {
|
let elems = tabContent.querySelectorAll('.paging');
|
||||||
elems[i].innerHTML = pagingHtml;
|
|
||||||
|
for (const elem of elems) {
|
||||||
|
elem.innerHTML = pagingHtml;
|
||||||
}
|
}
|
||||||
|
|
||||||
elems = tabContent.querySelectorAll('.btnNextPage');
|
elems = tabContent.querySelectorAll('.btnNextPage');
|
||||||
for (i = 0, length = elems.length; i < length; i++) {
|
for (const elem of elems) {
|
||||||
elems[i].addEventListener('click', onNextPageClick);
|
elem.addEventListener('click', onNextPageClick);
|
||||||
}
|
}
|
||||||
|
|
||||||
elems = tabContent.querySelectorAll('.btnPreviousPage');
|
elems = tabContent.querySelectorAll('.btnPreviousPage');
|
||||||
for (i = 0, length = elems.length; i < length; i++) {
|
for (const elem of elems) {
|
||||||
elems[i].addEventListener('click', onPreviousPageClick);
|
elem.addEventListener('click', onPreviousPageClick);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!result.Items.length) {
|
if (!result.Items.length) {
|
||||||
|
@ -182,28 +186,27 @@ define(['loading', 'events', 'libraryBrowser', 'imageLoader', 'listView', 'cardB
|
||||||
html += '</div>';
|
html += '</div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
var itemsContainer = tabContent.querySelector('.itemsContainer');
|
const itemsContainer = tabContent.querySelector('.itemsContainer');
|
||||||
itemsContainer.innerHTML = html;
|
itemsContainer.innerHTML = html;
|
||||||
imageLoader.lazyChildren(itemsContainer);
|
imageLoader.lazyChildren(itemsContainer);
|
||||||
libraryBrowser.saveQueryValues(getSavedQueryKey(page), query);
|
libraryBrowser.saveQueryValues(getSavedQueryKey(page), query);
|
||||||
loading.hide();
|
loading.hide();
|
||||||
isLoading = false;
|
isLoading = false;
|
||||||
|
|
||||||
require(['autoFocuser'], function (autoFocuser) {
|
import('autoFocuser').then(({default: autoFocuser}) => {
|
||||||
autoFocuser.autoFocus(page);
|
autoFocuser.autoFocus(page);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
};
|
||||||
|
|
||||||
var self = this;
|
const data = {};
|
||||||
var data = {};
|
let isLoading = false;
|
||||||
var isLoading = false;
|
|
||||||
|
|
||||||
self.getCurrentViewStyle = function () {
|
this.getCurrentViewStyle = function () {
|
||||||
return getPageData(tabContent).view;
|
return getPageData(tabContent).view;
|
||||||
};
|
};
|
||||||
|
|
||||||
function initPage(tabContent) {
|
const initPage = (tabContent) => {
|
||||||
tabContent.querySelector('.btnSort').addEventListener('click', function (e) {
|
tabContent.querySelector('.btnSort').addEventListener('click', function (e) {
|
||||||
libraryBrowser.showSortMenu({
|
libraryBrowser.showSortMenu({
|
||||||
items: [{
|
items: [{
|
||||||
|
@ -230,36 +233,37 @@ define(['loading', 'events', 'libraryBrowser', 'imageLoader', 'listView', 'cardB
|
||||||
button: e.target
|
button: e.target
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
var btnSelectView = tabContent.querySelector('.btnSelectView');
|
const btnSelectView = tabContent.querySelector('.btnSelectView');
|
||||||
btnSelectView.addEventListener('click', function (e) {
|
btnSelectView.addEventListener('click', function (e) {
|
||||||
libraryBrowser.showLayoutMenu(e.target, self.getCurrentViewStyle(), 'List,Poster,PosterCard,Thumb,ThumbCard'.split(','));
|
libraryBrowser.showLayoutMenu(e.target, this.getCurrentViewStyle(), 'List,Poster,PosterCard,Thumb,ThumbCard'.split(','));
|
||||||
});
|
});
|
||||||
btnSelectView.addEventListener('layoutchange', function (e) {
|
btnSelectView.addEventListener('layoutchange', function (e) {
|
||||||
var viewStyle = e.detail.viewStyle;
|
const viewStyle = e.detail.viewStyle;
|
||||||
getPageData(tabContent).view = viewStyle;
|
getPageData(tabContent).view = viewStyle;
|
||||||
libraryBrowser.saveViewSetting(getSavedQueryKey(tabContent), viewStyle);
|
libraryBrowser.saveViewSetting(getSavedQueryKey(tabContent), viewStyle);
|
||||||
getQuery(tabContent).StartIndex = 0;
|
getQuery(tabContent).StartIndex = 0;
|
||||||
onViewStyleChange();
|
onViewStyleChange();
|
||||||
reloadItems(tabContent);
|
reloadItems(tabContent);
|
||||||
});
|
});
|
||||||
tabContent.querySelector('.btnNewCollection').addEventListener('click', function () {
|
tabContent.querySelector('.btnNewCollection').addEventListener('click', () => {
|
||||||
require(['collectionEditor'], function (collectionEditor) {
|
import('collectionEditor').then(({default: collectionEditor}) => {
|
||||||
var serverId = ApiClient.serverInfo().Id;
|
const serverId = ApiClient.serverInfo().Id;
|
||||||
new collectionEditor.showEditor({
|
new collectionEditor.showEditor({
|
||||||
items: [],
|
items: [],
|
||||||
serverId: serverId
|
serverId: serverId
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
};
|
||||||
|
|
||||||
initPage(tabContent);
|
initPage(tabContent);
|
||||||
onViewStyleChange();
|
onViewStyleChange();
|
||||||
|
|
||||||
self.renderTab = function () {
|
this.renderTab = function () {
|
||||||
reloadItems(tabContent);
|
reloadItems(tabContent);
|
||||||
};
|
};
|
||||||
|
|
||||||
self.destroy = function () {};
|
this.destroy = function () {};
|
||||||
};
|
}
|
||||||
});
|
|
||||||
|
/* eslint-enable indent */
|
||||||
|
|
|
@ -1,13 +1,18 @@
|
||||||
define(['layoutManager', 'loading', 'libraryBrowser', 'cardBuilder', 'lazyLoader', 'apphost', 'globalize', 'appRouter', 'dom', 'emby-button'], function (layoutManager, loading, libraryBrowser, cardBuilder, lazyLoader, appHost, globalize, appRouter, dom) {
|
import layoutManager from 'layoutManager';
|
||||||
'use strict';
|
import loading from 'loading';
|
||||||
|
import libraryBrowser from 'libraryBrowser';
|
||||||
|
import cardBuilder from 'cardBuilder';
|
||||||
|
import lazyLoader from 'lazyLoader';
|
||||||
|
import globalize from 'globalize';
|
||||||
|
import appRouter from 'appRouter';
|
||||||
|
import 'emby-button';
|
||||||
|
|
||||||
loading = loading.default || loading;
|
/* eslint-disable indent */
|
||||||
libraryBrowser = libraryBrowser.default || libraryBrowser;
|
|
||||||
|
|
||||||
return function (view, params, tabContent) {
|
export default function (view, params, tabContent) {
|
||||||
function getPageData() {
|
function getPageData() {
|
||||||
var key = getSavedQueryKey();
|
const key = getSavedQueryKey();
|
||||||
var pageData = data[key];
|
let pageData = data[key];
|
||||||
|
|
||||||
if (!pageData) {
|
if (!pageData) {
|
||||||
pageData = data[key] = {
|
pageData = data[key] = {
|
||||||
|
@ -37,7 +42,7 @@ define(['layoutManager', 'loading', 'libraryBrowser', 'cardBuilder', 'lazyLoader
|
||||||
|
|
||||||
function getPromise() {
|
function getPromise() {
|
||||||
loading.show();
|
loading.show();
|
||||||
var query = getQuery();
|
const query = getQuery();
|
||||||
return ApiClient.getGenres(ApiClient.getCurrentUserId(), query);
|
return ApiClient.getGenres(ApiClient.getCurrentUserId(), query);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -53,18 +58,18 @@ define(['layoutManager', 'loading', 'libraryBrowser', 'cardBuilder', 'lazyLoader
|
||||||
return enableScrollX() ? 'overflowPortrait' : 'portrait';
|
return enableScrollX() ? 'overflowPortrait' : 'portrait';
|
||||||
}
|
}
|
||||||
|
|
||||||
function fillItemsContainer(entry) {
|
const fillItemsContainer = (entry) => {
|
||||||
var elem = entry.target;
|
const elem = entry.target;
|
||||||
var id = elem.getAttribute('data-id');
|
const id = elem.getAttribute('data-id');
|
||||||
var viewStyle = self.getCurrentViewStyle();
|
const viewStyle = this.getCurrentViewStyle();
|
||||||
var limit = viewStyle == 'Thumb' || viewStyle == 'ThumbCard' ? 5 : 9;
|
let limit = viewStyle == 'Thumb' || viewStyle == 'ThumbCard' ? 5 : 9;
|
||||||
|
|
||||||
if (enableScrollX()) {
|
if (enableScrollX()) {
|
||||||
limit = 10;
|
limit = 10;
|
||||||
}
|
}
|
||||||
|
|
||||||
var enableImageTypes = viewStyle == 'Thumb' || viewStyle == 'ThumbCard' ? 'Primary,Backdrop,Thumb' : 'Primary';
|
const enableImageTypes = viewStyle == 'Thumb' || viewStyle == 'ThumbCard' ? 'Primary,Backdrop,Thumb' : 'Primary';
|
||||||
var query = {
|
const query = {
|
||||||
SortBy: 'SortName',
|
SortBy: 'SortName',
|
||||||
SortOrder: 'Ascending',
|
SortOrder: 'Ascending',
|
||||||
IncludeItemTypes: 'Movie',
|
IncludeItemTypes: 'Movie',
|
||||||
|
@ -126,17 +131,17 @@ define(['layoutManager', 'loading', 'libraryBrowser', 'cardBuilder', 'lazyLoader
|
||||||
tabContent.querySelector('.btnMoreFromGenre' + id + ' .material-icons').classList.remove('hide');
|
tabContent.querySelector('.btnMoreFromGenre' + id + ' .material-icons').classList.remove('hide');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
};
|
||||||
|
|
||||||
function reloadItems(context, promise) {
|
function reloadItems(context, promise) {
|
||||||
var query = getQuery();
|
const query = getQuery();
|
||||||
promise.then(function (result) {
|
promise.then(function (result) {
|
||||||
var elem = context.querySelector('#items');
|
const elem = context.querySelector('#items');
|
||||||
var html = '';
|
let html = '';
|
||||||
var items = result.Items;
|
const items = result.Items;
|
||||||
|
|
||||||
for (var i = 0, length = items.length; i < length; i++) {
|
for (let i = 0, length = items.length; i < length; i++) {
|
||||||
var item = items[i];
|
const item = items[i];
|
||||||
|
|
||||||
html += '<div class="verticalSection">';
|
html += '<div class="verticalSection">';
|
||||||
html += '<div class="sectionTitleContainer sectionTitleContainer-cards padded-left">';
|
html += '<div class="sectionTitleContainer sectionTitleContainer-cards padded-left">';
|
||||||
|
@ -151,7 +156,7 @@ define(['layoutManager', 'loading', 'libraryBrowser', 'cardBuilder', 'lazyLoader
|
||||||
html += '</a>';
|
html += '</a>';
|
||||||
html += '</div>';
|
html += '</div>';
|
||||||
if (enableScrollX()) {
|
if (enableScrollX()) {
|
||||||
var scrollXClass = 'scrollX hiddenScrollX';
|
let scrollXClass = 'scrollX hiddenScrollX';
|
||||||
|
|
||||||
if (layoutManager.tv) {
|
if (layoutManager.tv) {
|
||||||
scrollXClass += 'smoothScrollX padded-top-focusscale padded-bottom-focusscale';
|
scrollXClass += 'smoothScrollX padded-top-focusscale padded-bottom-focusscale';
|
||||||
|
@ -182,37 +187,37 @@ define(['layoutManager', 'loading', 'libraryBrowser', 'cardBuilder', 'lazyLoader
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function fullyReload() {
|
const fullyReload = () => {
|
||||||
self.preRender();
|
this.preRender();
|
||||||
self.renderTab();
|
this.renderTab();
|
||||||
}
|
};
|
||||||
|
|
||||||
var self = this;
|
const data = {};
|
||||||
var data = {};
|
|
||||||
|
|
||||||
self.getViewStyles = function () {
|
this.getViewStyles = function () {
|
||||||
return 'Poster,PosterCard,Thumb,ThumbCard'.split(',');
|
return 'Poster,PosterCard,Thumb,ThumbCard'.split(',');
|
||||||
};
|
};
|
||||||
|
|
||||||
self.getCurrentViewStyle = function () {
|
this.getCurrentViewStyle = function () {
|
||||||
return getPageData().view;
|
return getPageData().view;
|
||||||
};
|
};
|
||||||
|
|
||||||
self.setCurrentViewStyle = function (viewStyle) {
|
this.setCurrentViewStyle = function (viewStyle) {
|
||||||
getPageData().view = viewStyle;
|
getPageData().view = viewStyle;
|
||||||
libraryBrowser.saveViewSetting(getSavedQueryKey(), viewStyle);
|
libraryBrowser.saveViewSetting(getSavedQueryKey(), viewStyle);
|
||||||
fullyReload();
|
fullyReload();
|
||||||
};
|
};
|
||||||
|
|
||||||
self.enableViewSelection = true;
|
this.enableViewSelection = true;
|
||||||
var promise;
|
let promise;
|
||||||
|
|
||||||
self.preRender = function () {
|
this.preRender = function () {
|
||||||
promise = getPromise();
|
promise = getPromise();
|
||||||
};
|
};
|
||||||
|
|
||||||
self.renderTab = function () {
|
this.renderTab = function () {
|
||||||
reloadItems(tabContent, promise);
|
reloadItems(tabContent, promise);
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
});
|
|
||||||
|
/* eslint-enable indent */
|
||||||
|
|
|
@ -1,12 +1,18 @@
|
||||||
define(['loading', 'layoutManager', 'userSettings', 'events', 'libraryBrowser', 'alphaPicker', 'listView', 'cardBuilder', 'globalize', 'emby-itemscontainer'], function (loading, layoutManager, userSettings, events, libraryBrowser, AlphaPicker, listView, cardBuilder, globalize) {
|
import loading from 'loading';
|
||||||
'use strict';
|
import * as userSettings from 'userSettings';
|
||||||
|
import events from 'events';
|
||||||
|
import libraryBrowser from 'libraryBrowser';
|
||||||
|
import AlphaPicker from 'alphaPicker';
|
||||||
|
import listView from 'listView';
|
||||||
|
import cardBuilder from 'cardBuilder';
|
||||||
|
import globalize from 'globalize';
|
||||||
|
import 'emby-itemscontainer';
|
||||||
|
|
||||||
loading = loading.default || loading;
|
/* eslint-disable indent */
|
||||||
libraryBrowser = libraryBrowser.default || libraryBrowser;
|
|
||||||
|
|
||||||
return function (view, params, tabContent, options) {
|
export default function (view, params, tabContent, options) {
|
||||||
function onViewStyleChange() {
|
const onViewStyleChange = () => {
|
||||||
if (self.getCurrentViewStyle() == 'List') {
|
if (this.getCurrentViewStyle() == 'List') {
|
||||||
itemsContainer.classList.add('vertical-list');
|
itemsContainer.classList.add('vertical-list');
|
||||||
itemsContainer.classList.remove('vertical-wrap');
|
itemsContainer.classList.remove('vertical-wrap');
|
||||||
} else {
|
} else {
|
||||||
|
@ -15,13 +21,13 @@ define(['loading', 'layoutManager', 'userSettings', 'events', 'libraryBrowser',
|
||||||
}
|
}
|
||||||
|
|
||||||
itemsContainer.innerHTML = '';
|
itemsContainer.innerHTML = '';
|
||||||
}
|
};
|
||||||
|
|
||||||
function updateFilterControls() {
|
const updateFilterControls = () => {
|
||||||
if (self.alphaPicker) {
|
if (this.alphaPicker) {
|
||||||
self.alphaPicker.value(query.NameStartsWithOrGreater);
|
this.alphaPicker.value(query.NameStartsWithOrGreater);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
};
|
||||||
|
|
||||||
function fetchData() {
|
function fetchData() {
|
||||||
isLoading = true;
|
isLoading = true;
|
||||||
|
@ -54,7 +60,7 @@ define(['loading', 'layoutManager', 'userSettings', 'events', 'libraryBrowser',
|
||||||
|
|
||||||
window.scrollTo(0, 0);
|
window.scrollTo(0, 0);
|
||||||
updateFilterControls();
|
updateFilterControls();
|
||||||
var pagingHtml = libraryBrowser.getQueryPagingHtml({
|
const pagingHtml = libraryBrowser.getQueryPagingHtml({
|
||||||
startIndex: query.StartIndex,
|
startIndex: query.StartIndex,
|
||||||
limit: query.Limit,
|
limit: query.Limit,
|
||||||
totalRecordCount: result.TotalRecordCount,
|
totalRecordCount: result.TotalRecordCount,
|
||||||
|
@ -64,35 +70,30 @@ define(['loading', 'layoutManager', 'userSettings', 'events', 'libraryBrowser',
|
||||||
sortButton: false,
|
sortButton: false,
|
||||||
filterButton: false
|
filterButton: false
|
||||||
});
|
});
|
||||||
var i;
|
|
||||||
var length;
|
|
||||||
var elems = tabContent.querySelectorAll('.paging');
|
|
||||||
|
|
||||||
for (i = 0, length = elems.length; i < length; i++) {
|
for (const elem of tabContent.querySelectorAll('.paging')) {
|
||||||
elems[i].innerHTML = pagingHtml;
|
elem.innerHTML = pagingHtml;
|
||||||
}
|
}
|
||||||
|
|
||||||
elems = tabContent.querySelectorAll('.btnNextPage');
|
for (const elem of tabContent.querySelectorAll('.btnNextPage')) {
|
||||||
for (i = 0, length = elems.length; i < length; i++) {
|
elem.addEventListener('click', onNextPageClick);
|
||||||
elems[i].addEventListener('click', onNextPageClick);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
elems = tabContent.querySelectorAll('.btnPreviousPage');
|
for (const elem of tabContent.querySelectorAll('.btnPreviousPage')) {
|
||||||
for (i = 0, length = elems.length; i < length; i++) {
|
elem.addEventListener('click', onPreviousPageClick);
|
||||||
elems[i].addEventListener('click', onPreviousPageClick);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
isLoading = false;
|
isLoading = false;
|
||||||
loading.hide();
|
loading.hide();
|
||||||
|
|
||||||
require(['autoFocuser'], function (autoFocuser) {
|
import('autoFocuser').then(({default: autoFocuser}) => {
|
||||||
autoFocuser.autoFocus(tabContent);
|
autoFocuser.autoFocus(tabContent);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function getItemsHtml(items) {
|
const getItemsHtml = (items) => {
|
||||||
var html;
|
let html;
|
||||||
var viewStyle = self.getCurrentViewStyle();
|
const viewStyle = this.getCurrentViewStyle();
|
||||||
|
|
||||||
if (viewStyle == 'Thumb') {
|
if (viewStyle == 'Thumb') {
|
||||||
html = cardBuilder.getCardsHtml({
|
html = cardBuilder.getCardsHtml({
|
||||||
|
@ -156,22 +157,22 @@ define(['loading', 'layoutManager', 'userSettings', 'events', 'libraryBrowser',
|
||||||
}
|
}
|
||||||
|
|
||||||
return html;
|
return html;
|
||||||
}
|
};
|
||||||
|
|
||||||
function initPage(tabContent) {
|
const initPage = (tabContent) => {
|
||||||
itemsContainer.fetchData = fetchData;
|
itemsContainer.fetchData = fetchData;
|
||||||
itemsContainer.getItemsHtml = getItemsHtml;
|
itemsContainer.getItemsHtml = getItemsHtml;
|
||||||
itemsContainer.afterRefresh = afterRefresh;
|
itemsContainer.afterRefresh = afterRefresh;
|
||||||
var alphaPickerElement = tabContent.querySelector('.alphaPicker');
|
let alphaPickerElement = tabContent.querySelector('.alphaPicker');
|
||||||
|
|
||||||
if (alphaPickerElement) {
|
if (alphaPickerElement) {
|
||||||
alphaPickerElement.addEventListener('alphavaluechanged', function (e) {
|
alphaPickerElement.addEventListener('alphavaluechanged', function (e) {
|
||||||
var newValue = e.detail.value;
|
let newValue = e.detail.value;
|
||||||
query.NameStartsWithOrGreater = newValue;
|
query.NameStartsWithOrGreater = newValue;
|
||||||
query.StartIndex = 0;
|
query.StartIndex = 0;
|
||||||
itemsContainer.refreshItems();
|
itemsContainer.refreshItems();
|
||||||
});
|
});
|
||||||
self.alphaPicker = new AlphaPicker.default({
|
this.alphaPicker = new AlphaPicker({
|
||||||
element: alphaPickerElement,
|
element: alphaPickerElement,
|
||||||
valueChangeEvent: 'click'
|
valueChangeEvent: 'click'
|
||||||
});
|
});
|
||||||
|
@ -181,14 +182,14 @@ define(['loading', 'layoutManager', 'userSettings', 'events', 'libraryBrowser',
|
||||||
itemsContainer.classList.add('padded-right-withalphapicker');
|
itemsContainer.classList.add('padded-right-withalphapicker');
|
||||||
}
|
}
|
||||||
|
|
||||||
var btnFilter = tabContent.querySelector('.btnFilter');
|
const btnFilter = tabContent.querySelector('.btnFilter');
|
||||||
|
|
||||||
if (btnFilter) {
|
if (btnFilter) {
|
||||||
btnFilter.addEventListener('click', function () {
|
btnFilter.addEventListener('click', () => {
|
||||||
self.showFilterMenu();
|
this.showFilterMenu();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
var btnSort = tabContent.querySelector('.btnSort');
|
const btnSort = tabContent.querySelector('.btnSort');
|
||||||
|
|
||||||
if (btnSort) {
|
if (btnSort) {
|
||||||
btnSort.addEventListener('click', function (e) {
|
btnSort.addEventListener('click', function (e) {
|
||||||
|
@ -231,24 +232,23 @@ define(['loading', 'layoutManager', 'userSettings', 'events', 'libraryBrowser',
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
var btnSelectView = tabContent.querySelector('.btnSelectView');
|
const btnSelectView = tabContent.querySelector('.btnSelectView');
|
||||||
btnSelectView.addEventListener('click', function (e) {
|
btnSelectView.addEventListener('click', function (e) {
|
||||||
libraryBrowser.showLayoutMenu(e.target, self.getCurrentViewStyle(), 'Banner,List,Poster,PosterCard,Thumb,ThumbCard'.split(','));
|
libraryBrowser.showLayoutMenu(e.target, this.getCurrentViewStyle, 'Banner,List,Poster,PosterCard,Thumb,ThumbCard'.split(','));
|
||||||
});
|
});
|
||||||
btnSelectView.addEventListener('layoutchange', function (e) {
|
btnSelectView.addEventListener('layoutchange', function (e) {
|
||||||
var viewStyle = e.detail.viewStyle;
|
let viewStyle = e.detail.viewStyle;
|
||||||
userSettings.set(savedViewKey, viewStyle);
|
userSettings.set(savedViewKey, viewStyle);
|
||||||
query.StartIndex = 0;
|
query.StartIndex = 0;
|
||||||
onViewStyleChange();
|
onViewStyleChange();
|
||||||
itemsContainer.refreshItems();
|
itemsContainer.refreshItems();
|
||||||
});
|
});
|
||||||
}
|
};
|
||||||
|
|
||||||
var self = this;
|
let itemsContainer = tabContent.querySelector('.itemsContainer');
|
||||||
var itemsContainer = tabContent.querySelector('.itemsContainer');
|
const savedQueryKey = params.topParentId + '-' + options.mode;
|
||||||
var savedQueryKey = params.topParentId + '-' + options.mode;
|
const savedViewKey = savedQueryKey + '-view';
|
||||||
var savedViewKey = savedQueryKey + '-view';
|
let query = {
|
||||||
var query = {
|
|
||||||
SortBy: 'SortName,ProductionYear',
|
SortBy: 'SortName,ProductionYear',
|
||||||
SortOrder: 'Ascending',
|
SortOrder: 'Ascending',
|
||||||
IncludeItemTypes: 'Movie',
|
IncludeItemTypes: 'Movie',
|
||||||
|
@ -264,7 +264,7 @@ define(['loading', 'layoutManager', 'userSettings', 'events', 'libraryBrowser',
|
||||||
query['Limit'] = userSettings.libraryPageSize();
|
query['Limit'] = userSettings.libraryPageSize();
|
||||||
}
|
}
|
||||||
|
|
||||||
var isLoading = false;
|
let isLoading = false;
|
||||||
|
|
||||||
if (options.mode === 'favorites') {
|
if (options.mode === 'favorites') {
|
||||||
query.IsFavorite = true;
|
query.IsFavorite = true;
|
||||||
|
@ -272,14 +272,14 @@ define(['loading', 'layoutManager', 'userSettings', 'events', 'libraryBrowser',
|
||||||
|
|
||||||
query = userSettings.loadQuerySettings(savedQueryKey, query);
|
query = userSettings.loadQuerySettings(savedQueryKey, query);
|
||||||
|
|
||||||
self.showFilterMenu = function () {
|
this.showFilterMenu = function () {
|
||||||
require(['components/filterdialog/filterdialog'], function ({default: filterDialogFactory}) {
|
import('components/filterdialog/filterdialog').then(({default: filterDialogFactory}) => {
|
||||||
var filterDialog = new filterDialogFactory({
|
let filterDialog = new filterDialogFactory({
|
||||||
query: query,
|
query: query,
|
||||||
mode: 'movies',
|
mode: 'movies',
|
||||||
serverId: ApiClient.serverId()
|
serverId: ApiClient.serverId()
|
||||||
});
|
});
|
||||||
events.on(filterDialog, 'filterchange', function () {
|
events.on(filterDialog, 'filterchange', () => {
|
||||||
query.StartIndex = 0;
|
query.StartIndex = 0;
|
||||||
itemsContainer.refreshItems();
|
itemsContainer.refreshItems();
|
||||||
});
|
});
|
||||||
|
@ -287,22 +287,23 @@ define(['loading', 'layoutManager', 'userSettings', 'events', 'libraryBrowser',
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
self.getCurrentViewStyle = function () {
|
this.getCurrentViewStyle = function () {
|
||||||
return userSettings.get(savedViewKey) || 'Poster';
|
return userSettings.get(savedViewKey) || 'Poster';
|
||||||
};
|
};
|
||||||
|
|
||||||
self.initTab = function () {
|
this.initTab = function () {
|
||||||
initPage(tabContent);
|
initPage(tabContent);
|
||||||
onViewStyleChange();
|
onViewStyleChange();
|
||||||
};
|
};
|
||||||
|
|
||||||
self.renderTab = function () {
|
this.renderTab = function () {
|
||||||
itemsContainer.refreshItems();
|
itemsContainer.refreshItems();
|
||||||
updateFilterControls();
|
updateFilterControls();
|
||||||
};
|
};
|
||||||
|
|
||||||
self.destroy = function () {
|
this.destroy = function () {
|
||||||
itemsContainer = null;
|
itemsContainer = null;
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
});
|
|
||||||
|
/* eslint-enable indent */
|
||||||
|
|
|
@ -1,7 +1,20 @@
|
||||||
define(['events', 'layoutManager', 'inputManager', 'userSettings', 'libraryMenu', 'mainTabsManager', 'cardBuilder', 'dom', 'imageLoader', 'playbackManager', 'globalize', 'emby-scroller', 'emby-itemscontainer', 'emby-tabs', 'emby-button'], function (events, layoutManager, inputManager, userSettings, libraryMenu, mainTabsManager, cardBuilder, dom, imageLoader, playbackManager, globalize) {
|
import events from 'events';
|
||||||
'use strict';
|
import layoutManager from 'layoutManager';
|
||||||
|
import inputManager from 'inputManager';
|
||||||
|
import * as userSettings from 'userSettings';
|
||||||
|
import libraryMenu from 'libraryMenu';
|
||||||
|
import * as mainTabsManager from 'mainTabsManager';
|
||||||
|
import cardBuilder from 'cardBuilder';
|
||||||
|
import dom from 'dom';
|
||||||
|
import imageLoader from 'imageLoader';
|
||||||
|
import playbackManager from 'playbackManager';
|
||||||
|
import globalize from 'globalize';
|
||||||
|
import 'emby-scroller';
|
||||||
|
import 'emby-itemscontainer';
|
||||||
|
import 'emby-tabs';
|
||||||
|
import 'emby-button';
|
||||||
|
|
||||||
playbackManager = playbackManager.default || playbackManager;
|
/* eslint-disable indent */
|
||||||
|
|
||||||
function enableScrollX() {
|
function enableScrollX() {
|
||||||
return !layoutManager.desktop;
|
return !layoutManager.desktop;
|
||||||
|
@ -16,7 +29,7 @@ define(['events', 'layoutManager', 'inputManager', 'userSettings', 'libraryMenu'
|
||||||
}
|
}
|
||||||
|
|
||||||
function loadLatest(page, userId, parentId) {
|
function loadLatest(page, userId, parentId) {
|
||||||
var options = {
|
const options = {
|
||||||
IncludeItemTypes: 'Movie',
|
IncludeItemTypes: 'Movie',
|
||||||
Limit: 18,
|
Limit: 18,
|
||||||
Fields: 'PrimaryImageAspectRatio,MediaSourceCount,BasicSyncInfo',
|
Fields: 'PrimaryImageAspectRatio,MediaSourceCount,BasicSyncInfo',
|
||||||
|
@ -26,8 +39,8 @@ define(['events', 'layoutManager', 'inputManager', 'userSettings', 'libraryMenu'
|
||||||
EnableTotalRecordCount: false
|
EnableTotalRecordCount: false
|
||||||
};
|
};
|
||||||
ApiClient.getJSON(ApiClient.getUrl('Users/' + userId + '/Items/Latest', options)).then(function (items) {
|
ApiClient.getJSON(ApiClient.getUrl('Users/' + userId + '/Items/Latest', options)).then(function (items) {
|
||||||
var allowBottomPadding = !enableScrollX();
|
const allowBottomPadding = !enableScrollX();
|
||||||
var container = page.querySelector('#recentlyAddedItems');
|
const container = page.querySelector('#recentlyAddedItems');
|
||||||
cardBuilder.buildCards(items, {
|
cardBuilder.buildCards(items, {
|
||||||
itemsContainer: container,
|
itemsContainer: container,
|
||||||
shape: getPortraitShape(),
|
shape: getPortraitShape(),
|
||||||
|
@ -45,8 +58,8 @@ define(['events', 'layoutManager', 'inputManager', 'userSettings', 'libraryMenu'
|
||||||
}
|
}
|
||||||
|
|
||||||
function loadResume(page, userId, parentId) {
|
function loadResume(page, userId, parentId) {
|
||||||
var screenWidth = dom.getWindowSize().innerWidth;
|
let screenWidth = dom.getWindowSize().innerWidth;
|
||||||
var options = {
|
const options = {
|
||||||
SortBy: 'DatePlayed',
|
SortBy: 'DatePlayed',
|
||||||
SortOrder: 'Descending',
|
SortOrder: 'Descending',
|
||||||
IncludeItemTypes: 'Movie',
|
IncludeItemTypes: 'Movie',
|
||||||
|
@ -67,8 +80,8 @@ define(['events', 'layoutManager', 'inputManager', 'userSettings', 'libraryMenu'
|
||||||
page.querySelector('#resumableSection').classList.add('hide');
|
page.querySelector('#resumableSection').classList.add('hide');
|
||||||
}
|
}
|
||||||
|
|
||||||
var allowBottomPadding = !enableScrollX();
|
const allowBottomPadding = !enableScrollX();
|
||||||
var container = page.querySelector('#resumableItems');
|
const container = page.querySelector('#resumableItems');
|
||||||
cardBuilder.buildCards(result.Items, {
|
cardBuilder.buildCards(result.Items, {
|
||||||
itemsContainer: container,
|
itemsContainer: container,
|
||||||
preferThumb: true,
|
preferThumb: true,
|
||||||
|
@ -88,8 +101,8 @@ define(['events', 'layoutManager', 'inputManager', 'userSettings', 'libraryMenu'
|
||||||
}
|
}
|
||||||
|
|
||||||
function getRecommendationHtml(recommendation) {
|
function getRecommendationHtml(recommendation) {
|
||||||
var html = '';
|
let html = '';
|
||||||
var title = '';
|
let title = '';
|
||||||
|
|
||||||
switch (recommendation.RecommendationType) {
|
switch (recommendation.RecommendationType) {
|
||||||
case 'SimilarToRecentlyPlayed':
|
case 'SimilarToRecentlyPlayed':
|
||||||
|
@ -113,7 +126,7 @@ define(['events', 'layoutManager', 'inputManager', 'userSettings', 'libraryMenu'
|
||||||
|
|
||||||
html += '<div class="verticalSection">';
|
html += '<div class="verticalSection">';
|
||||||
html += '<h2 class="sectionTitle sectionTitle-cards padded-left">' + title + '</h2>';
|
html += '<h2 class="sectionTitle sectionTitle-cards padded-left">' + title + '</h2>';
|
||||||
var allowBottomPadding = true;
|
const allowBottomPadding = true;
|
||||||
|
|
||||||
if (enableScrollX()) {
|
if (enableScrollX()) {
|
||||||
html += '<div is="emby-scroller" class="padded-top-focusscale padded-bottom-focusscale" data-mousewheel="false" data-centerfocus="true">';
|
html += '<div is="emby-scroller" class="padded-top-focusscale padded-bottom-focusscale" data-mousewheel="false" data-centerfocus="true">';
|
||||||
|
@ -141,8 +154,8 @@ define(['events', 'layoutManager', 'inputManager', 'userSettings', 'libraryMenu'
|
||||||
}
|
}
|
||||||
|
|
||||||
function loadSuggestions(page, userId, parentId) {
|
function loadSuggestions(page, userId, parentId) {
|
||||||
var screenWidth = dom.getWindowSize().innerWidth;
|
let screenWidth = dom.getWindowSize().innerWidth;
|
||||||
var url = ApiClient.getUrl('Movies/Recommendations', {
|
let url = ApiClient.getUrl('Movies/Recommendations', {
|
||||||
userId: userId,
|
userId: userId,
|
||||||
categoryLimit: 6,
|
categoryLimit: 6,
|
||||||
ItemLimit: screenWidth >= 1920 ? 8 : screenWidth >= 1600 ? 8 : screenWidth >= 1200 ? 6 : 5,
|
ItemLimit: screenWidth >= 1920 ? 8 : screenWidth >= 1600 ? 8 : screenWidth >= 1200 ? 6 : 5,
|
||||||
|
@ -157,9 +170,9 @@ define(['events', 'layoutManager', 'inputManager', 'userSettings', 'libraryMenu'
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var html = recommendations.map(getRecommendationHtml).join('');
|
const html = recommendations.map(getRecommendationHtml).join('');
|
||||||
page.querySelector('.noItemsMessage').classList.add('hide');
|
page.querySelector('.noItemsMessage').classList.add('hide');
|
||||||
var recs = page.querySelector('.recommendations');
|
let recs = page.querySelector('.recommendations');
|
||||||
recs.innerHTML = html;
|
recs.innerHTML = html;
|
||||||
imageLoader.lazyChildren(recs);
|
imageLoader.lazyChildren(recs);
|
||||||
|
|
||||||
|
@ -169,7 +182,7 @@ define(['events', 'layoutManager', 'inputManager', 'userSettings', 'libraryMenu'
|
||||||
}
|
}
|
||||||
|
|
||||||
function autoFocus(page) {
|
function autoFocus(page) {
|
||||||
require(['autoFocuser'], function (autoFocuser) {
|
import('autoFocuser').then(({default: autoFocuser}) => {
|
||||||
autoFocuser.autoFocus(page);
|
autoFocuser.autoFocus(page);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -195,17 +208,16 @@ define(['events', 'layoutManager', 'inputManager', 'userSettings', 'libraryMenu'
|
||||||
}
|
}
|
||||||
|
|
||||||
function initSuggestedTab(page, tabContent) {
|
function initSuggestedTab(page, tabContent) {
|
||||||
var containers = tabContent.querySelectorAll('.itemsContainer');
|
const containers = tabContent.querySelectorAll('.itemsContainer');
|
||||||
|
|
||||||
for (var i = 0, length = containers.length; i < length; i++) {
|
for (const container of containers) {
|
||||||
setScrollClasses(containers[i], enableScrollX());
|
setScrollClasses(container, enableScrollX());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function loadSuggestionsTab(view, params, tabContent) {
|
function loadSuggestionsTab(view, params, tabContent) {
|
||||||
var parentId = params.topParentId;
|
const parentId = params.topParentId;
|
||||||
var userId = ApiClient.getCurrentUserId();
|
const userId = ApiClient.getCurrentUserId();
|
||||||
console.debug('loadSuggestionsTab');
|
|
||||||
loadResume(tabContent, userId, parentId);
|
loadResume(tabContent, userId, parentId);
|
||||||
loadLatest(tabContent, userId, parentId);
|
loadLatest(tabContent, userId, parentId);
|
||||||
loadSuggestions(tabContent, userId, parentId);
|
loadSuggestions(tabContent, userId, parentId);
|
||||||
|
@ -224,9 +236,6 @@ define(['events', 'layoutManager', 'inputManager', 'userSettings', 'libraryMenu'
|
||||||
name: globalize.translate('TabCollections')
|
name: globalize.translate('TabCollections')
|
||||||
}, {
|
}, {
|
||||||
name: globalize.translate('TabGenres')
|
name: globalize.translate('TabGenres')
|
||||||
}, {
|
|
||||||
name: globalize.translate('ButtonSearch'),
|
|
||||||
cssClass: 'searchTabButton'
|
|
||||||
}];
|
}];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -249,13 +258,13 @@ define(['events', 'layoutManager', 'inputManager', 'userSettings', 'libraryMenu'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return function (view, params) {
|
export default function (view, params) {
|
||||||
function onBeforeTabChange(e) {
|
function onBeforeTabChange(e) {
|
||||||
preLoadTab(view, parseInt(e.detail.selectedTabIndex));
|
preLoadTab(view, parseInt(e.detail.selectedTabIndex));
|
||||||
}
|
}
|
||||||
|
|
||||||
function onTabChange(e) {
|
function onTabChange(e) {
|
||||||
var newIndex = parseInt(e.detail.selectedTabIndex);
|
const newIndex = parseInt(e.detail.selectedTabIndex);
|
||||||
loadTab(view, newIndex);
|
loadTab(view, newIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -267,52 +276,50 @@ define(['events', 'layoutManager', 'inputManager', 'userSettings', 'libraryMenu'
|
||||||
mainTabsManager.setTabs(view, currentTabIndex, getTabs, getTabContainers, onBeforeTabChange, onTabChange);
|
mainTabsManager.setTabs(view, currentTabIndex, getTabs, getTabContainers, onBeforeTabChange, onTabChange);
|
||||||
}
|
}
|
||||||
|
|
||||||
function getTabController(page, index, callback) {
|
const getTabController = (page, index, callback) => {
|
||||||
var depends = [];
|
let depends = '';
|
||||||
|
|
||||||
switch (index) {
|
switch (index) {
|
||||||
case 0:
|
case 0:
|
||||||
depends.push('controllers/movies/movies');
|
depends = 'controllers/movies/movies';
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 1:
|
case 1:
|
||||||
|
depends = 'controllers/movies/moviesrecommended.js';
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 2:
|
case 2:
|
||||||
depends.push('controllers/movies/movietrailers');
|
depends = 'controllers/movies/movietrailers';
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 3:
|
case 3:
|
||||||
depends.push('controllers/movies/movies');
|
depends = 'controllers/movies/movies';
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 4:
|
case 4:
|
||||||
depends.push('controllers/movies/moviecollections');
|
depends = 'controllers/movies/moviecollections';
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 5:
|
case 5:
|
||||||
depends.push('controllers/movies/moviegenres');
|
depends = 'controllers/movies/moviegenres';
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 6:
|
|
||||||
depends.push('scripts/searchtab');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
require(depends, function (controllerFactory) {
|
import(depends).then(({default: controllerFactory}) => {
|
||||||
var tabContent;
|
let tabContent;
|
||||||
|
|
||||||
if (index === suggestionsTabIndex) {
|
if (index === suggestionsTabIndex) {
|
||||||
tabContent = view.querySelector(".pageTabContent[data-index='" + index + "']");
|
tabContent = view.querySelector(".pageTabContent[data-index='" + index + "']");
|
||||||
self.tabContent = tabContent;
|
this.tabContent = tabContent;
|
||||||
}
|
}
|
||||||
|
|
||||||
var controller = tabControllers[index];
|
let controller = tabControllers[index];
|
||||||
|
|
||||||
if (!controller) {
|
if (!controller) {
|
||||||
tabContent = view.querySelector(".pageTabContent[data-index='" + index + "']");
|
tabContent = view.querySelector(".pageTabContent[data-index='" + index + "']");
|
||||||
|
|
||||||
if (index === suggestionsTabIndex) {
|
if (index === suggestionsTabIndex) {
|
||||||
controller = self;
|
controller = this;
|
||||||
} else if (index === 6) {
|
} else if (index === 6) {
|
||||||
controller = new controllerFactory(view, tabContent, {
|
controller = new controllerFactory(view, tabContent, {
|
||||||
collectionType: 'movies',
|
collectionType: 'movies',
|
||||||
|
@ -335,7 +342,7 @@ define(['events', 'layoutManager', 'inputManager', 'userSettings', 'libraryMenu'
|
||||||
|
|
||||||
callback(controller);
|
callback(controller);
|
||||||
});
|
});
|
||||||
}
|
};
|
||||||
|
|
||||||
function preLoadTab(page, index) {
|
function preLoadTab(page, index) {
|
||||||
getTabController(page, index, function (controller) {
|
getTabController(page, index, function (controller) {
|
||||||
|
@ -347,12 +354,12 @@ define(['events', 'layoutManager', 'inputManager', 'userSettings', 'libraryMenu'
|
||||||
|
|
||||||
function loadTab(page, index) {
|
function loadTab(page, index) {
|
||||||
currentTabIndex = index;
|
currentTabIndex = index;
|
||||||
getTabController(page, index, function (controller) {
|
getTabController(page, index, ((controller) => {
|
||||||
if (renderedTabs.indexOf(index) == -1) {
|
if (renderedTabs.indexOf(index) == -1) {
|
||||||
renderedTabs.push(index);
|
renderedTabs.push(index);
|
||||||
controller.renderTab();
|
controller.renderTab();
|
||||||
}
|
}
|
||||||
});
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
function onPlaybackStop(e, state) {
|
function onPlaybackStop(e, state) {
|
||||||
|
@ -370,22 +377,21 @@ define(['events', 'layoutManager', 'inputManager', 'userSettings', 'libraryMenu'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var self = this;
|
let currentTabIndex = parseInt(params.tab || getDefaultTabIndex(params.topParentId));
|
||||||
var currentTabIndex = parseInt(params.tab || getDefaultTabIndex(params.topParentId));
|
const suggestionsTabIndex = 1;
|
||||||
var suggestionsTabIndex = 1;
|
|
||||||
|
|
||||||
self.initTab = function () {
|
this.initTab = function () {
|
||||||
var tabContent = view.querySelector(".pageTabContent[data-index='" + suggestionsTabIndex + "']");
|
let tabContent = view.querySelector(".pageTabContent[data-index='" + suggestionsTabIndex + "']");
|
||||||
initSuggestedTab(view, tabContent);
|
initSuggestedTab(view, tabContent);
|
||||||
};
|
};
|
||||||
|
|
||||||
self.renderTab = function () {
|
this.renderTab = function () {
|
||||||
var tabContent = view.querySelector(".pageTabContent[data-index='" + suggestionsTabIndex + "']");
|
let tabContent = view.querySelector(".pageTabContent[data-index='" + suggestionsTabIndex + "']");
|
||||||
loadSuggestionsTab(view, params, tabContent);
|
loadSuggestionsTab(view, params, tabContent);
|
||||||
};
|
};
|
||||||
|
|
||||||
var tabControllers = [];
|
let tabControllers = [];
|
||||||
var renderedTabs = [];
|
let renderedTabs = [];
|
||||||
view.addEventListener('viewshow', function (e) {
|
view.addEventListener('viewshow', function (e) {
|
||||||
initTabs();
|
initTabs();
|
||||||
if (!view.getAttribute('data-title')) {
|
if (!view.getAttribute('data-title')) {
|
||||||
|
@ -405,15 +411,14 @@ define(['events', 'layoutManager', 'inputManager', 'userSettings', 'libraryMenu'
|
||||||
events.on(playbackManager, 'playbackstop', onPlaybackStop);
|
events.on(playbackManager, 'playbackstop', onPlaybackStop);
|
||||||
inputManager.on(window, onInputCommand);
|
inputManager.on(window, onInputCommand);
|
||||||
});
|
});
|
||||||
view.addEventListener('viewbeforehide', function (e) {
|
view.addEventListener('viewbeforehide', function () {
|
||||||
inputManager.off(window, onInputCommand);
|
inputManager.off(window, onInputCommand);
|
||||||
});
|
});
|
||||||
view.addEventListener('viewdestroy', function (e) {
|
for (const tabController of tabControllers) {
|
||||||
tabControllers.forEach(function (t) {
|
if (tabController.destroy) {
|
||||||
if (t.destroy) {
|
tabController.destroy();
|
||||||
t.destroy();
|
|
||||||
}
|
}
|
||||||
});
|
}
|
||||||
});
|
}
|
||||||
};
|
|
||||||
});
|
/* eslint-enable indent */
|
||||||
|
|
|
@ -1,13 +1,20 @@
|
||||||
define(['layoutManager', 'loading', 'events', 'libraryBrowser', 'imageLoader', 'alphaPicker', 'listView', 'cardBuilder', 'userSettings', 'globalize', 'emby-itemscontainer'], function (layoutManager, loading, events, libraryBrowser, imageLoader, AlphaPicker, listView, cardBuilder, userSettings, globalize) {
|
import loading from 'loading';
|
||||||
'use strict';
|
import events from 'events';
|
||||||
|
import libraryBrowser from 'libraryBrowser';
|
||||||
|
import imageLoader from 'imageLoader';
|
||||||
|
import AlphaPicker from 'alphaPicker';
|
||||||
|
import listView from 'listView';
|
||||||
|
import cardBuilder from 'cardBuilder';
|
||||||
|
import * as userSettings from 'userSettings';
|
||||||
|
import globalize from 'globalize';
|
||||||
|
import 'emby-itemscontainer';
|
||||||
|
|
||||||
loading = loading.default || loading;
|
/* eslint-disable indent */
|
||||||
libraryBrowser = libraryBrowser.default || libraryBrowser;
|
|
||||||
|
|
||||||
return function (view, params, tabContent) {
|
export default function (view, params, tabContent) {
|
||||||
function getPageData(context) {
|
function getPageData(context) {
|
||||||
var key = getSavedQueryKey(context);
|
const key = getSavedQueryKey(context);
|
||||||
var pageData = data[key];
|
let pageData = data[key];
|
||||||
|
|
||||||
if (!pageData) {
|
if (!pageData) {
|
||||||
pageData = data[key] = {
|
pageData = data[key] = {
|
||||||
|
@ -46,11 +53,11 @@ define(['layoutManager', 'loading', 'events', 'libraryBrowser', 'imageLoader', '
|
||||||
return context.savedQueryKey;
|
return context.savedQueryKey;
|
||||||
}
|
}
|
||||||
|
|
||||||
function reloadItems() {
|
const reloadItems = () => {
|
||||||
loading.show();
|
loading.show();
|
||||||
isLoading = true;
|
isLoading = true;
|
||||||
var query = getQuery(tabContent);
|
const query = getQuery(tabContent);
|
||||||
ApiClient.getItems(ApiClient.getCurrentUserId(), query).then(function (result) {
|
ApiClient.getItems(ApiClient.getCurrentUserId(), query).then((result) => {
|
||||||
function onNextPageClick() {
|
function onNextPageClick() {
|
||||||
if (isLoading) {
|
if (isLoading) {
|
||||||
return;
|
return;
|
||||||
|
@ -75,7 +82,7 @@ define(['layoutManager', 'loading', 'events', 'libraryBrowser', 'imageLoader', '
|
||||||
|
|
||||||
window.scrollTo(0, 0);
|
window.scrollTo(0, 0);
|
||||||
updateFilterControls(tabContent);
|
updateFilterControls(tabContent);
|
||||||
var pagingHtml = libraryBrowser.getQueryPagingHtml({
|
const pagingHtml = libraryBrowser.getQueryPagingHtml({
|
||||||
startIndex: query.StartIndex,
|
startIndex: query.StartIndex,
|
||||||
limit: query.Limit,
|
limit: query.Limit,
|
||||||
totalRecordCount: result.TotalRecordCount,
|
totalRecordCount: result.TotalRecordCount,
|
||||||
|
@ -85,8 +92,8 @@ define(['layoutManager', 'loading', 'events', 'libraryBrowser', 'imageLoader', '
|
||||||
sortButton: false,
|
sortButton: false,
|
||||||
filterButton: false
|
filterButton: false
|
||||||
});
|
});
|
||||||
var html;
|
let html;
|
||||||
var viewStyle = self.getCurrentViewStyle();
|
const viewStyle = this.getCurrentViewStyle();
|
||||||
|
|
||||||
if (viewStyle == 'Thumb') {
|
if (viewStyle == 'Thumb') {
|
||||||
html = cardBuilder.getCardsHtml({
|
html = cardBuilder.getCardsHtml({
|
||||||
|
@ -142,22 +149,20 @@ define(['layoutManager', 'loading', 'events', 'libraryBrowser', 'imageLoader', '
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
var i;
|
let elems = tabContent.querySelectorAll('.paging');
|
||||||
var length;
|
|
||||||
var elems = tabContent.querySelectorAll('.paging');
|
|
||||||
|
|
||||||
for (i = 0, length = elems.length; i < length; i++) {
|
for (const elem of elems) {
|
||||||
elems[i].innerHTML = pagingHtml;
|
elem.innerHTML = pagingHtml;
|
||||||
}
|
}
|
||||||
|
|
||||||
elems = tabContent.querySelectorAll('.btnNextPage');
|
elems = tabContent.querySelectorAll('.btnNextPage');
|
||||||
for (i = 0, length = elems.length; i < length; i++) {
|
for (const elem of elems) {
|
||||||
elems[i].addEventListener('click', onNextPageClick);
|
elem.addEventListener('click', onNextPageClick);
|
||||||
}
|
}
|
||||||
|
|
||||||
elems = tabContent.querySelectorAll('.btnPreviousPage');
|
elems = tabContent.querySelectorAll('.btnPreviousPage');
|
||||||
for (i = 0, length = elems.length; i < length; i++) {
|
for (const elem of elems) {
|
||||||
elems[i].addEventListener('click', onPreviousPageClick);
|
elem.addEventListener('click', onPreviousPageClick);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!result.Items.length) {
|
if (!result.Items.length) {
|
||||||
|
@ -169,27 +174,26 @@ define(['layoutManager', 'loading', 'events', 'libraryBrowser', 'imageLoader', '
|
||||||
html += '</div>';
|
html += '</div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
var itemsContainer = tabContent.querySelector('.itemsContainer');
|
const itemsContainer = tabContent.querySelector('.itemsContainer');
|
||||||
itemsContainer.innerHTML = html;
|
itemsContainer.innerHTML = html;
|
||||||
imageLoader.lazyChildren(itemsContainer);
|
imageLoader.lazyChildren(itemsContainer);
|
||||||
libraryBrowser.saveQueryValues(getSavedQueryKey(tabContent), query);
|
libraryBrowser.saveQueryValues(getSavedQueryKey(tabContent), query);
|
||||||
loading.hide();
|
loading.hide();
|
||||||
isLoading = false;
|
isLoading = false;
|
||||||
});
|
});
|
||||||
}
|
};
|
||||||
|
|
||||||
function updateFilterControls(tabContent) {
|
const updateFilterControls = (tabContent) => {
|
||||||
var query = getQuery(tabContent);
|
const query = getQuery(tabContent);
|
||||||
self.alphaPicker.value(query.NameStartsWithOrGreater);
|
this.alphaPicker.value(query.NameStartsWithOrGreater);
|
||||||
}
|
};
|
||||||
|
|
||||||
var self = this;
|
const data = {};
|
||||||
var data = {};
|
let isLoading = false;
|
||||||
var isLoading = false;
|
|
||||||
|
|
||||||
self.showFilterMenu = function () {
|
this.showFilterMenu = function () {
|
||||||
require(['components/filterdialog/filterdialog'], function ({default: filterDialogFactory}) {
|
import('components/filterdialog/filterdialog').then(({default: filterDialogFactory}) => {
|
||||||
var filterDialog = new filterDialogFactory({
|
const filterDialog = new filterDialogFactory({
|
||||||
query: getQuery(tabContent),
|
query: getQuery(tabContent),
|
||||||
mode: 'movies',
|
mode: 'movies',
|
||||||
serverId: ApiClient.serverId()
|
serverId: ApiClient.serverId()
|
||||||
|
@ -202,21 +206,21 @@ define(['layoutManager', 'loading', 'events', 'libraryBrowser', 'imageLoader', '
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
self.getCurrentViewStyle = function () {
|
this.getCurrentViewStyle = function () {
|
||||||
return getPageData(tabContent).view;
|
return getPageData(tabContent).view;
|
||||||
};
|
};
|
||||||
|
|
||||||
function initPage(tabContent) {
|
const initPage = (tabContent) => {
|
||||||
var alphaPickerElement = tabContent.querySelector('.alphaPicker');
|
const alphaPickerElement = tabContent.querySelector('.alphaPicker');
|
||||||
var itemsContainer = tabContent.querySelector('.itemsContainer');
|
const itemsContainer = tabContent.querySelector('.itemsContainer');
|
||||||
alphaPickerElement.addEventListener('alphavaluechanged', function (e) {
|
alphaPickerElement.addEventListener('alphavaluechanged', function (e) {
|
||||||
var newValue = e.detail.value;
|
const newValue = e.detail.value;
|
||||||
var query = getQuery(tabContent);
|
const query = getQuery(tabContent);
|
||||||
query.NameStartsWithOrGreater = newValue;
|
query.NameStartsWithOrGreater = newValue;
|
||||||
query.StartIndex = 0;
|
query.StartIndex = 0;
|
||||||
reloadItems();
|
reloadItems();
|
||||||
});
|
});
|
||||||
self.alphaPicker = new AlphaPicker.default({
|
this.alphaPicker = new AlphaPicker({
|
||||||
element: alphaPickerElement,
|
element: alphaPickerElement,
|
||||||
valueChangeEvent: 'click'
|
valueChangeEvent: 'click'
|
||||||
});
|
});
|
||||||
|
@ -226,7 +230,7 @@ define(['layoutManager', 'loading', 'events', 'libraryBrowser', 'imageLoader', '
|
||||||
itemsContainer.classList.add('padded-right-withalphapicker');
|
itemsContainer.classList.add('padded-right-withalphapicker');
|
||||||
|
|
||||||
tabContent.querySelector('.btnFilter').addEventListener('click', function () {
|
tabContent.querySelector('.btnFilter').addEventListener('click', function () {
|
||||||
self.showFilterMenu();
|
this.showFilterMenu();
|
||||||
});
|
});
|
||||||
tabContent.querySelector('.btnSort').addEventListener('click', function (e) {
|
tabContent.querySelector('.btnSort').addEventListener('click', function (e) {
|
||||||
libraryBrowser.showSortMenu({
|
libraryBrowser.showSortMenu({
|
||||||
|
@ -260,15 +264,16 @@ define(['layoutManager', 'loading', 'events', 'libraryBrowser', 'imageLoader', '
|
||||||
button: e.target
|
button: e.target
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
};
|
||||||
|
|
||||||
initPage(tabContent);
|
initPage(tabContent);
|
||||||
|
|
||||||
self.renderTab = function () {
|
this.renderTab = function () {
|
||||||
reloadItems();
|
reloadItems();
|
||||||
updateFilterControls(tabContent);
|
updateFilterControls(tabContent);
|
||||||
};
|
};
|
||||||
|
|
||||||
self.destroy = function () {};
|
this.destroy = function () {};
|
||||||
};
|
}
|
||||||
});
|
|
||||||
|
/* eslint-enable indent */
|
||||||
|
|
|
@ -191,9 +191,6 @@ import 'flexStyles';
|
||||||
name: globalize.translate('TabSongs')
|
name: globalize.translate('TabSongs')
|
||||||
}, {
|
}, {
|
||||||
name: globalize.translate('TabGenres')
|
name: globalize.translate('TabGenres')
|
||||||
}, {
|
|
||||||
name: globalize.translate('ButtonSearch'),
|
|
||||||
cssClass: 'searchTabButton'
|
|
||||||
}];
|
}];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -295,10 +292,6 @@ import 'flexStyles';
|
||||||
case 6:
|
case 6:
|
||||||
depends = 'controllers/music/musicgenres';
|
depends = 'controllers/music/musicgenres';
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 7:
|
|
||||||
depends = 'scripts/searchtab';
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
import(depends).then(({default: controllerFactory}) => {
|
import(depends).then(({default: controllerFactory}) => {
|
||||||
|
|
|
@ -30,9 +30,6 @@ import 'emby-button';
|
||||||
name: globalize.translate('TabNetworks')
|
name: globalize.translate('TabNetworks')
|
||||||
}, {
|
}, {
|
||||||
name: globalize.translate('TabEpisodes')
|
name: globalize.translate('TabEpisodes')
|
||||||
}, {
|
|
||||||
name: globalize.translate('ButtonSearch'),
|
|
||||||
cssClass: 'searchTabButton'
|
|
||||||
}];
|
}];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -217,10 +214,6 @@ import 'emby-button';
|
||||||
case 6:
|
case 6:
|
||||||
depends = 'controllers/shows/episodes';
|
depends = 'controllers/shows/episodes';
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 7:
|
|
||||||
depends = 'scripts/searchtab';
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
import(depends).then(({default: controllerFactory}) => {
|
import(depends).then(({default: controllerFactory}) => {
|
||||||
|
|
|
@ -230,3 +230,18 @@
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0.5em 0.75em;
|
padding: 0.5em 0.75em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* FIXME: 'sliderContainer' is used to wrap slider's pieces */
|
||||||
|
.sliderContainer-settings {
|
||||||
|
margin-bottom: 1.8em;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sliderContainer-settings .mdl-slider-container {
|
||||||
|
height: 2.83em; /* similar to emby-input with its 110% font-size */
|
||||||
|
}
|
||||||
|
|
||||||
|
.sliderLabel {
|
||||||
|
display: block;
|
||||||
|
margin-bottom: 0.25em;
|
||||||
|
}
|
||||||
|
|
|
@ -150,6 +150,16 @@ import 'emby-input';
|
||||||
this.classList.add('show-focus');
|
this.classList.add('show-focus');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const topContainer = dom.parentWithClass(this, 'sliderContainer-settings');
|
||||||
|
|
||||||
|
if (topContainer && this.getAttribute('label')) {
|
||||||
|
const label = this.ownerDocument.createElement('label');
|
||||||
|
label.innerHTML = this.getAttribute('label');
|
||||||
|
label.classList.add('sliderLabel');
|
||||||
|
label.htmlFor = this.id;
|
||||||
|
topContainer.insertBefore(label, topContainer.firstChild);
|
||||||
|
}
|
||||||
|
|
||||||
const containerElement = this.parentNode;
|
const containerElement = this.parentNode;
|
||||||
containerElement.classList.add('mdl-slider-container');
|
containerElement.classList.add('mdl-slider-container');
|
||||||
|
|
||||||
|
|
|
@ -1,15 +1,19 @@
|
||||||
define(["browser", "dom", "css!./navdrawer", "scrollStyles"], function (browser, dom) {
|
/* Cleaning this file properly is not neecessary, since it's an outdated library
|
||||||
"use strict";
|
* and will be replaced soon by a Vue component.
|
||||||
|
*/
|
||||||
|
|
||||||
browser = browser.default || browser;
|
import browser from 'browser';
|
||||||
|
import dom from 'dom';
|
||||||
|
import 'css!./navdrawer';
|
||||||
|
import 'scrollStyles';
|
||||||
|
|
||||||
return function (options) {
|
export default function (options) {
|
||||||
function getTouches(e) {
|
function getTouches(e) {
|
||||||
return e.changedTouches || e.targetTouches || e.touches;
|
return e.changedTouches || e.targetTouches || e.touches;
|
||||||
}
|
}
|
||||||
|
|
||||||
function onMenuTouchStart(e) {
|
function onMenuTouchStart(e) {
|
||||||
options.target.classList.remove("transition");
|
options.target.classList.remove('transition');
|
||||||
var touches = getTouches(e);
|
var touches = getTouches(e);
|
||||||
var touch = touches[0] || {};
|
var touch = touches[0] || {};
|
||||||
menuTouchStartX = touch.clientX;
|
menuTouchStartX = touch.clientX;
|
||||||
|
@ -32,27 +36,27 @@ define(["browser", "dom", "css!./navdrawer", "scrollStyles"], function (browser,
|
||||||
var deltaY = endY - (menuTouchStartY || 0);
|
var deltaY = endY - (menuTouchStartY || 0);
|
||||||
setVelocity(deltaX);
|
setVelocity(deltaX);
|
||||||
|
|
||||||
if (isOpen && 1 !== dragMode && deltaX > 0) {
|
if (isOpen && dragMode !== 1 && deltaX > 0) {
|
||||||
dragMode = 2;
|
dragMode = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (0 === dragMode && (!isOpen || Math.abs(deltaX) >= 10) && Math.abs(deltaY) < 5) {
|
if (dragMode === 0 && (!isOpen || Math.abs(deltaX) >= 10) && Math.abs(deltaY) < 5) {
|
||||||
dragMode = 1;
|
dragMode = 1;
|
||||||
scrollContainer.addEventListener("scroll", disableEvent);
|
scrollContainer.addEventListener('scroll', disableEvent);
|
||||||
self.showMask();
|
self.showMask();
|
||||||
} else if (0 === dragMode && Math.abs(deltaY) >= 5) {
|
} else if (dragMode === 0 && Math.abs(deltaY) >= 5) {
|
||||||
dragMode = 2;
|
dragMode = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (1 === dragMode) {
|
if (dragMode === 1) {
|
||||||
newPos = currentPos + deltaX;
|
newPos = currentPos + deltaX;
|
||||||
self.changeMenuPos();
|
self.changeMenuPos();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function onMenuTouchEnd(e) {
|
function onMenuTouchEnd(e) {
|
||||||
options.target.classList.add("transition");
|
options.target.classList.add('transition');
|
||||||
scrollContainer.removeEventListener("scroll", disableEvent);
|
scrollContainer.removeEventListener('scroll', disableEvent);
|
||||||
dragMode = 0;
|
dragMode = 0;
|
||||||
var touches = getTouches(e);
|
var touches = getTouches(e);
|
||||||
var touch = touches[0] || {};
|
var touch = touches[0] || {};
|
||||||
|
@ -71,9 +75,9 @@ define(["browser", "dom", "css!./navdrawer", "scrollStyles"], function (browser,
|
||||||
if (((getTouches(e)[0] || {}).clientX || 0) <= options.handleSize) {
|
if (((getTouches(e)[0] || {}).clientX || 0) <= options.handleSize) {
|
||||||
isPeeking = true;
|
isPeeking = true;
|
||||||
|
|
||||||
if (e.type === "touchstart") {
|
if (e.type === 'touchstart') {
|
||||||
dom.removeEventListener(edgeContainer, "touchmove", onEdgeTouchMove, {});
|
dom.removeEventListener(edgeContainer, 'touchmove', onEdgeTouchMove, {});
|
||||||
dom.addEventListener(edgeContainer, "touchmove", onEdgeTouchMove, {});
|
dom.addEventListener(edgeContainer, 'touchmove', onEdgeTouchMove, {});
|
||||||
}
|
}
|
||||||
|
|
||||||
onMenuTouchStart(e);
|
onMenuTouchStart(e);
|
||||||
|
@ -90,7 +94,7 @@ define(["browser", "dom", "css!./navdrawer", "scrollStyles"], function (browser,
|
||||||
function onEdgeTouchEnd(e) {
|
function onEdgeTouchEnd(e) {
|
||||||
if (isPeeking) {
|
if (isPeeking) {
|
||||||
isPeeking = false;
|
isPeeking = false;
|
||||||
dom.removeEventListener(edgeContainer, "touchmove", onEdgeTouchMove, {});
|
dom.removeEventListener(edgeContainer, 'touchmove', onEdgeTouchMove, {});
|
||||||
onMenuTouchEnd(e);
|
onMenuTouchEnd(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -144,8 +148,8 @@ define(["browser", "dom", "css!./navdrawer", "scrollStyles"], function (browser,
|
||||||
function onMaskTransitionEnd() {
|
function onMaskTransitionEnd() {
|
||||||
var classList = mask.classList;
|
var classList = mask.classList;
|
||||||
|
|
||||||
if (!classList.contains("backdrop")) {
|
if (!classList.contains('backdrop')) {
|
||||||
classList.add("hide");
|
classList.add('hide');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -157,10 +161,10 @@ define(["browser", "dom", "css!./navdrawer", "scrollStyles"], function (browser,
|
||||||
var startPoint = 0;
|
var startPoint = 0;
|
||||||
var countStart = 0;
|
var countStart = 0;
|
||||||
var velocity = 0;
|
var velocity = 0;
|
||||||
options.target.classList.add("transition");
|
options.target.classList.add('transition');
|
||||||
var dragMode = 0;
|
var dragMode = 0;
|
||||||
var scrollContainer = options.target.querySelector(".mainDrawer-scrollContainer");
|
var scrollContainer = options.target.querySelector('.mainDrawer-scrollContainer');
|
||||||
scrollContainer.classList.add("scrollY");
|
scrollContainer.classList.add('scrollY');
|
||||||
|
|
||||||
var TouchMenuLA = function () {
|
var TouchMenuLA = function () {
|
||||||
self = this;
|
self = this;
|
||||||
|
@ -175,13 +179,13 @@ define(["browser", "dom", "css!./navdrawer", "scrollStyles"], function (browser,
|
||||||
};
|
};
|
||||||
|
|
||||||
TouchMenuLA.prototype.initElements = function () {
|
TouchMenuLA.prototype.initElements = function () {
|
||||||
options.target.classList.add("touch-menu-la");
|
options.target.classList.add('touch-menu-la');
|
||||||
options.target.style.width = options.width + "px";
|
options.target.style.width = options.width + 'px';
|
||||||
options.target.style.left = -options.width + "px";
|
options.target.style.left = -options.width + 'px';
|
||||||
|
|
||||||
if (!options.disableMask) {
|
if (!options.disableMask) {
|
||||||
mask = document.createElement("div");
|
mask = document.createElement('div');
|
||||||
mask.className = "tmla-mask hide";
|
mask.className = 'tmla-mask hide';
|
||||||
document.body.appendChild(mask);
|
document.body.appendChild(mask);
|
||||||
dom.addEventListener(mask, dom.whichTransitionEvent(), onMaskTransitionEnd, {
|
dom.addEventListener(mask, dom.whichTransitionEvent(), onMaskTransitionEnd, {
|
||||||
passive: true
|
passive: true
|
||||||
|
@ -192,12 +196,12 @@ define(["browser", "dom", "css!./navdrawer", "scrollStyles"], function (browser,
|
||||||
var menuTouchStartX;
|
var menuTouchStartX;
|
||||||
var menuTouchStartY;
|
var menuTouchStartY;
|
||||||
var menuTouchStartTime;
|
var menuTouchStartTime;
|
||||||
var edgeContainer = document.querySelector(".mainDrawerHandle");
|
var edgeContainer = document.querySelector('.mainDrawerHandle');
|
||||||
var isPeeking = false;
|
var isPeeking = false;
|
||||||
|
|
||||||
TouchMenuLA.prototype.animateToPosition = function (pos) {
|
TouchMenuLA.prototype.animateToPosition = function (pos) {
|
||||||
requestAnimationFrame(function () {
|
requestAnimationFrame(function () {
|
||||||
options.target.style.transform = pos ? "translateX(" + pos + "px)" : "none";
|
options.target.style.transform = pos ? 'translateX(' + pos + 'px)' : 'none';
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -208,7 +212,7 @@ define(["browser", "dom", "css!./navdrawer", "scrollStyles"], function (browser,
|
||||||
};
|
};
|
||||||
|
|
||||||
TouchMenuLA.prototype.clickMaskClose = function () {
|
TouchMenuLA.prototype.clickMaskClose = function () {
|
||||||
mask.addEventListener("click", function () {
|
mask.addEventListener('click', function () {
|
||||||
self.close();
|
self.close();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
@ -235,7 +239,7 @@ define(["browser", "dom", "css!./navdrawer", "scrollStyles"], function (browser,
|
||||||
this.animateToPosition(options.width);
|
this.animateToPosition(options.width);
|
||||||
currentPos = options.width;
|
currentPos = options.width;
|
||||||
this.isVisible = true;
|
this.isVisible = true;
|
||||||
options.target.classList.add("drawer-open");
|
options.target.classList.add('drawer-open');
|
||||||
self.showMask();
|
self.showMask();
|
||||||
self.invoke(options.onChange);
|
self.invoke(options.onChange);
|
||||||
};
|
};
|
||||||
|
@ -244,7 +248,7 @@ define(["browser", "dom", "css!./navdrawer", "scrollStyles"], function (browser,
|
||||||
this.animateToPosition(0);
|
this.animateToPosition(0);
|
||||||
currentPos = 0;
|
currentPos = 0;
|
||||||
self.isVisible = false;
|
self.isVisible = false;
|
||||||
options.target.classList.remove("drawer-open");
|
options.target.classList.remove('drawer-open');
|
||||||
self.hideMask();
|
self.hideMask();
|
||||||
self.invoke(options.onChange);
|
self.invoke(options.onChange);
|
||||||
};
|
};
|
||||||
|
@ -261,13 +265,13 @@ define(["browser", "dom", "css!./navdrawer", "scrollStyles"], function (browser,
|
||||||
var backgroundTouchStartTime;
|
var backgroundTouchStartTime;
|
||||||
|
|
||||||
TouchMenuLA.prototype.showMask = function () {
|
TouchMenuLA.prototype.showMask = function () {
|
||||||
mask.classList.remove("hide");
|
mask.classList.remove('hide');
|
||||||
mask.classList.add("backdrop");
|
mask.classList.add('backdrop');
|
||||||
};
|
};
|
||||||
|
|
||||||
TouchMenuLA.prototype.hideMask = function () {
|
TouchMenuLA.prototype.hideMask = function () {
|
||||||
mask.classList.add("hide");
|
mask.classList.add('hide');
|
||||||
mask.classList.remove("backdrop");
|
mask.classList.remove('backdrop');
|
||||||
};
|
};
|
||||||
|
|
||||||
TouchMenuLA.prototype.invoke = function (fn) {
|
TouchMenuLA.prototype.invoke = function (fn) {
|
||||||
|
@ -284,26 +288,26 @@ define(["browser", "dom", "css!./navdrawer", "scrollStyles"], function (browser,
|
||||||
if (enabled) {
|
if (enabled) {
|
||||||
if (!_edgeSwipeEnabled) {
|
if (!_edgeSwipeEnabled) {
|
||||||
_edgeSwipeEnabled = true;
|
_edgeSwipeEnabled = true;
|
||||||
dom.addEventListener(edgeContainer, "touchstart", onEdgeTouchStart, {
|
dom.addEventListener(edgeContainer, 'touchstart', onEdgeTouchStart, {
|
||||||
passive: true
|
passive: true
|
||||||
});
|
});
|
||||||
dom.addEventListener(edgeContainer, "touchend", onEdgeTouchEnd, {
|
dom.addEventListener(edgeContainer, 'touchend', onEdgeTouchEnd, {
|
||||||
passive: true
|
passive: true
|
||||||
});
|
});
|
||||||
dom.addEventListener(edgeContainer, "touchcancel", onEdgeTouchEnd, {
|
dom.addEventListener(edgeContainer, 'touchcancel', onEdgeTouchEnd, {
|
||||||
passive: true
|
passive: true
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (_edgeSwipeEnabled) {
|
if (_edgeSwipeEnabled) {
|
||||||
_edgeSwipeEnabled = false;
|
_edgeSwipeEnabled = false;
|
||||||
dom.removeEventListener(edgeContainer, "touchstart", onEdgeTouchStart, {
|
dom.removeEventListener(edgeContainer, 'touchstart', onEdgeTouchStart, {
|
||||||
passive: true
|
passive: true
|
||||||
});
|
});
|
||||||
dom.removeEventListener(edgeContainer, "touchend", onEdgeTouchEnd, {
|
dom.removeEventListener(edgeContainer, 'touchend', onEdgeTouchEnd, {
|
||||||
passive: true
|
passive: true
|
||||||
});
|
});
|
||||||
dom.removeEventListener(edgeContainer, "touchcancel", onEdgeTouchEnd, {
|
dom.removeEventListener(edgeContainer, 'touchcancel', onEdgeTouchEnd, {
|
||||||
passive: true
|
passive: true
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -322,26 +326,26 @@ define(["browser", "dom", "css!./navdrawer", "scrollStyles"], function (browser,
|
||||||
self.initElements();
|
self.initElements();
|
||||||
|
|
||||||
if (browser.touch) {
|
if (browser.touch) {
|
||||||
dom.addEventListener(options.target, "touchstart", onMenuTouchStart, {
|
dom.addEventListener(options.target, 'touchstart', onMenuTouchStart, {
|
||||||
passive: true
|
passive: true
|
||||||
});
|
});
|
||||||
dom.addEventListener(options.target, "touchmove", onMenuTouchMove, {
|
dom.addEventListener(options.target, 'touchmove', onMenuTouchMove, {
|
||||||
passive: true
|
passive: true
|
||||||
});
|
});
|
||||||
dom.addEventListener(options.target, "touchend", onMenuTouchEnd, {
|
dom.addEventListener(options.target, 'touchend', onMenuTouchEnd, {
|
||||||
passive: true
|
passive: true
|
||||||
});
|
});
|
||||||
dom.addEventListener(options.target, "touchcancel", onMenuTouchEnd, {
|
dom.addEventListener(options.target, 'touchcancel', onMenuTouchEnd, {
|
||||||
passive: true
|
passive: true
|
||||||
});
|
});
|
||||||
dom.addEventListener(mask, "touchstart", onBackgroundTouchStart, {
|
dom.addEventListener(mask, 'touchstart', onBackgroundTouchStart, {
|
||||||
passive: true
|
passive: true
|
||||||
});
|
});
|
||||||
dom.addEventListener(mask, "touchmove", onBackgroundTouchMove, {});
|
dom.addEventListener(mask, 'touchmove', onBackgroundTouchMove, {});
|
||||||
dom.addEventListener(mask, "touchend", onBackgroundTouchEnd, {
|
dom.addEventListener(mask, 'touchend', onBackgroundTouchEnd, {
|
||||||
passive: true
|
passive: true
|
||||||
});
|
});
|
||||||
dom.addEventListener(mask, "touchcancel", onBackgroundTouchEnd, {
|
dom.addEventListener(mask, 'touchcancel', onBackgroundTouchEnd, {
|
||||||
passive: true
|
passive: true
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -350,5 +354,4 @@ define(["browser", "dom", "css!./navdrawer", "scrollStyles"], function (browser,
|
||||||
};
|
};
|
||||||
|
|
||||||
return new TouchMenuLA();
|
return new TouchMenuLA();
|
||||||
};
|
}
|
||||||
});
|
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
define(["events", "playbackManager", "pluginManager", "inputManager", "connectionManager", "userSettings"], function (events, playbackManager, pluginManager, inputManager, connectionManager, userSettings) {
|
import events from 'events';
|
||||||
"use strict";
|
import playbackManager from 'playbackManager';
|
||||||
|
import pluginManager from 'pluginManager';
|
||||||
playbackManager = playbackManager.default || playbackManager;
|
import inputManager from 'inputManager';
|
||||||
|
import connectionManager from 'connectionManager';
|
||||||
|
import * as userSettings from 'userSettings';
|
||||||
|
|
||||||
function getMinIdleTime() {
|
function getMinIdleTime() {
|
||||||
// Returns the minimum amount of idle time required before the screen saver can be displayed
|
// Returns the minimum amount of idle time required before the screen saver can be displayed
|
||||||
|
@ -9,33 +11,30 @@ define(["events", "playbackManager", "pluginManager", "inputManager", "connectio
|
||||||
return 180000;
|
return 180000;
|
||||||
}
|
}
|
||||||
|
|
||||||
var lastFunctionalEvent = 0;
|
let lastFunctionalEvent = 0;
|
||||||
|
|
||||||
function getFunctionalEventIdleTime() {
|
function getFunctionalEventIdleTime() {
|
||||||
return new Date().getTime() - lastFunctionalEvent;
|
return new Date().getTime() - lastFunctionalEvent;
|
||||||
}
|
}
|
||||||
|
|
||||||
events.on(playbackManager, "playbackstop", function (e, stopInfo) {
|
events.on(playbackManager, 'playbackstop', function (e, stopInfo) {
|
||||||
var state = stopInfo.state;
|
const state = stopInfo.state;
|
||||||
if (state.NowPlayingItem && state.NowPlayingItem.MediaType == "Video") {
|
if (state.NowPlayingItem && state.NowPlayingItem.MediaType == 'Video') {
|
||||||
lastFunctionalEvent = new Date().getTime();
|
lastFunctionalEvent = new Date().getTime();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
function getScreensaverPlugin(isLoggedIn) {
|
function getScreensaverPlugin(isLoggedIn) {
|
||||||
|
let option;
|
||||||
var option;
|
|
||||||
try {
|
try {
|
||||||
option = userSettings.get("screensaver", false);
|
option = userSettings.get('screensaver', false);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
option = isLoggedIn ? "backdropscreensaver" : "logoscreensaver";
|
option = isLoggedIn ? 'backdropscreensaver' : 'logoscreensaver';
|
||||||
}
|
}
|
||||||
|
|
||||||
var plugins = pluginManager.ofType("screensaver");
|
const plugins = pluginManager.ofType('screensaver');
|
||||||
|
|
||||||
for (var i = 0, length = plugins.length; i < length; i++) {
|
|
||||||
var plugin = plugins[i];
|
|
||||||
|
|
||||||
|
for (const plugin of plugins) {
|
||||||
if (plugin.id === option) {
|
if (plugin.id === option) {
|
||||||
return plugin;
|
return plugin;
|
||||||
}
|
}
|
||||||
|
@ -45,70 +44,66 @@ define(["events", "playbackManager", "pluginManager", "inputManager", "connectio
|
||||||
}
|
}
|
||||||
|
|
||||||
function ScreenSaverManager() {
|
function ScreenSaverManager() {
|
||||||
|
let activeScreenSaver;
|
||||||
var self = this;
|
|
||||||
var activeScreenSaver;
|
|
||||||
|
|
||||||
function showScreenSaver(screensaver) {
|
function showScreenSaver(screensaver) {
|
||||||
|
|
||||||
if (activeScreenSaver) {
|
if (activeScreenSaver) {
|
||||||
throw new Error("An existing screensaver is already active.");
|
throw new Error('An existing screensaver is already active.');
|
||||||
}
|
}
|
||||||
|
|
||||||
console.debug("Showing screensaver " + screensaver.name);
|
console.debug('Showing screensaver ' + screensaver.name);
|
||||||
|
|
||||||
screensaver.show();
|
screensaver.show();
|
||||||
activeScreenSaver = screensaver;
|
activeScreenSaver = screensaver;
|
||||||
|
|
||||||
if (screensaver.hideOnClick !== false) {
|
if (screensaver.hideOnClick !== false) {
|
||||||
window.addEventListener("click", hide, true);
|
window.addEventListener('click', hide, true);
|
||||||
}
|
}
|
||||||
if (screensaver.hideOnMouse !== false) {
|
if (screensaver.hideOnMouse !== false) {
|
||||||
window.addEventListener("mousemove", hide, true);
|
window.addEventListener('mousemove', hide, true);
|
||||||
}
|
}
|
||||||
if (screensaver.hideOnKey !== false) {
|
if (screensaver.hideOnKey !== false) {
|
||||||
window.addEventListener("keydown", hide, true);
|
window.addEventListener('keydown', hide, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function hide() {
|
function hide() {
|
||||||
if (activeScreenSaver) {
|
if (activeScreenSaver) {
|
||||||
console.debug("Hiding screensaver");
|
console.debug('Hiding screensaver');
|
||||||
activeScreenSaver.hide();
|
activeScreenSaver.hide();
|
||||||
activeScreenSaver = null;
|
activeScreenSaver = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
window.removeEventListener("click", hide, true);
|
window.removeEventListener('click', hide, true);
|
||||||
window.removeEventListener("mousemove", hide, true);
|
window.removeEventListener('mousemove', hide, true);
|
||||||
window.removeEventListener("keydown", hide, true);
|
window.removeEventListener('keydown', hide, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
self.isShowing = function () {
|
this.isShowing = () => {
|
||||||
return activeScreenSaver != null;
|
return activeScreenSaver != null;
|
||||||
};
|
};
|
||||||
|
|
||||||
self.show = function () {
|
this.show = function () {
|
||||||
var isLoggedIn;
|
let isLoggedIn;
|
||||||
var apiClient = connectionManager.currentApiClient();
|
const apiClient = connectionManager.currentApiClient();
|
||||||
|
|
||||||
if (apiClient && apiClient.isLoggedIn()) {
|
if (apiClient && apiClient.isLoggedIn()) {
|
||||||
isLoggedIn = true;
|
isLoggedIn = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
var screensaver = getScreensaverPlugin(isLoggedIn);
|
const screensaver = getScreensaverPlugin(isLoggedIn);
|
||||||
|
|
||||||
if (screensaver) {
|
if (screensaver) {
|
||||||
showScreenSaver(screensaver);
|
showScreenSaver(screensaver);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
self.hide = function () {
|
this.hide = function () {
|
||||||
hide();
|
hide();
|
||||||
};
|
};
|
||||||
|
|
||||||
function onInterval() {
|
const onInterval = () => {
|
||||||
|
if (this.isShowing()) {
|
||||||
if (self.isShowing()) {
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -124,11 +119,10 @@ define(["events", "playbackManager", "pluginManager", "inputManager", "connectio
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
self.show();
|
this.show();
|
||||||
}
|
};
|
||||||
|
|
||||||
setInterval(onInterval, 10000);
|
setInterval(onInterval, 10000);
|
||||||
}
|
}
|
||||||
|
|
||||||
return new ScreenSaverManager();
|
export default new ScreenSaverManager;
|
||||||
});
|
|
||||||
|
|
|
@ -1,8 +1,13 @@
|
||||||
define(['browser', 'layoutManager', 'dom', 'focusManager', 'ResizeObserver', 'scrollStyles'], function (browser, layoutManager, dom, focusManager, ResizeObserver) {
|
/* Cleaning this file properly is not neecessary, since it's an outdated library
|
||||||
'use strict';
|
* and will be replaced soon by a Vue component.
|
||||||
|
*/
|
||||||
|
|
||||||
browser = browser.default || browser;
|
import browser from 'browser';
|
||||||
focusManager = focusManager.default || focusManager;
|
import layoutManager from 'layoutManager';
|
||||||
|
import dom from 'dom';
|
||||||
|
import focusManager from 'focusManager';
|
||||||
|
import ResizeObserver from 'ResizeObserver';
|
||||||
|
import 'scrollStyles';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return type of the value.
|
* Return type of the value.
|
||||||
|
@ -55,19 +60,8 @@ define(['browser', 'layoutManager', 'dom', 'focusManager', 'ResizeObserver', 'sc
|
||||||
var dragTouchEvents = ['touchmove', 'touchend'];
|
var dragTouchEvents = ['touchmove', 'touchend'];
|
||||||
var wheelEvent = (document.implementation.hasFeature('Event.wheel', '3.0') ? 'wheel' : 'mousewheel');
|
var wheelEvent = (document.implementation.hasFeature('Event.wheel', '3.0') ? 'wheel' : 'mousewheel');
|
||||||
var interactiveElements = ['INPUT', 'SELECT', 'TEXTAREA'];
|
var interactiveElements = ['INPUT', 'SELECT', 'TEXTAREA'];
|
||||||
var tmpArray = [];
|
|
||||||
var time;
|
|
||||||
|
|
||||||
// Math shorthands
|
|
||||||
var abs = Math.abs;
|
|
||||||
var sqrt = Math.sqrt;
|
|
||||||
var pow = Math.pow;
|
|
||||||
var round = Math.round;
|
|
||||||
var max = Math.max;
|
|
||||||
var min = Math.min;
|
|
||||||
|
|
||||||
var scrollerFactory = function (frame, options) {
|
var scrollerFactory = function (frame, options) {
|
||||||
|
|
||||||
// Extend options
|
// Extend options
|
||||||
var o = Object.assign({}, {
|
var o = Object.assign({}, {
|
||||||
slidee: null, // Selector, DOM element, or jQuery object with DOM element representing SLIDEE.
|
slidee: null, // Selector, DOM element, or jQuery object with DOM element representing SLIDEE.
|
||||||
|
@ -100,11 +94,9 @@ define(['browser', 'layoutManager', 'dom', 'focusManager', 'ResizeObserver', 'sc
|
||||||
// native smooth scroll
|
// native smooth scroll
|
||||||
options.enableNativeScroll = true;
|
options.enableNativeScroll = true;
|
||||||
} else if (options.requireAnimation && (browser.animate || browser.supportsCssAnimation())) {
|
} else if (options.requireAnimation && (browser.animate || browser.supportsCssAnimation())) {
|
||||||
|
|
||||||
// transform is the only way to guarantee animation
|
// transform is the only way to guarantee animation
|
||||||
options.enableNativeScroll = false;
|
options.enableNativeScroll = false;
|
||||||
} else if (!layoutManager.tv || !browser.animate) {
|
} else if (!layoutManager.tv || !browser.animate) {
|
||||||
|
|
||||||
options.enableNativeScroll = true;
|
options.enableNativeScroll = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -165,9 +157,7 @@ define(['browser', 'layoutManager', 'dom', 'focusManager', 'ResizeObserver', 'sc
|
||||||
var frameSize = 0;
|
var frameSize = 0;
|
||||||
var slideeSize = 0;
|
var slideeSize = 0;
|
||||||
function ensureSizeInfo() {
|
function ensureSizeInfo() {
|
||||||
|
|
||||||
if (requiresReflow) {
|
if (requiresReflow) {
|
||||||
|
|
||||||
requiresReflow = false;
|
requiresReflow = false;
|
||||||
|
|
||||||
// Reset global variables
|
// Reset global variables
|
||||||
|
@ -176,7 +166,7 @@ define(['browser', 'layoutManager', 'dom', 'focusManager', 'ResizeObserver', 'sc
|
||||||
slideeSize = o.scrollWidth || Math.max(slideeElement[o.horizontal ? 'offsetWidth' : 'offsetHeight'], slideeElement[o.horizontal ? 'scrollWidth' : 'scrollHeight']);
|
slideeSize = o.scrollWidth || Math.max(slideeElement[o.horizontal ? 'offsetWidth' : 'offsetHeight'], slideeElement[o.horizontal ? 'scrollWidth' : 'scrollHeight']);
|
||||||
|
|
||||||
// Set position limits & relativess
|
// Set position limits & relativess
|
||||||
self._pos.end = max(slideeSize - frameSize, 0);
|
self._pos.end = Math.max(slideeSize - frameSize, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -189,11 +179,9 @@ define(['browser', 'layoutManager', 'dom', 'focusManager', 'ResizeObserver', 'sc
|
||||||
* @return {Void}
|
* @return {Void}
|
||||||
*/
|
*/
|
||||||
function load(isInit) {
|
function load(isInit) {
|
||||||
|
|
||||||
requiresReflow = true;
|
requiresReflow = true;
|
||||||
|
|
||||||
if (!isInit) {
|
if (!isInit) {
|
||||||
|
|
||||||
ensureSizeInfo();
|
ensureSizeInfo();
|
||||||
|
|
||||||
// Fix possible overflowing
|
// Fix possible overflowing
|
||||||
|
@ -203,7 +191,6 @@ define(['browser', 'layoutManager', 'dom', 'focusManager', 'ResizeObserver', 'sc
|
||||||
}
|
}
|
||||||
|
|
||||||
function initFrameResizeObserver() {
|
function initFrameResizeObserver() {
|
||||||
|
|
||||||
var observerOptions = {};
|
var observerOptions = {};
|
||||||
|
|
||||||
self.frameResizeObserver = new ResizeObserver(onResize, observerOptions);
|
self.frameResizeObserver = new ResizeObserver(onResize, observerOptions);
|
||||||
|
@ -228,16 +215,13 @@ define(['browser', 'layoutManager', 'dom', 'focusManager', 'ResizeObserver', 'sc
|
||||||
};
|
};
|
||||||
|
|
||||||
function nativeScrollTo(container, pos, immediate) {
|
function nativeScrollTo(container, pos, immediate) {
|
||||||
|
|
||||||
if (container.scroll) {
|
if (container.scroll) {
|
||||||
if (o.horizontal) {
|
if (o.horizontal) {
|
||||||
|
|
||||||
container.scroll({
|
container.scroll({
|
||||||
left: pos,
|
left: pos,
|
||||||
behavior: immediate ? 'instant' : 'smooth'
|
behavior: immediate ? 'instant' : 'smooth'
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
container.scroll({
|
container.scroll({
|
||||||
top: pos,
|
top: pos,
|
||||||
behavior: immediate ? 'instant' : 'smooth'
|
behavior: immediate ? 'instant' : 'smooth'
|
||||||
|
@ -269,14 +253,12 @@ define(['browser', 'layoutManager', 'dom', 'focusManager', 'ResizeObserver', 'sc
|
||||||
* @return {Void}
|
* @return {Void}
|
||||||
*/
|
*/
|
||||||
self.slideTo = function (newPos, immediate, fullItemPos) {
|
self.slideTo = function (newPos, immediate, fullItemPos) {
|
||||||
|
|
||||||
ensureSizeInfo();
|
ensureSizeInfo();
|
||||||
var pos = self._pos;
|
var pos = self._pos;
|
||||||
|
|
||||||
newPos = within(newPos, pos.start, pos.end);
|
newPos = within(newPos, pos.start, pos.end);
|
||||||
|
|
||||||
if (!transform) {
|
if (!transform) {
|
||||||
|
|
||||||
nativeScrollTo(nativeScrollElement, newPos, immediate);
|
nativeScrollTo(nativeScrollElement, newPos, immediate);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -294,7 +276,6 @@ define(['browser', 'layoutManager', 'dom', 'focusManager', 'ResizeObserver', 'sc
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!immediate && o.skipSlideToWhenVisible && fullItemPos && fullItemPos.isVisible) {
|
if (!immediate && o.skipSlideToWhenVisible && fullItemPos && fullItemPos.isVisible) {
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -306,7 +287,6 @@ define(['browser', 'layoutManager', 'dom', 'focusManager', 'ResizeObserver', 'sc
|
||||||
};
|
};
|
||||||
|
|
||||||
function setStyleProperty(elem, name, value, speed, resetTransition) {
|
function setStyleProperty(elem, name, value, speed, resetTransition) {
|
||||||
|
|
||||||
var style = elem.style;
|
var style = elem.style;
|
||||||
|
|
||||||
if (resetTransition || browser.edge) {
|
if (resetTransition || browser.edge) {
|
||||||
|
@ -328,7 +308,6 @@ define(['browser', 'layoutManager', 'dom', 'focusManager', 'ResizeObserver', 'sc
|
||||||
}
|
}
|
||||||
|
|
||||||
function renderAnimateWithTransform(fromPosition, toPosition, immediate) {
|
function renderAnimateWithTransform(fromPosition, toPosition, immediate) {
|
||||||
|
|
||||||
var speed = o.speed;
|
var speed = o.speed;
|
||||||
|
|
||||||
if (immediate) {
|
if (immediate) {
|
||||||
|
@ -336,9 +315,9 @@ define(['browser', 'layoutManager', 'dom', 'focusManager', 'ResizeObserver', 'sc
|
||||||
}
|
}
|
||||||
|
|
||||||
if (o.horizontal) {
|
if (o.horizontal) {
|
||||||
setStyleProperty(slideeElement, 'transform', 'translateX(' + (-round(toPosition)) + 'px)', speed);
|
setStyleProperty(slideeElement, 'transform', 'translateX(' + (-Math.round(toPosition)) + 'px)', speed);
|
||||||
} else {
|
} else {
|
||||||
setStyleProperty(slideeElement, 'transform', 'translateY(' + (-round(toPosition)) + 'px)', speed);
|
setStyleProperty(slideeElement, 'transform', 'translateY(' + (-Math.round(toPosition)) + 'px)', speed);
|
||||||
}
|
}
|
||||||
self._pos.cur = toPosition;
|
self._pos.cur = toPosition;
|
||||||
|
|
||||||
|
@ -346,7 +325,6 @@ define(['browser', 'layoutManager', 'dom', 'focusManager', 'ResizeObserver', 'sc
|
||||||
}
|
}
|
||||||
|
|
||||||
function getBoundingClientRect(elem) {
|
function getBoundingClientRect(elem) {
|
||||||
|
|
||||||
// Support: BlackBerry 5, iOS 3 (original iPhone)
|
// Support: BlackBerry 5, iOS 3 (original iPhone)
|
||||||
// If we don't have gBCR, just use 0,0 rather than error
|
// If we don't have gBCR, just use 0,0 rather than error
|
||||||
if (elem.getBoundingClientRect) {
|
if (elem.getBoundingClientRect) {
|
||||||
|
@ -364,14 +342,10 @@ define(['browser', 'layoutManager', 'dom', 'focusManager', 'ResizeObserver', 'sc
|
||||||
* @return {Object}
|
* @return {Object}
|
||||||
*/
|
*/
|
||||||
self.getPos = function (item) {
|
self.getPos = function (item) {
|
||||||
|
|
||||||
var scrollElement = transform ? slideeElement : nativeScrollElement;
|
var scrollElement = transform ? slideeElement : nativeScrollElement;
|
||||||
var slideeOffset = getBoundingClientRect(scrollElement);
|
var slideeOffset = getBoundingClientRect(scrollElement);
|
||||||
var itemOffset = getBoundingClientRect(item);
|
var itemOffset = getBoundingClientRect(item);
|
||||||
|
|
||||||
var slideeStartPos = o.horizontal ? slideeOffset.left : slideeOffset.top;
|
|
||||||
var slideeEndPos = o.horizontal ? slideeOffset.right : slideeOffset.bottom;
|
|
||||||
|
|
||||||
var offset = o.horizontal ? itemOffset.left - slideeOffset.left : itemOffset.top - slideeOffset.top;
|
var offset = o.horizontal ? itemOffset.left - slideeOffset.left : itemOffset.top - slideeOffset.top;
|
||||||
|
|
||||||
var size = o.horizontal ? itemOffset.width : itemOffset.height;
|
var size = o.horizontal ? itemOffset.width : itemOffset.height;
|
||||||
|
@ -408,7 +382,6 @@ define(['browser', 'layoutManager', 'dom', 'focusManager', 'ResizeObserver', 'sc
|
||||||
};
|
};
|
||||||
|
|
||||||
self.getCenterPosition = function (item) {
|
self.getCenterPosition = function (item) {
|
||||||
|
|
||||||
ensureSizeInfo();
|
ensureSizeInfo();
|
||||||
|
|
||||||
var pos = self.getPos(item);
|
var pos = self.getPos(item);
|
||||||
|
@ -453,7 +426,6 @@ define(['browser', 'layoutManager', 'dom', 'focusManager', 'ResizeObserver', 'sc
|
||||||
|
|
||||||
// Bind dragging events
|
// Bind dragging events
|
||||||
if (transform) {
|
if (transform) {
|
||||||
|
|
||||||
if (isTouch) {
|
if (isTouch) {
|
||||||
dragTouchEvents.forEach(function (eventName) {
|
dragTouchEvents.forEach(function (eventName) {
|
||||||
dom.addEventListener(document, eventName, dragHandler, {
|
dom.addEventListener(document, eventName, dragHandler, {
|
||||||
|
@ -482,7 +454,7 @@ define(['browser', 'layoutManager', 'dom', 'focusManager', 'ResizeObserver', 'sc
|
||||||
var pointer = dragging.touch ? event[dragging.released ? 'changedTouches' : 'touches'][0] : event;
|
var pointer = dragging.touch ? event[dragging.released ? 'changedTouches' : 'touches'][0] : event;
|
||||||
dragging.pathX = pointer.pageX - dragging.initX;
|
dragging.pathX = pointer.pageX - dragging.initX;
|
||||||
dragging.pathY = pointer.pageY - dragging.initY;
|
dragging.pathY = pointer.pageY - dragging.initY;
|
||||||
dragging.path = sqrt(pow(dragging.pathX, 2) + pow(dragging.pathY, 2));
|
dragging.path = Math.sqrt(Math.pow(dragging.pathX, 2) + Math.pow(dragging.pathY, 2));
|
||||||
dragging.delta = o.horizontal ? dragging.pathX : dragging.pathY;
|
dragging.delta = o.horizontal ? dragging.pathX : dragging.pathY;
|
||||||
|
|
||||||
if (!dragging.released && dragging.path < 1) {
|
if (!dragging.released && dragging.path < 1) {
|
||||||
|
@ -499,7 +471,7 @@ define(['browser', 'layoutManager', 'dom', 'focusManager', 'ResizeObserver', 'sc
|
||||||
} else {
|
} else {
|
||||||
// If dragging path is sufficiently long we can confidently start a drag
|
// If dragging path is sufficiently long we can confidently start a drag
|
||||||
// if drag is in different direction than scroll, ignore it
|
// if drag is in different direction than scroll, ignore it
|
||||||
if (o.horizontal ? abs(dragging.pathX) > abs(dragging.pathY) : abs(dragging.pathX) < abs(dragging.pathY)) {
|
if (o.horizontal ? Math.abs(dragging.pathX) > Math.abs(dragging.pathY) : Math.abs(dragging.pathX) < Math.abs(dragging.pathY)) {
|
||||||
dragging.init = 1;
|
dragging.init = 1;
|
||||||
} else {
|
} else {
|
||||||
return dragEnd();
|
return dragEnd();
|
||||||
|
@ -520,7 +492,7 @@ define(['browser', 'layoutManager', 'dom', 'focusManager', 'ResizeObserver', 'sc
|
||||||
dragEnd();
|
dragEnd();
|
||||||
}
|
}
|
||||||
|
|
||||||
self.slideTo(round(dragging.initPos - dragging.delta));
|
self.slideTo(Math.round(dragging.initPos - dragging.delta));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -557,9 +529,7 @@ define(['browser', 'layoutManager', 'dom', 'focusManager', 'ResizeObserver', 'sc
|
||||||
* @return {Boolean}
|
* @return {Boolean}
|
||||||
*/
|
*/
|
||||||
function isInteractive(element) {
|
function isInteractive(element) {
|
||||||
|
|
||||||
while (element) {
|
while (element) {
|
||||||
|
|
||||||
if (interactiveElements.indexOf(element.tagName) !== -1) {
|
if (interactiveElements.indexOf(element.tagName) !== -1) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -595,7 +565,6 @@ define(['browser', 'layoutManager', 'dom', 'focusManager', 'ResizeObserver', 'sc
|
||||||
* @return {Void}
|
* @return {Void}
|
||||||
*/
|
*/
|
||||||
function scrollHandler(event) {
|
function scrollHandler(event) {
|
||||||
|
|
||||||
ensureSizeInfo();
|
ensureSizeInfo();
|
||||||
var pos = self._pos;
|
var pos = self._pos;
|
||||||
// Ignore if there is no scrolling to be done
|
// Ignore if there is no scrolling to be done
|
||||||
|
@ -612,7 +581,6 @@ define(['browser', 'layoutManager', 'dom', 'focusManager', 'ResizeObserver', 'sc
|
||||||
|
|
||||||
self.slideBy(o.scrollBy * delta);
|
self.slideBy(o.scrollBy * delta);
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
if (isSmoothScrollSupported) {
|
if (isSmoothScrollSupported) {
|
||||||
delta *= 12;
|
delta *= 12;
|
||||||
}
|
}
|
||||||
|
@ -631,7 +599,6 @@ define(['browser', 'layoutManager', 'dom', 'focusManager', 'ResizeObserver', 'sc
|
||||||
* @return {Void}
|
* @return {Void}
|
||||||
*/
|
*/
|
||||||
self.destroy = function () {
|
self.destroy = function () {
|
||||||
|
|
||||||
if (self.frameResizeObserver) {
|
if (self.frameResizeObserver) {
|
||||||
self.frameResizeObserver.disconnect();
|
self.frameResizeObserver.disconnect();
|
||||||
self.frameResizeObserver = null;
|
self.frameResizeObserver = null;
|
||||||
|
@ -667,11 +634,9 @@ define(['browser', 'layoutManager', 'dom', 'focusManager', 'ResizeObserver', 'sc
|
||||||
var contentRect = {};
|
var contentRect = {};
|
||||||
|
|
||||||
function onResize(entries) {
|
function onResize(entries) {
|
||||||
|
|
||||||
var entry = entries[0];
|
var entry = entries[0];
|
||||||
|
|
||||||
if (entry) {
|
if (entry) {
|
||||||
|
|
||||||
var newRect = entry.contentRect;
|
var newRect = entry.contentRect;
|
||||||
|
|
||||||
// handle element being hidden
|
// handle element being hidden
|
||||||
|
@ -680,7 +645,6 @@ define(['browser', 'layoutManager', 'dom', 'focusManager', 'ResizeObserver', 'sc
|
||||||
}
|
}
|
||||||
|
|
||||||
if (newRect.width !== contentRect.width || newRect.height !== contentRect.height) {
|
if (newRect.width !== contentRect.width || newRect.height !== contentRect.height) {
|
||||||
|
|
||||||
contentRect = newRect;
|
contentRect = newRect;
|
||||||
|
|
||||||
load(false);
|
load(false);
|
||||||
|
@ -706,7 +670,6 @@ define(['browser', 'layoutManager', 'dom', 'focusManager', 'ResizeObserver', 'sc
|
||||||
}
|
}
|
||||||
|
|
||||||
self.getScrollPosition = function () {
|
self.getScrollPosition = function () {
|
||||||
|
|
||||||
if (transform) {
|
if (transform) {
|
||||||
return self._pos.cur;
|
return self._pos.cur;
|
||||||
}
|
}
|
||||||
|
@ -719,7 +682,6 @@ define(['browser', 'layoutManager', 'dom', 'focusManager', 'ResizeObserver', 'sc
|
||||||
};
|
};
|
||||||
|
|
||||||
self.getScrollSize = function () {
|
self.getScrollSize = function () {
|
||||||
|
|
||||||
if (transform) {
|
if (transform) {
|
||||||
return slideeSize;
|
return slideeSize;
|
||||||
}
|
}
|
||||||
|
@ -795,7 +757,6 @@ define(['browser', 'layoutManager', 'dom', 'focusManager', 'ResizeObserver', 'sc
|
||||||
initFrameResizeObserver();
|
initFrameResizeObserver();
|
||||||
|
|
||||||
if (transform) {
|
if (transform) {
|
||||||
|
|
||||||
dom.addEventListener(dragSourceElement, 'touchstart', dragInitSlidee, {
|
dom.addEventListener(dragSourceElement, 'touchstart', dragInitSlidee, {
|
||||||
passive: true
|
passive: true
|
||||||
});
|
});
|
||||||
|
@ -812,9 +773,7 @@ define(['browser', 'layoutManager', 'dom', 'focusManager', 'ResizeObserver', 'sc
|
||||||
passive: true
|
passive: true
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
} else if (o.horizontal) {
|
} else if (o.horizontal) {
|
||||||
|
|
||||||
// Don't bind to mouse events with vertical scroll since the mouse wheel can handle this natively
|
// Don't bind to mouse events with vertical scroll since the mouse wheel can handle this natively
|
||||||
|
|
||||||
if (o.mouseWheel) {
|
if (o.mouseWheel) {
|
||||||
|
@ -924,5 +883,4 @@ define(['browser', 'layoutManager', 'dom', 'focusManager', 'ResizeObserver', 'sc
|
||||||
return Promise.resolve(instance);
|
return Promise.resolve(instance);
|
||||||
};
|
};
|
||||||
|
|
||||||
return scrollerFactory;
|
export default scrollerFactory;
|
||||||
});
|
|
||||||
|
|
|
@ -1132,7 +1132,7 @@ function tryRemoveElement(elem) {
|
||||||
*/
|
*/
|
||||||
getCueCss(appearance, selector) {
|
getCueCss(appearance, selector) {
|
||||||
return `${selector}::cue {
|
return `${selector}::cue {
|
||||||
${appearance.text.map((s) => `${s.name}:${s.value}!important;`).join('')}
|
${appearance.text.map((s) => s.value !== undefined && s.value !== '' ? `${s.name}:${s.value}!important;` : '').join('')}
|
||||||
}`;
|
}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1150,7 +1150,7 @@ function tryRemoveElement(elem) {
|
||||||
document.getElementsByTagName('head')[0].appendChild(styleElem);
|
document.getElementsByTagName('head')[0].appendChild(styleElem);
|
||||||
}
|
}
|
||||||
|
|
||||||
styleElem.innerHTML = this.getCueCss(subtitleAppearanceHelper.getStyles(userSettings.getSubtitleAppearanceSettings(), true), '.htmlvideoplayer');
|
styleElem.innerHTML = this.getCueCss(subtitleAppearanceHelper.getStyles(userSettings.getSubtitleAppearanceSettings()), '.htmlvideoplayer');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1195,18 +1195,29 @@ function tryRemoveElement(elem) {
|
||||||
|
|
||||||
// download the track json
|
// download the track json
|
||||||
this.fetchSubtitles(track, item).then(function (data) {
|
this.fetchSubtitles(track, item).then(function (data) {
|
||||||
|
import('userSettings').then((userSettings) => {
|
||||||
// show in ui
|
// show in ui
|
||||||
console.debug(`downloaded ${data.TrackEvents.length} track events`);
|
console.debug(`downloaded ${data.TrackEvents.length} track events`);
|
||||||
|
|
||||||
|
const subtitleAppearance = userSettings.getSubtitleAppearanceSettings();
|
||||||
|
const cueLine = parseInt(subtitleAppearance.verticalPosition, 10);
|
||||||
|
|
||||||
// add some cues to show the text
|
// add some cues to show the text
|
||||||
// in safari, the cues need to be added before setting the track mode to showing
|
// in safari, the cues need to be added before setting the track mode to showing
|
||||||
for (const trackEvent of data.TrackEvents) {
|
for (const trackEvent of data.TrackEvents) {
|
||||||
const trackCueObject = window.VTTCue || window.TextTrackCue;
|
const trackCueObject = window.VTTCue || window.TextTrackCue;
|
||||||
const cue = new trackCueObject(trackEvent.StartPositionTicks / 10000000, trackEvent.EndPositionTicks / 10000000, normalizeTrackEventText(trackEvent.Text, false));
|
const cue = new trackCueObject(trackEvent.StartPositionTicks / 10000000, trackEvent.EndPositionTicks / 10000000, normalizeTrackEventText(trackEvent.Text, false));
|
||||||
|
|
||||||
|
if (cue.line === 'auto') {
|
||||||
|
cue.line = cueLine;
|
||||||
|
}
|
||||||
|
|
||||||
trackElement.addCue(cue);
|
trackElement.addCue(cue);
|
||||||
}
|
}
|
||||||
|
|
||||||
trackElement.mode = 'showing';
|
trackElement.mode = 'showing';
|
||||||
});
|
});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -33,16 +33,22 @@ video::-webkit-media-controls {
|
||||||
text-shadow: 0.14em 0.14em 0.14em rgba(0, 0, 0, 1);
|
text-shadow: 0.14em 0.14em 0.14em rgba(0, 0, 0, 1);
|
||||||
-webkit-font-smoothing: antialiased;
|
-webkit-font-smoothing: antialiased;
|
||||||
font-family: inherit;
|
font-family: inherit;
|
||||||
|
line-height: normal; /* Restore value. See -webkit-media-text-track-container 'line-height' */
|
||||||
}
|
}
|
||||||
|
|
||||||
.htmlvideoplayer-moveupsubtitles::-webkit-media-text-track-display {
|
.htmlvideoplayer::-webkit-media-text-track-container {
|
||||||
/* style the text itself */
|
font-size: 170% !important; /* Override element inline style */
|
||||||
margin-top: -2em;
|
line-height: 50%; /* Child element cannot set line height smaller than its parent has. This allow smaller values for children */
|
||||||
|
}
|
||||||
|
|
||||||
|
.htmlvideoplayer::-webkit-media-text-track-display {
|
||||||
|
max-width: 70%;
|
||||||
|
margin-left: 15%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.videoSubtitles {
|
.videoSubtitles {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
bottom: 10%;
|
bottom: 0;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
left: 0;
|
left: 0;
|
||||||
right: 0;
|
right: 0;
|
||||||
|
@ -53,7 +59,6 @@ video::-webkit-media-controls {
|
||||||
.videoSubtitlesInner {
|
.videoSubtitlesInner {
|
||||||
max-width: 70%;
|
max-width: 70%;
|
||||||
background-color: rgba(0, 0, 0, 0.8);
|
background-color: rgba(0, 0, 0, 0.8);
|
||||||
padding: 0.25em;
|
|
||||||
margin: auto;
|
margin: auto;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,16 +1,17 @@
|
||||||
define(['pluginManager'], function (pluginManager) {
|
import pluginManager from 'pluginManager';
|
||||||
return function () {
|
|
||||||
var self = this;
|
export default function () {
|
||||||
|
const self = this;
|
||||||
|
|
||||||
self.name = 'Logo ScreenSaver';
|
self.name = 'Logo ScreenSaver';
|
||||||
self.type = 'screensaver';
|
self.type = 'screensaver';
|
||||||
self.id = 'logoscreensaver';
|
self.id = 'logoscreensaver';
|
||||||
self.supportsAnonymous = true;
|
self.supportsAnonymous = true;
|
||||||
|
|
||||||
var interval;
|
let interval;
|
||||||
|
|
||||||
function animate() {
|
function animate() {
|
||||||
var animations = [
|
const animations = [
|
||||||
|
|
||||||
bounceInLeft,
|
bounceInLeft,
|
||||||
bounceInRight,
|
bounceInRight,
|
||||||
|
@ -21,10 +22,10 @@ define(['pluginManager'], function (pluginManager) {
|
||||||
rotateOut
|
rotateOut
|
||||||
];
|
];
|
||||||
|
|
||||||
var elem = document.querySelector('.logoScreenSaverImage');
|
const elem = document.querySelector('.logoScreenSaverImage');
|
||||||
|
|
||||||
if (elem && elem.animate) {
|
if (elem && elem.animate) {
|
||||||
var random = getRandomInt(0, animations.length - 1);
|
const random = getRandomInt(0, animations.length - 1);
|
||||||
|
|
||||||
animations[random](elem, 1);
|
animations[random](elem, 1);
|
||||||
}
|
}
|
||||||
|
@ -35,41 +36,41 @@ define(['pluginManager'], function (pluginManager) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function bounceInLeft(elem, iterations) {
|
function bounceInLeft(elem, iterations) {
|
||||||
var keyframes = [
|
const keyframes = [
|
||||||
{ transform: 'translate3d(-3000px, 0, 0)', opacity: '0', offset: 0 },
|
{ transform: 'translate3d(-3000px, 0, 0)', opacity: '0', offset: 0 },
|
||||||
{ transform: 'translate3d(25px, 0, 0)', opacity: '1', offset: 0.6 },
|
{ transform: 'translate3d(25px, 0, 0)', opacity: '1', offset: 0.6 },
|
||||||
{ transform: 'translate3d(-100px, 0, 0)', offset: 0.75 },
|
{ transform: 'translate3d(-100px, 0, 0)', offset: 0.75 },
|
||||||
{ transform: 'translate3d(5px, 0, 0)', offset: 0.9 },
|
{ transform: 'translate3d(5px, 0, 0)', offset: 0.9 },
|
||||||
{ transform: 'none', opacity: '1', offset: 1 }];
|
{ transform: 'none', opacity: '1', offset: 1 }];
|
||||||
var timing = { duration: 900, iterations: iterations, easing: 'cubic-bezier(0.215, 0.610, 0.355, 1.000)' };
|
const timing = { duration: 900, iterations: iterations, easing: 'cubic-bezier(0.215, 0.610, 0.355, 1.000)' };
|
||||||
return elem.animate(keyframes, timing);
|
return elem.animate(keyframes, timing);
|
||||||
}
|
}
|
||||||
|
|
||||||
function bounceInRight(elem, iterations) {
|
function bounceInRight(elem, iterations) {
|
||||||
var keyframes = [
|
const keyframes = [
|
||||||
{ transform: 'translate3d(3000px, 0, 0)', opacity: '0', offset: 0 },
|
{ transform: 'translate3d(3000px, 0, 0)', opacity: '0', offset: 0 },
|
||||||
{ transform: 'translate3d(-25px, 0, 0)', opacity: '1', offset: 0.6 },
|
{ transform: 'translate3d(-25px, 0, 0)', opacity: '1', offset: 0.6 },
|
||||||
{ transform: 'translate3d(100px, 0, 0)', offset: 0.75 },
|
{ transform: 'translate3d(100px, 0, 0)', offset: 0.75 },
|
||||||
{ transform: 'translate3d(-5px, 0, 0)', offset: 0.9 },
|
{ transform: 'translate3d(-5px, 0, 0)', offset: 0.9 },
|
||||||
{ transform: 'none', opacity: '1', offset: 1 }];
|
{ transform: 'none', opacity: '1', offset: 1 }];
|
||||||
var timing = { duration: 900, iterations: iterations, easing: 'cubic-bezier(0.215, 0.610, 0.355, 1.000)' };
|
const timing = { duration: 900, iterations: iterations, easing: 'cubic-bezier(0.215, 0.610, 0.355, 1.000)' };
|
||||||
return elem.animate(keyframes, timing);
|
return elem.animate(keyframes, timing);
|
||||||
}
|
}
|
||||||
|
|
||||||
function swing(elem, iterations) {
|
function swing(elem, iterations) {
|
||||||
var keyframes = [
|
const keyframes = [
|
||||||
{ transform: 'translate(0%)', offset: 0 },
|
{ transform: 'translate(0%)', offset: 0 },
|
||||||
{ transform: 'rotate3d(0, 0, 1, 15deg)', offset: 0.2 },
|
{ transform: 'rotate3d(0, 0, 1, 15deg)', offset: 0.2 },
|
||||||
{ transform: 'rotate3d(0, 0, 1, -10deg)', offset: 0.4 },
|
{ transform: 'rotate3d(0, 0, 1, -10deg)', offset: 0.4 },
|
||||||
{ transform: 'rotate3d(0, 0, 1, 5deg)', offset: 0.6 },
|
{ transform: 'rotate3d(0, 0, 1, 5deg)', offset: 0.6 },
|
||||||
{ transform: 'rotate3d(0, 0, 1, -5deg)', offset: 0.8 },
|
{ transform: 'rotate3d(0, 0, 1, -5deg)', offset: 0.8 },
|
||||||
{ transform: 'rotate3d(0, 0, 1, 0deg)', offset: 1 }];
|
{ transform: 'rotate3d(0, 0, 1, 0deg)', offset: 1 }];
|
||||||
var timing = { duration: 900, iterations: iterations };
|
const timing = { duration: 900, iterations: iterations };
|
||||||
return elem.animate(keyframes, timing);
|
return elem.animate(keyframes, timing);
|
||||||
}
|
}
|
||||||
|
|
||||||
function tada(elem, iterations) {
|
function tada(elem, iterations) {
|
||||||
var keyframes = [
|
const keyframes = [
|
||||||
{ transform: 'scale3d(1, 1, 1)', offset: 0 },
|
{ transform: 'scale3d(1, 1, 1)', offset: 0 },
|
||||||
{ transform: 'scale3d(.9, .9, .9) rotate3d(0, 0, 1, -3deg)', offset: 0.1 },
|
{ transform: 'scale3d(.9, .9, .9) rotate3d(0, 0, 1, -3deg)', offset: 0.1 },
|
||||||
{ transform: 'scale3d(.9, .9, .9) rotate3d(0, 0, 1, -3deg)', offset: 0.2 },
|
{ transform: 'scale3d(.9, .9, .9) rotate3d(0, 0, 1, -3deg)', offset: 0.2 },
|
||||||
|
@ -81,41 +82,41 @@ define(['pluginManager'], function (pluginManager) {
|
||||||
{ transform: 'scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, -3deg)', offset: 0.8 },
|
{ transform: 'scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, -3deg)', offset: 0.8 },
|
||||||
{ transform: 'scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, 3deg)', offset: 0.9 },
|
{ transform: 'scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, 3deg)', offset: 0.9 },
|
||||||
{ transform: 'scale3d(1, 1, 1)', offset: 1 }];
|
{ transform: 'scale3d(1, 1, 1)', offset: 1 }];
|
||||||
var timing = { duration: 900, iterations: iterations };
|
const timing = { duration: 900, iterations: iterations };
|
||||||
return elem.animate(keyframes, timing);
|
return elem.animate(keyframes, timing);
|
||||||
}
|
}
|
||||||
|
|
||||||
function wobble(elem, iterations) {
|
function wobble(elem, iterations) {
|
||||||
var keyframes = [
|
const keyframes = [
|
||||||
{ transform: 'translate(0%)', offset: 0 },
|
{ transform: 'translate(0%)', offset: 0 },
|
||||||
{ transform: 'translate3d(20%, 0, 0) rotate3d(0, 0, 1, 3deg)', offset: 0.15 },
|
{ transform: 'translate3d(20%, 0, 0) rotate3d(0, 0, 1, 3deg)', offset: 0.15 },
|
||||||
{ transform: 'translate3d(-15%, 0, 0) rotate3d(0, 0, 1, -3deg)', offset: 0.45 },
|
{ transform: 'translate3d(-15%, 0, 0) rotate3d(0, 0, 1, -3deg)', offset: 0.45 },
|
||||||
{ transform: 'translate3d(10%, 0, 0) rotate3d(0, 0, 1, 2deg)', offset: 0.6 },
|
{ transform: 'translate3d(10%, 0, 0) rotate3d(0, 0, 1, 2deg)', offset: 0.6 },
|
||||||
{ transform: 'translate3d(-5%, 0, 0) rotate3d(0, 0, 1, -1deg)', offset: 0.75 },
|
{ transform: 'translate3d(-5%, 0, 0) rotate3d(0, 0, 1, -1deg)', offset: 0.75 },
|
||||||
{ transform: 'translateX(0%)', offset: 1 }];
|
{ transform: 'translateX(0%)', offset: 1 }];
|
||||||
var timing = { duration: 900, iterations: iterations };
|
const timing = { duration: 900, iterations: iterations };
|
||||||
return elem.animate(keyframes, timing);
|
return elem.animate(keyframes, timing);
|
||||||
}
|
}
|
||||||
|
|
||||||
function rotateIn(elem, iterations) {
|
function rotateIn(elem, iterations) {
|
||||||
var keyframes = [{ transform: 'rotate3d(0, 0, 1, -200deg)', opacity: '0', transformOrigin: 'center', offset: 0 },
|
const keyframes = [{ transform: 'rotate3d(0, 0, 1, -200deg)', opacity: '0', transformOrigin: 'center', offset: 0 },
|
||||||
{ transform: 'none', opacity: '1', transformOrigin: 'center', offset: 1 }];
|
{ transform: 'none', opacity: '1', transformOrigin: 'center', offset: 1 }];
|
||||||
var timing = { duration: 900, iterations: iterations };
|
const timing = { duration: 900, iterations: iterations };
|
||||||
return elem.animate(keyframes, timing);
|
return elem.animate(keyframes, timing);
|
||||||
}
|
}
|
||||||
|
|
||||||
function rotateOut(elem, iterations) {
|
function rotateOut(elem, iterations) {
|
||||||
var keyframes = [{ transform: 'none', opacity: '1', transformOrigin: 'center', offset: 0 },
|
const keyframes = [{ transform: 'none', opacity: '1', transformOrigin: 'center', offset: 0 },
|
||||||
{ transform: 'rotate3d(0, 0, 1, 200deg)', opacity: '0', transformOrigin: 'center', offset: 1 }];
|
{ transform: 'rotate3d(0, 0, 1, 200deg)', opacity: '0', transformOrigin: 'center', offset: 1 }];
|
||||||
var timing = { duration: 900, iterations: iterations };
|
const timing = { duration: 900, iterations: iterations };
|
||||||
return elem.animate(keyframes, timing);
|
return elem.animate(keyframes, timing);
|
||||||
}
|
}
|
||||||
|
|
||||||
function fadeOut(elem, iterations) {
|
function fadeOut(elem, iterations) {
|
||||||
var keyframes = [
|
const keyframes = [
|
||||||
{ opacity: '1', offset: 0 },
|
{ opacity: '1', offset: 0 },
|
||||||
{ opacity: '0', offset: 1 }];
|
{ opacity: '0', offset: 1 }];
|
||||||
var timing = { duration: 400, iterations: iterations };
|
const timing = { duration: 400, iterations: iterations };
|
||||||
return elem.animate(keyframes, timing);
|
return elem.animate(keyframes, timing);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -127,8 +128,8 @@ define(['pluginManager'], function (pluginManager) {
|
||||||
}
|
}
|
||||||
|
|
||||||
self.show = function () {
|
self.show = function () {
|
||||||
require(['css!' + pluginManager.mapPath(self, 'style.css')], function () {
|
import('css!' + pluginManager.mapPath(self, 'style.css')).then(() => {
|
||||||
var elem = document.querySelector('.logoScreenSaver');
|
let elem = document.querySelector('.logoScreenSaver');
|
||||||
|
|
||||||
if (!elem) {
|
if (!elem) {
|
||||||
elem = document.createElement('div');
|
elem = document.createElement('div');
|
||||||
|
@ -146,20 +147,19 @@ define(['pluginManager'], function (pluginManager) {
|
||||||
self.hide = function () {
|
self.hide = function () {
|
||||||
stopInterval();
|
stopInterval();
|
||||||
|
|
||||||
var elem = document.querySelector('.logoScreenSaver');
|
const elem = document.querySelector('.logoScreenSaver');
|
||||||
|
|
||||||
if (elem) {
|
if (elem) {
|
||||||
var onAnimationFinish = function () {
|
const onAnimationFinish = function () {
|
||||||
elem.parentNode.removeChild(elem);
|
elem.parentNode.removeChild(elem);
|
||||||
};
|
};
|
||||||
|
|
||||||
if (elem.animate) {
|
if (elem.animate) {
|
||||||
var animation = fadeOut(elem, 1);
|
const animation = fadeOut(elem, 1);
|
||||||
animation.onfinish = onAnimationFinish;
|
animation.onfinish = onAnimationFinish;
|
||||||
} else {
|
} else {
|
||||||
onAnimationFinish();
|
onAnimationFinish();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
});
|
|
||||||
|
|
|
@ -1,33 +1,26 @@
|
||||||
define(['connectionManager', 'globalize'], function (connectionManager, globalize) {
|
import connectionManager from 'connectionManager';
|
||||||
'use strict';
|
import globalize from 'globalize';
|
||||||
|
|
||||||
function getRequirePromise(deps) {
|
|
||||||
return new Promise(function (resolve, reject) {
|
|
||||||
require(deps, resolve);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function showErrorMessage() {
|
function showErrorMessage() {
|
||||||
return getRequirePromise(['alert']).then(function (alert) {
|
return import('alert').then(({default: alert}) => {
|
||||||
return alert(globalize.translate('MessagePlayAccessRestricted')).then(function () {
|
return alert(globalize.translate('MessagePlayAccessRestricted'));
|
||||||
return Promise.reject();
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function PlayAccessValidation() {
|
class PlayAccessValidation {
|
||||||
|
constructor() {
|
||||||
this.name = 'Playback validation';
|
this.name = 'Playback validation';
|
||||||
this.type = 'preplayintercept';
|
this.type = 'preplayintercept';
|
||||||
this.id = 'playaccessvalidation';
|
this.id = 'playaccessvalidation';
|
||||||
this.order = -2;
|
this.order = -2;
|
||||||
}
|
}
|
||||||
|
|
||||||
PlayAccessValidation.prototype.intercept = function (options) {
|
intercept(options) {
|
||||||
var item = options.item;
|
const item = options.item;
|
||||||
if (!item) {
|
if (!item) {
|
||||||
return Promise.resolve();
|
return Promise.resolve();
|
||||||
}
|
}
|
||||||
var serverId = item.ServerId;
|
const serverId = item.ServerId;
|
||||||
if (!serverId) {
|
if (!serverId) {
|
||||||
return Promise.resolve();
|
return Promise.resolve();
|
||||||
}
|
}
|
||||||
|
@ -44,7 +37,7 @@ define(['connectionManager', 'globalize'], function (connectionManager, globaliz
|
||||||
|
|
||||||
return showErrorMessage();
|
return showErrorMessage();
|
||||||
});
|
});
|
||||||
};
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return PlayAccessValidation;
|
export default PlayAccessValidation;
|
||||||
});
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
define(['playbackManager', 'events', 'serverNotifications', 'connectionManager'], function (playbackManager, events, serverNotifications, connectionManager) {
|
define(['playbackManager', 'events', 'serverNotifications', 'connectionManager'], function (playbackManager, events, serverNotifications, connectionManager) {
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
|
serverNotifications = serverNotifications.default || serverNotifications;
|
||||||
playbackManager = playbackManager.default || playbackManager;
|
playbackManager = playbackManager.default || playbackManager;
|
||||||
|
|
||||||
function getActivePlayerId() {
|
function getActivePlayerId() {
|
||||||
|
|
|
@ -1,8 +1,10 @@
|
||||||
define(['dom', 'layoutManager', 'inputManager', 'connectionManager', 'events', 'viewManager', 'libraryBrowser', 'appRouter', 'apphost', 'playbackManager', 'syncPlayManager', 'groupSelectionMenu', 'browser', 'globalize', 'scripts/imagehelper', 'paper-icon-button-light', 'material-icons', 'scrollStyles', 'flexStyles'], function (dom, layoutManager, inputManager, connectionManager, events, viewManager, libraryBrowser, appRouter, appHost, playbackManager, syncPlayManager, groupSelectionMenu, browser, globalize, imageHelper) {
|
define(['dom', 'layoutManager', 'inputManager', 'connectionManager', 'events', 'viewManager', 'libraryBrowser', 'appRouter', 'apphost', 'playbackManager', 'syncPlayManager', 'groupSelectionMenu', 'browser', 'globalize', 'scripts/imagehelper', 'paper-icon-button-light', 'material-icons', 'scrollStyles', 'flexStyles'], function (dom, layoutManager, inputManager, connectionManager, events, viewManager, libraryBrowser, appRouter, appHost, playbackManager, syncPlayManager, groupSelectionMenu, browser, globalize, imageHelper) {
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
|
viewManager = viewManager.default || viewManager;
|
||||||
playbackManager = playbackManager.default || playbackManager;
|
playbackManager = playbackManager.default || playbackManager;
|
||||||
browser = browser.default || browser;
|
browser = browser.default || browser;
|
||||||
|
layoutManager = layoutManager.default || layoutManager;
|
||||||
|
|
||||||
function renderHeader() {
|
function renderHeader() {
|
||||||
var html = '';
|
var html = '';
|
||||||
|
@ -806,6 +808,8 @@ define(['dom', 'layoutManager', 'inputManager', 'connectionManager', 'events', '
|
||||||
navDrawerScrollContainer.addEventListener('click', onMainDrawerClick);
|
navDrawerScrollContainer.addEventListener('click', onMainDrawerClick);
|
||||||
return new Promise(function (resolve, reject) {
|
return new Promise(function (resolve, reject) {
|
||||||
require(['navdrawer'], function (navdrawer) {
|
require(['navdrawer'], function (navdrawer) {
|
||||||
|
navdrawer = navdrawer.default || navdrawer;
|
||||||
|
|
||||||
navDrawerInstance = new navdrawer(getNavDrawerOptions());
|
navDrawerInstance = new navdrawer(getNavDrawerOptions());
|
||||||
|
|
||||||
if (!layoutManager.tv) {
|
if (!layoutManager.tv) {
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
define(['layoutManager', 'datetime', 'cardBuilder', 'apphost'], function (layoutManager, datetime, cardBuilder, appHost) {
|
define(['layoutManager', 'datetime', 'cardBuilder', 'apphost'], function (layoutManager, datetime, cardBuilder, appHost) {
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
|
layoutManager = layoutManager.default || layoutManager;
|
||||||
|
|
||||||
function enableScrollX() {
|
function enableScrollX() {
|
||||||
return !layoutManager.desktop;
|
return !layoutManager.desktop;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
define(['focusManager', 'dom', 'scrollStyles'], function (focusManager, dom) {
|
import focusManager from 'focusManager';
|
||||||
'use strict';
|
import dom from 'dom';
|
||||||
|
import 'scrollStyles';
|
||||||
focusManager = focusManager.default || focusManager;
|
|
||||||
|
|
||||||
function getBoundingClientRect(elem) {
|
function getBoundingClientRect(elem) {
|
||||||
// Support: BlackBerry 5, iOS 3 (original iPhone)
|
// Support: BlackBerry 5, iOS 3 (original iPhone)
|
||||||
|
@ -13,25 +12,25 @@ define(['focusManager', 'dom', 'scrollStyles'], function (focusManager, dom) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function getPosition(scrollContainer, item, horizontal) {
|
export function getPosition(scrollContainer, item, horizontal) {
|
||||||
var slideeOffset = getBoundingClientRect(scrollContainer);
|
const slideeOffset = getBoundingClientRect(scrollContainer);
|
||||||
var itemOffset = getBoundingClientRect(item);
|
const itemOffset = getBoundingClientRect(item);
|
||||||
|
|
||||||
var offset = horizontal ? itemOffset.left - slideeOffset.left : itemOffset.top - slideeOffset.top;
|
let offset = horizontal ? itemOffset.left - slideeOffset.left : itemOffset.top - slideeOffset.top;
|
||||||
var size = horizontal ? itemOffset.width : itemOffset.height;
|
let size = horizontal ? itemOffset.width : itemOffset.height;
|
||||||
if (!size && size !== 0) {
|
if (!size && size !== 0) {
|
||||||
size = item[horizontal ? 'offsetWidth' : 'offsetHeight'];
|
size = item[horizontal ? 'offsetWidth' : 'offsetHeight'];
|
||||||
}
|
}
|
||||||
|
|
||||||
var currentStart = horizontal ? scrollContainer.scrollLeft : scrollContainer.scrollTop;
|
const currentStart = horizontal ? scrollContainer.scrollLeft : scrollContainer.scrollTop;
|
||||||
|
|
||||||
offset += currentStart;
|
offset += currentStart;
|
||||||
|
|
||||||
var frameSize = horizontal ? scrollContainer.offsetWidth : scrollContainer.offsetHeight;
|
const frameSize = horizontal ? scrollContainer.offsetWidth : scrollContainer.offsetHeight;
|
||||||
|
|
||||||
var currentEnd = currentStart + frameSize;
|
const currentEnd = currentStart + frameSize;
|
||||||
|
|
||||||
var isVisible = offset >= currentStart && (offset + size) <= currentEnd;
|
const isVisible = offset >= currentStart && (offset + size) <= currentEnd;
|
||||||
|
|
||||||
return {
|
return {
|
||||||
start: offset,
|
start: offset,
|
||||||
|
@ -42,8 +41,8 @@ define(['focusManager', 'dom', 'scrollStyles'], function (focusManager, dom) {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
function toCenter(container, elem, horizontal, skipWhenVisible) {
|
export function toCenter(container, elem, horizontal, skipWhenVisible) {
|
||||||
var pos = getPosition(container, elem, horizontal);
|
const pos = getPosition(container, elem, horizontal);
|
||||||
|
|
||||||
if (skipWhenVisible && pos.isVisible) {
|
if (skipWhenVisible && pos.isVisible) {
|
||||||
return;
|
return;
|
||||||
|
@ -64,8 +63,8 @@ define(['focusManager', 'dom', 'scrollStyles'], function (focusManager, dom) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function toStart(container, elem, horizontal, skipWhenVisible) {
|
export function toStart(container, elem, horizontal, skipWhenVisible) {
|
||||||
var pos = getPosition(container, elem, horizontal);
|
const pos = getPosition(container, elem, horizontal);
|
||||||
|
|
||||||
if (skipWhenVisible && pos.isVisible) {
|
if (skipWhenVisible && pos.isVisible) {
|
||||||
return;
|
return;
|
||||||
|
@ -87,7 +86,7 @@ define(['focusManager', 'dom', 'scrollStyles'], function (focusManager, dom) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function centerOnFocus(e, scrollSlider, horizontal) {
|
function centerOnFocus(e, scrollSlider, horizontal) {
|
||||||
var focused = focusManager.focusableParent(e.target);
|
const focused = focusManager.focusableParent(e.target);
|
||||||
|
|
||||||
if (focused) {
|
if (focused) {
|
||||||
toCenter(scrollSlider, focused, horizontal);
|
toCenter(scrollSlider, focused, horizontal);
|
||||||
|
@ -97,13 +96,12 @@ define(['focusManager', 'dom', 'scrollStyles'], function (focusManager, dom) {
|
||||||
function centerOnFocusHorizontal(e) {
|
function centerOnFocusHorizontal(e) {
|
||||||
centerOnFocus(e, this, true);
|
centerOnFocus(e, this, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
function centerOnFocusVertical(e) {
|
function centerOnFocusVertical(e) {
|
||||||
centerOnFocus(e, this, false);
|
centerOnFocus(e, this, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
export const centerFocus = {
|
||||||
getPosition: getPosition,
|
|
||||||
centerFocus: {
|
|
||||||
on: function (element, horizontal) {
|
on: function (element, horizontal) {
|
||||||
if (horizontal) {
|
if (horizontal) {
|
||||||
dom.addEventListener(element, 'focus', centerOnFocusHorizontal, {
|
dom.addEventListener(element, 'focus', centerOnFocusHorizontal, {
|
||||||
|
@ -130,8 +128,11 @@ define(['focusManager', 'dom', 'scrollStyles'], function (focusManager, dom) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
};
|
||||||
|
|
||||||
|
export default {
|
||||||
|
getPosition: getPosition,
|
||||||
|
centerFocus: centerFocus,
|
||||||
toCenter: toCenter,
|
toCenter: toCenter,
|
||||||
toStart: toStart
|
toStart: toStart
|
||||||
};
|
};
|
||||||
});
|
|
||||||
|
|
|
@ -1,57 +0,0 @@
|
||||||
define(['searchFields', 'searchResults', 'events'], function (SearchFields, SearchResults, events) {
|
|
||||||
'use strict';
|
|
||||||
|
|
||||||
SearchFields = SearchFields.default || SearchFields;
|
|
||||||
SearchResults = SearchResults.default || SearchResults;
|
|
||||||
|
|
||||||
function init(instance, tabContent, options) {
|
|
||||||
tabContent.innerHTML = '<div class="padded-left padded-right searchFields"></div><div class="searchResults padded-top" style="padding-top:1.5em;"></div>';
|
|
||||||
instance.searchFields = new SearchFields({
|
|
||||||
element: tabContent.querySelector('.searchFields')
|
|
||||||
});
|
|
||||||
instance.searchResults = new SearchResults({
|
|
||||||
element: tabContent.querySelector('.searchResults'),
|
|
||||||
serverId: ApiClient.serverId(),
|
|
||||||
parentId: options.parentId,
|
|
||||||
collectionType: options.collectionType
|
|
||||||
});
|
|
||||||
events.on(instance.searchFields, 'search', function (e, value) {
|
|
||||||
instance.searchResults.search(value);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function SearchTab(view, tabContent, options) {
|
|
||||||
var self = this;
|
|
||||||
options = options || {};
|
|
||||||
init(this, tabContent, options);
|
|
||||||
|
|
||||||
self.preRender = function () {};
|
|
||||||
|
|
||||||
self.renderTab = function () {
|
|
||||||
var searchFields = this.searchFields;
|
|
||||||
|
|
||||||
if (searchFields) {
|
|
||||||
searchFields.focus();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
SearchTab.prototype.destroy = function () {
|
|
||||||
var searchFields = this.searchFields;
|
|
||||||
|
|
||||||
if (searchFields) {
|
|
||||||
searchFields.destroy();
|
|
||||||
}
|
|
||||||
|
|
||||||
this.searchFields = null;
|
|
||||||
var searchResults = this.searchResults;
|
|
||||||
|
|
||||||
if (searchResults) {
|
|
||||||
searchResults.destroy();
|
|
||||||
}
|
|
||||||
|
|
||||||
this.searchResults = null;
|
|
||||||
};
|
|
||||||
|
|
||||||
return SearchTab;
|
|
||||||
});
|
|
|
@ -1,24 +1,26 @@
|
||||||
define(['connectionManager', 'playbackManager', 'syncPlayManager', 'events', 'inputManager', 'focusManager', 'appRouter'], function (connectionManager, playbackManager, syncPlayManager, events, inputManager, focusManager, appRouter) {
|
import connectionManager from 'connectionManager';
|
||||||
'use strict';
|
import playbackManager from 'playbackManager';
|
||||||
|
import syncPlayManager from 'syncPlayManager';
|
||||||
|
import events from 'events';
|
||||||
|
import inputManager from 'inputManager';
|
||||||
|
import focusManager from 'focusManager';
|
||||||
|
import appRouter from 'appRouter';
|
||||||
|
|
||||||
playbackManager = playbackManager.default || playbackManager;
|
const serverNotifications = {};
|
||||||
focusManager = focusManager.default || focusManager;
|
|
||||||
|
|
||||||
var serverNotifications = {};
|
|
||||||
|
|
||||||
function notifyApp() {
|
function notifyApp() {
|
||||||
inputManager.notify();
|
inputManager.notify();
|
||||||
}
|
}
|
||||||
|
|
||||||
function displayMessage(cmd) {
|
function displayMessage(cmd) {
|
||||||
var args = cmd.Arguments;
|
const args = cmd.Arguments;
|
||||||
if (args.TimeoutMs) {
|
if (args.TimeoutMs) {
|
||||||
require(['toast'], function (toast) {
|
import('toast').then(({default: toast}) => {
|
||||||
toast({ title: args.Header, text: args.Text });
|
toast({ title: args.Header, text: args.Text });
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
require(['alert'], function (alert) {
|
import('alert').then(({default: alert}) => {
|
||||||
alert.default({ title: args.Header, text: args.Text });
|
alert({ title: args.Header, text: args.Text });
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -147,10 +149,10 @@ define(['connectionManager', 'playbackManager', 'syncPlayManager', 'events', 'in
|
||||||
}
|
}
|
||||||
|
|
||||||
function onMessageReceived(e, msg) {
|
function onMessageReceived(e, msg) {
|
||||||
var apiClient = this;
|
const apiClient = this;
|
||||||
if (msg.MessageType === 'Play') {
|
if (msg.MessageType === 'Play') {
|
||||||
notifyApp();
|
notifyApp();
|
||||||
var serverId = apiClient.serverInfo().Id;
|
const serverId = apiClient.serverInfo().Id;
|
||||||
if (msg.Data.PlayCommand === 'PlayNext') {
|
if (msg.Data.PlayCommand === 'PlayNext') {
|
||||||
playbackManager.queueNext({ ids: msg.Data.ItemIds, serverId: serverId });
|
playbackManager.queueNext({ ids: msg.Data.ItemIds, serverId: serverId });
|
||||||
} else if (msg.Data.PlayCommand === 'PlayLast') {
|
} else if (msg.Data.PlayCommand === 'PlayLast') {
|
||||||
|
@ -185,11 +187,11 @@ define(['connectionManager', 'playbackManager', 'syncPlayManager', 'events', 'in
|
||||||
notifyApp();
|
notifyApp();
|
||||||
}
|
}
|
||||||
} else if (msg.MessageType === 'GeneralCommand') {
|
} else if (msg.MessageType === 'GeneralCommand') {
|
||||||
var cmd = msg.Data;
|
const cmd = msg.Data;
|
||||||
processGeneralCommand(cmd, apiClient);
|
processGeneralCommand(cmd, apiClient);
|
||||||
} else if (msg.MessageType === 'UserDataChanged') {
|
} else if (msg.MessageType === 'UserDataChanged') {
|
||||||
if (msg.Data.UserId === apiClient.getCurrentUserId()) {
|
if (msg.Data.UserId === apiClient.getCurrentUserId()) {
|
||||||
for (var i = 0, length = msg.Data.UserDataList.length; i < length; i++) {
|
for (let i = 0, length = msg.Data.UserDataList.length; i < length; i++) {
|
||||||
events.trigger(serverNotifications, 'UserDataChanged', [apiClient, msg.Data.UserDataList[i]]);
|
events.trigger(serverNotifications, 'UserDataChanged', [apiClient, msg.Data.UserDataList[i]]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -210,5 +212,5 @@ define(['connectionManager', 'playbackManager', 'syncPlayManager', 'events', 'in
|
||||||
events.on(connectionManager, 'apiclientcreated', function (e, newApiClient) {
|
events.on(connectionManager, 'apiclientcreated', function (e, newApiClient) {
|
||||||
bindEvents(newApiClient);
|
bindEvents(newApiClient);
|
||||||
});
|
});
|
||||||
return serverNotifications;
|
|
||||||
});
|
export default serverNotifications;
|
||||||
|
|
|
@ -15,6 +15,10 @@ function saveServerPreferences(instance) {
|
||||||
instance.saveTimeout = setTimeout(onSaveTimeout.bind(instance), 50);
|
instance.saveTimeout = setTimeout(onSaveTimeout.bind(instance), 50);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const defaultSubtitleAppearanceSettings = {
|
||||||
|
verticalPosition: -3
|
||||||
|
};
|
||||||
|
|
||||||
export class UserSettings {
|
export class UserSettings {
|
||||||
constructor() {
|
constructor() {
|
||||||
}
|
}
|
||||||
|
@ -412,7 +416,7 @@ export class UserSettings {
|
||||||
*/
|
*/
|
||||||
getSubtitleAppearanceSettings(key) {
|
getSubtitleAppearanceSettings(key) {
|
||||||
key = key || 'localplayersubtitleappearance3';
|
key = key || 'localplayersubtitleappearance3';
|
||||||
return JSON.parse(this.get(key, false) || '{}');
|
return Object.assign(defaultSubtitleAppearanceSettings, JSON.parse(this.get(key, false) || '{}'));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
define([], function () {
|
// TODO: This seems like a good candidate for deprecation
|
||||||
'use strict';
|
export default {
|
||||||
|
|
||||||
return {
|
|
||||||
openUrl: function (url, target) {
|
openUrl: function (url, target) {
|
||||||
if (window.NativeShell) {
|
if (window.NativeShell) {
|
||||||
window.NativeShell.openUrl(url, target);
|
window.NativeShell.openUrl(url, target);
|
||||||
|
@ -20,4 +18,3 @@ define([], function () {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
});
|
|
||||||
|
|
|
@ -350,6 +350,7 @@ function initClient() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function getLayoutManager(layoutManager, appHost) {
|
function getLayoutManager(layoutManager, appHost) {
|
||||||
|
layoutManager = layoutManager.default || layoutManager;
|
||||||
if (appHost.getDefaultLayout) {
|
if (appHost.getDefaultLayout) {
|
||||||
layoutManager.defaultLayout = appHost.getDefaultLayout();
|
layoutManager.defaultLayout = appHost.getDefaultLayout();
|
||||||
}
|
}
|
||||||
|
@ -813,8 +814,8 @@ function initClient() {
|
||||||
define('tvguide', [componentsPath + '/guide/guide'], returnFirstDependency);
|
define('tvguide', [componentsPath + '/guide/guide'], returnFirstDependency);
|
||||||
define('guide-settings-dialog', [componentsPath + '/guide/guide-settings'], returnFirstDependency);
|
define('guide-settings-dialog', [componentsPath + '/guide/guide-settings'], returnFirstDependency);
|
||||||
define('viewManager', [componentsPath + '/viewManager/viewManager'], function (viewManager) {
|
define('viewManager', [componentsPath + '/viewManager/viewManager'], function (viewManager) {
|
||||||
window.ViewManager = viewManager;
|
window.ViewManager = viewManager.default;
|
||||||
viewManager.dispatchPageEvents(true);
|
viewManager.default.dispatchPageEvents(true);
|
||||||
return viewManager;
|
return viewManager;
|
||||||
});
|
});
|
||||||
define('slideshow', [componentsPath + '/slideshow/slideshow'], returnFirstDependency);
|
define('slideshow', [componentsPath + '/slideshow/slideshow'], returnFirstDependency);
|
||||||
|
|
|
@ -99,9 +99,9 @@
|
||||||
"DeleteUserConfirmation": "هل انت متاكد من انك تريد حذف هذا المستخدم ؟",
|
"DeleteUserConfirmation": "هل انت متاكد من انك تريد حذف هذا المستخدم ؟",
|
||||||
"DeviceAccessHelp": "هذه الميزة تنطبق حصرياً على الأجهزة التي يمكن التعرف عليها فردياً ولن تمنع المتصفح من الدخول عليها. ترشيح الوصول لأجهزة المستخدم ستمنع المستخدمين من استعمال الأجهزة الجديدة إلى أن يتم اعتمادهم من هنا.",
|
"DeviceAccessHelp": "هذه الميزة تنطبق حصرياً على الأجهزة التي يمكن التعرف عليها فردياً ولن تمنع المتصفح من الدخول عليها. ترشيح الوصول لأجهزة المستخدم ستمنع المستخدمين من استعمال الأجهزة الجديدة إلى أن يتم اعتمادهم من هنا.",
|
||||||
"DrmChannelsNotImported": "القنوات المجهزة بإدارة الحقوق الرقمية DRM لن تورّد.",
|
"DrmChannelsNotImported": "القنوات المجهزة بإدارة الحقوق الرقمية DRM لن تورّد.",
|
||||||
"EasyPasswordHelp": "الرمز الشخصي الميسرالخاص بك يمكنك من الاتصال إلى خادم مكتبتك، عبر تطبيقات أمبي على الأجهزة أو الدخول على حسابك في الشبكة الداخلية.",
|
"EasyPasswordHelp": "الرمز pin الميسر الخاص بك يستخدم للوصول بدون اتصل عبر التطبيقات المدعومة أو الدخول على حسابك في الشبكة الداخلية.",
|
||||||
"EnablePhotos": "عرض الصور",
|
"EnablePhotos": "عرض الصور",
|
||||||
"EnablePhotosHelp": "سيتم اكتشاف الصور وعرضها مع ملفات الوسائط الأخرى",
|
"EnablePhotosHelp": "سيتم اكتشاف الصور وعرضها مع ملفات الوسائط الأخرى.",
|
||||||
"ErrorAddingListingsToSchedulesDirect": "كان هناك خطأ في إضافة الاصطفاف لخدمة \"Schedules Direct\" الخاصة بك. خدمة \"Schedules Direct\" لا تسمح إلا بعدد محدود من الاصطفافات لكل حساب. قد تحتاج إلى تسجيل الدخول إلى موقع \"Schedules Direct\" لإزالة الاصطفافات الأخرى من حسابك قبل المتابعة.",
|
"ErrorAddingListingsToSchedulesDirect": "كان هناك خطأ في إضافة الاصطفاف لخدمة \"Schedules Direct\" الخاصة بك. خدمة \"Schedules Direct\" لا تسمح إلا بعدد محدود من الاصطفافات لكل حساب. قد تحتاج إلى تسجيل الدخول إلى موقع \"Schedules Direct\" لإزالة الاصطفافات الأخرى من حسابك قبل المتابعة.",
|
||||||
"ErrorAddingMediaPathToVirtualFolder": "كان هناك خطأ في إضافة مسار الوسائط. الرجاء التأكد من صحة المسار وأن خادم أمبي لديه صلاحية الوصول إلى الموقع.",
|
"ErrorAddingMediaPathToVirtualFolder": "كان هناك خطأ في إضافة مسار الوسائط. الرجاء التأكد من صحة المسار وأن خادم أمبي لديه صلاحية الوصول إلى الموقع.",
|
||||||
"ErrorAddingTunerDevice": "كان هناك خطأ في إضافة جهاز المولف. الرجاء التأكد من صلاحية الوصول إليه ثم عاود المحاولة.",
|
"ErrorAddingTunerDevice": "كان هناك خطأ في إضافة جهاز المولف. الرجاء التأكد من صلاحية الوصول إليه ثم عاود المحاولة.",
|
||||||
|
@ -111,7 +111,7 @@
|
||||||
"ErrorPleaseSelectLineup": "الرجاء اختيار اصطفاف ثم المحاولة مرة أخرى. إن لم تتوفر أية اصطفافات، فالرجاء التأكد من اسم المستخدم وكلمة المرور الخاصة بك، وتأكد من صحة رمزك البريدي.",
|
"ErrorPleaseSelectLineup": "الرجاء اختيار اصطفاف ثم المحاولة مرة أخرى. إن لم تتوفر أية اصطفافات، فالرجاء التأكد من اسم المستخدم وكلمة المرور الخاصة بك، وتأكد من صحة رمزك البريدي.",
|
||||||
"ErrorSavingTvProvider": "كان هناك خطأ في حفظ مزود التلفزة. الرجاء التأكد من صلاحية الوصول إليه ثم عاود المحاولة.",
|
"ErrorSavingTvProvider": "كان هناك خطأ في حفظ مزود التلفزة. الرجاء التأكد من صلاحية الوصول إليه ثم عاود المحاولة.",
|
||||||
"ExitFullscreen": "الخروج من الشاشة الكاملة",
|
"ExitFullscreen": "الخروج من الشاشة الكاملة",
|
||||||
"ExtractChapterImagesHelp": "استخلاص صور الأبواب سيسمح لتطبيقات أمبي أن تظهر لك قوائم تصويرية لتبويبات الأفلام. هذه العملية قد تكون بطيئة، وتستغل قدرة المعالج بشكل ملحوظ، وقد تحتاج إلى حيازة بضعة غيغابايتات من مساحة التخزين بشكل مؤقت. هذه المهمة تعمل خلال عملية استكشاف المقاطع المرئية، كما يمكن أن تحدد لتكون مهمة ليلية مجدولة. يمكنك جدولة العملية من قسم جدولة المهام. لا ينصح بتشغيل هذه المهمة خلال ساعات الذروة من دخول المستخدمين.",
|
"ExtractChapterImagesHelp": "استخلاص صور الفصول سيسمح للتطبيقات أن تظهر لك قوائم تصويرية لتبويبات الأفلام. هذه العملية قد تكون بطيئة، وتستغل موارد الجهاز بشكل ملحوظ، وقد تحتاج إلى حيازة بضعة غيغابايتات من مساحة التخزين بشكل مؤقت. هذه المهمة تعمل خلال عملية استكشاف المقاطع المرئية، كما يمكن أن تحدد لتكون مهمة ليلية مجدولة. يمكنك جدولة العملية من قسم جدولة المهام. لا ينصح بتشغيل هذه المهمة خلال ساعات الذروة من دخول المستخدمين.",
|
||||||
"FFmpegSavePathNotFound": "لم نستطع تحديد موقع ffmpeg باستخدام المسار الذي أدخلته. سوف نحتاج تطبيق FFprobe أيضاً ويجب أن يتواجد في نفس المكان. إن هذه الأجزاء تكون بالعادة محزومة معاً في نفس ملف الإنزال. الرجاء التأكد من المسار المدخل والمحاولة مرة أخرى.",
|
"FFmpegSavePathNotFound": "لم نستطع تحديد موقع ffmpeg باستخدام المسار الذي أدخلته. سوف نحتاج تطبيق FFprobe أيضاً ويجب أن يتواجد في نفس المكان. إن هذه الأجزاء تكون بالعادة محزومة معاً في نفس ملف الإنزال. الرجاء التأكد من المسار المدخل والمحاولة مرة أخرى.",
|
||||||
"FastForward": "التقديم السريع",
|
"FastForward": "التقديم السريع",
|
||||||
"FileNotFound": "الملف غير موجود.",
|
"FileNotFound": "الملف غير موجود.",
|
||||||
|
@ -129,7 +129,7 @@
|
||||||
"GuideProviderSelectListings": "إختر المبوبات",
|
"GuideProviderSelectListings": "إختر المبوبات",
|
||||||
"H264CrfHelp": "معامل المعدل الثابت CRF هو الجودة الافتراضية لإعدادات مشفر x264. بإمكانك إعطاء قيمة تتراوح بين 0 و 51، وكلما قلت القيمة فسينتج عن ذلك جودة أفضل (على حساب حجم تخزين أعلى). القيم المعقول تتراوح بين 18 و 28. الافتراضي لـ x264 هي 23، لذا فبإمكانك استخدام هذه القيمة كنقطة بداية.",
|
"H264CrfHelp": "معامل المعدل الثابت CRF هو الجودة الافتراضية لإعدادات مشفر x264. بإمكانك إعطاء قيمة تتراوح بين 0 و 51، وكلما قلت القيمة فسينتج عن ذلك جودة أفضل (على حساب حجم تخزين أعلى). القيم المعقول تتراوح بين 18 و 28. الافتراضي لـ x264 هي 23، لذا فبإمكانك استخدام هذه القيمة كنقطة بداية.",
|
||||||
"EncoderPresetHelp": "اختر قيمة أعلى لتحسين السرة والأداء وقيمة أقل لتحسين الجودة.",
|
"EncoderPresetHelp": "اختر قيمة أعلى لتحسين السرة والأداء وقيمة أقل لتحسين الجودة.",
|
||||||
"HardwareAccelerationWarning": "تمكين التسريع بعتاد الحاسوب قد يتسبب في عدم استقرار بعض أنواع الأنظمة. تأكد من أن نظام التشغيل الخاص بك محدث إلى آخر نسخة وأن سواقات الفيديو محدثة أيضاً. إذا واجهت أية صعوبات في تسغيل الفيديو بعد تمكين هذه الخاصية، فعليك إرجاع الإعداد إلى وضعية آلي.",
|
"HardwareAccelerationWarning": "تمكين التسريع بعتاد الحاسوب قد يتسبب في عدم استقرار بعض أنواع الأنظمة. تأكد من أن نظام التشغيل الخاص بك محدث إلى آخر نسخة وأن سواقات الفيديو محدثة أيضاً. إذا واجهت أية صعوبات في تسغيل الفيديو بعد تمكين هذه الخاصية، فعليك إرجاع الإعداد إلى وضعية بلا None.",
|
||||||
"HeaderAccessSchedule": "جدول الدخولات",
|
"HeaderAccessSchedule": "جدول الدخولات",
|
||||||
"HeaderAccessScheduleHelp": "إنشئ جدول دخولات لكي تتمكن من تحديد ساعات للدخول.",
|
"HeaderAccessScheduleHelp": "إنشئ جدول دخولات لكي تتمكن من تحديد ساعات للدخول.",
|
||||||
"HeaderActiveDevices": "الأجهزة المفعّلة",
|
"HeaderActiveDevices": "الأجهزة المفعّلة",
|
||||||
|
@ -145,7 +145,7 @@
|
||||||
"HeaderAllowMediaDeletionFrom": "السماح بحذف الوسائط من قبل",
|
"HeaderAllowMediaDeletionFrom": "السماح بحذف الوسائط من قبل",
|
||||||
"HeaderApiKey": "مفتاح API",
|
"HeaderApiKey": "مفتاح API",
|
||||||
"HeaderApiKeys": "مفاتيح API",
|
"HeaderApiKeys": "مفاتيح API",
|
||||||
"HeaderApiKeysHelp": "التطبيقات الخارجية تحتاج أن تمتلك مفتاح api لكي تتصل بخادم أمبي. هذه المفاتيح تُصدر عن طريق تسجيل الدخول بحساب أمبي، أو عن طريق منح التطبيق مفتاحاً أصدر يدوياً.",
|
"HeaderApiKeysHelp": "التطبيقات الخارجية تحتاج أن تمتلك مفتاح api لكي تتصل بالخادم. هذه المفاتيح تُصدر عن طريق تسجيل الدخول بمستخدم عادي، أو عن طريق منح التطبيق مفتاحاً أصدر يدوياً.",
|
||||||
"HeaderApp": "التطبيق",
|
"HeaderApp": "التطبيق",
|
||||||
"HeaderAudioSettings": "إعدادات الصوت",
|
"HeaderAudioSettings": "إعدادات الصوت",
|
||||||
"HeaderBooks": "الكتب",
|
"HeaderBooks": "الكتب",
|
||||||
|
@ -232,7 +232,7 @@
|
||||||
"HeaderPreferredMetadataLanguage": "اللغة المفضلة لواصفات البيانات",
|
"HeaderPreferredMetadataLanguage": "اللغة المفضلة لواصفات البيانات",
|
||||||
"HeaderProfile": "الحساب",
|
"HeaderProfile": "الحساب",
|
||||||
"HeaderProfileInformation": "معلومات العريضة",
|
"HeaderProfileInformation": "معلومات العريضة",
|
||||||
"HeaderProfileServerSettingsHelp": "هذه القيم ستتحكم في كيفية تقديم شكل خادم أمبي في الجهاز",
|
"HeaderProfileServerSettingsHelp": "هذه القيم ستتحكم في كيفية تقديم شكل الخادم في للعملاء.",
|
||||||
"HeaderRecentlyPlayed": "تم تشغيله مؤخراً",
|
"HeaderRecentlyPlayed": "تم تشغيله مؤخراً",
|
||||||
"HeaderRecordingPostProcessing": "تطبيق ما-بعد-المعالجة للتسجيل",
|
"HeaderRecordingPostProcessing": "تطبيق ما-بعد-المعالجة للتسجيل",
|
||||||
"HeaderRemoteControl": "التحكم عن بعد",
|
"HeaderRemoteControl": "التحكم عن بعد",
|
||||||
|
@ -254,7 +254,7 @@
|
||||||
"HeaderSelectServerCachePath": "إختر مسار كاشة الخادم",
|
"HeaderSelectServerCachePath": "إختر مسار كاشة الخادم",
|
||||||
"HeaderSelectServerCachePathHelp": "تصفح أو أدخل المسار الذي ترغب أن يُستخدم كاشة لملفات الخادم. يجب أن يكون هذا المجلد قابل للكتابة فيه.",
|
"HeaderSelectServerCachePathHelp": "تصفح أو أدخل المسار الذي ترغب أن يُستخدم كاشة لملفات الخادم. يجب أن يكون هذا المجلد قابل للكتابة فيه.",
|
||||||
"HeaderSelectTranscodingPath": "إختر المسار المؤقت للتشفير البيني",
|
"HeaderSelectTranscodingPath": "إختر المسار المؤقت للتشفير البيني",
|
||||||
"HeaderSelectTranscodingPathHelp": "تصفح أو أدخل المسار الذي ترغب أن يُستخدم للملفات المؤقتة للتشفير البيني. يجب أن يكون هذا المجلد قابل للكتابة فيه.",
|
"HeaderSelectTranscodingPathHelp": "تصفح أو أدخل المسار الذي ترغب أن يُستخدم لملفات التشفير البيني. يجب أن يكون هذا المجلد قابل للكتابة فيه.",
|
||||||
"HeaderSendMessage": "أرسل رسالة",
|
"HeaderSendMessage": "أرسل رسالة",
|
||||||
"HeaderSeries": "المسلسلات",
|
"HeaderSeries": "المسلسلات",
|
||||||
"HeaderServerSettings": "إعدادات الخادم",
|
"HeaderServerSettings": "إعدادات الخادم",
|
||||||
|
@ -291,17 +291,17 @@
|
||||||
"HeaderXmlSettings": "إعدادات xml",
|
"HeaderXmlSettings": "إعدادات xml",
|
||||||
"HeaderYears": "السنوات",
|
"HeaderYears": "السنوات",
|
||||||
"HeadersFolders": "مجلدات",
|
"HeadersFolders": "مجلدات",
|
||||||
"ImportFavoriteChannelsHelp": "عند التفعيل، فقط القنوات التي علّمت في المفضلة على هذا المولف ستورد إلى النظام.",
|
"ImportFavoriteChannelsHelp": "فقط القنوات التي علّمت في المفضلة على جهاز المولف ستورد.",
|
||||||
"ImportMissingEpisodesHelp": "عند التمكين، المعلومات الناقصة للحلقات ستورّد إلى قاعدة بيانات أمبي وستعرض داخل المواسم والمسلسلات. قد تتسبب هذه بأوقات أطول بكثير عند تمشيط المكنبات.",
|
"ImportMissingEpisodesHelp": "المعلومات الناقصة للحلقات ستورّد إلى قاعدة بياناتك وستعرض داخل المواسم والمسلسلات. قد تتسبب هذه بأوقات أطول بكثير عند تمشيط المكتبات.",
|
||||||
"LabelAbortedByServerShutdown": "(تم إهماله بسبب عملية إغلاق الخادم)",
|
"LabelAbortedByServerShutdown": "(تم إهماله بسبب عملية إغلاق الخادم)",
|
||||||
"LabelAccessDay": "يوم الأسبوع:",
|
"LabelAccessDay": "يوم الأسبوع:",
|
||||||
"LabelAccessEnd": "تاريخ النهاية",
|
"LabelAccessEnd": "وقت النهاية:",
|
||||||
"LabelAccessStart": "تاريخ البداية",
|
"LabelAccessStart": "وقت البداية:",
|
||||||
"LabelAirDays": "أيام البث:",
|
"LabelAirDays": "أيام البث:",
|
||||||
"LabelAirTime": "وقت البث:",
|
"LabelAirTime": "وقت البث:",
|
||||||
"LabelAlbum": "الألبوم",
|
"LabelAlbum": "الألبوم:",
|
||||||
"LabelAlbumArtHelp": "PN المستخدمة في رسومات الألبوم، داخل سمة dlna:profileID في upnp:albumArtURI. بعض الأجهزة تحتاج قيمة محددة، مهما كان حجم الصورة.",
|
"LabelAlbumArtHelp": "PN المستخدمة في رسومات الألبوم، داخل سمة dlna:profileID في upnp:albumArtURI. بعض الأجهزة تحتاج قيمة محددة، مهما كان حجم الصورة.",
|
||||||
"LabelAlbumArtMaxHeight": "الارتفاع الأقصى لرسومات الألبوم",
|
"LabelAlbumArtMaxHeight": "الارتفاع الأقصى لرسومات الألبوم:",
|
||||||
"LabelAlbumArtMaxHeightHelp": "الدقة القصوى لرسومات الألبوم المظهّرة عبر سمة upnp:albumArtURI.",
|
"LabelAlbumArtMaxHeightHelp": "الدقة القصوى لرسومات الألبوم المظهّرة عبر سمة upnp:albumArtURI.",
|
||||||
"LabelAlbumArtMaxWidth": "العرض الأقصى لرسوم الألبوم:",
|
"LabelAlbumArtMaxWidth": "العرض الأقصى لرسوم الألبوم:",
|
||||||
"LabelAlbumArtMaxWidthHelp": "الدقة القصوى لرسومات الألبوم المظهّرة عبر سمة upnp:albumArtURI.",
|
"LabelAlbumArtMaxWidthHelp": "الدقة القصوى لرسومات الألبوم المظهّرة عبر سمة upnp:albumArtURI.",
|
||||||
|
@ -310,42 +310,42 @@
|
||||||
"LabelAll": "الجميع",
|
"LabelAll": "الجميع",
|
||||||
"LabelAllowHWTranscoding": "السماح بالتشفير البيني بعتاد الحاسب",
|
"LabelAllowHWTranscoding": "السماح بالتشفير البيني بعتاد الحاسب",
|
||||||
"LabelAppName": "اسم التطبيق",
|
"LabelAppName": "اسم التطبيق",
|
||||||
"LabelAppNameExample": "مثال: Sickbeard، NzbDrone",
|
"LabelAppNameExample": "مثال: Sickbeard، Sonarr",
|
||||||
"LabelArtists": "الفنانون:",
|
"LabelArtists": "الفنانون:",
|
||||||
"LabelArtistsHelp": "فصل الاستعمالات المتعددة ;",
|
"LabelArtistsHelp": "افصل بين الفنانين ب ; فاصلة منقوطة.",
|
||||||
"LabelAudioLanguagePreference": "اللغة المفضلة للصوت:",
|
"LabelAudioLanguagePreference": "اللغة المفضلة للصوت:",
|
||||||
"LabelBindToLocalNetworkAddress": "إربطه إلى عنوان شبكة محلي:",
|
"LabelBindToLocalNetworkAddress": "إربطه إلى عنوان شبكة محلي:",
|
||||||
"LabelBindToLocalNetworkAddressHelp": "هذا خياري. امتطي عنوان الآي بي المحلي لربطه بخادم http. إذا ترك فارغاً، فإن الخادم سيربطه بجميع العناوين المتاحة. تغيير هذه القيمة يتطلب إعادة تشغيل خادم أمبي.",
|
"LabelBindToLocalNetworkAddressHelp": "تجاوز عنوان الآي بي المحلي لربطه بخادم http. إذا ترك فارغاً، فإن الخادم سيربطه بجميع العناوين المتاحة. تغيير هذه القيمة يتطلب إعادة تشغيل خادم جيلليفن.",
|
||||||
"LabelBlastMessageInterval": "فترات بث رسالة قيد التشغيل (بالثواني)",
|
"LabelBlastMessageInterval": "فترات بث رسالة قيد التشغيل",
|
||||||
"LabelBlastMessageIntervalHelp": "يحدد الفترة بالثواني بين يث رسائل قيد التشغيل",
|
"LabelBlastMessageIntervalHelp": "يحدد الفترة بالثواني بين بث رسائل قيد التشغيل.",
|
||||||
"LabelCache": "ذاكرة الكاشة",
|
"LabelCache": "مَخبأ (كاش):",
|
||||||
"LabelCachePath": "مسار ذاكرة الكاشة:",
|
"LabelCachePath": "مسار ذاكرة الكاش:",
|
||||||
"LabelCachePathHelp": "حدد موقع مخصص لملفات كاشة الخادم، مثل الصور وغيرها. أترك هذه الخانة فارغة لاستعمال القيمة التلقائية.",
|
"LabelCachePathHelp": "حدد موقع مخصص لملفات الخادم المؤقتة، مثل الصور وغيرها. أترك هذه الخانة فارغة لاستعمال القيمة الافتراضية.",
|
||||||
"LabelCancelled": "تم الإلغاء",
|
"LabelCancelled": "تم الإلغاء",
|
||||||
"LabelCollection": "المجموعة",
|
"LabelCollection": "المجموعة:",
|
||||||
"LabelCommunityRating": "تقييم المجتمع:",
|
"LabelCommunityRating": "تقييم المجتمع:",
|
||||||
"LabelContentType": "نوع المحتوى",
|
"LabelContentType": "نوع المحتوى:",
|
||||||
"LabelCountry": "البلد:",
|
"LabelCountry": "البلد:",
|
||||||
"LabelCurrentPassword": "كلمة السر الحالية:",
|
"LabelCurrentPassword": "كلمة السر الحالية:",
|
||||||
"LabelCustomCertificatePath": "مسار شهادة ssl مخصص:",
|
"LabelCustomCertificatePath": "مسار شهادة SSL المخصص:",
|
||||||
"LabelCustomCertificatePathHelp": "مسار ملف PKCS # 12 يحتوي على شهادة ومفتاح خاص لتمكين دعم TLS على مجال مخصص.",
|
"LabelCustomCertificatePathHelp": "مسار ملف PKCS # 12 يحتوي على شهادة ومفتاح خاص لتمكين دعم TLS على مجال مخصص.",
|
||||||
"LabelCustomCss": "تنيسق CSS مخصوص:",
|
"LabelCustomCss": "تنيسق CSS مخصص:",
|
||||||
"LabelCustomCssHelp": "طبق تنسيق css مخصوصة لواجهة الويب.",
|
"LabelCustomCssHelp": "طبق تنسيقك css المخصص لواجهة الويب.",
|
||||||
"LabelCustomDeviceDisplayName": "اسم العرض:",
|
"LabelCustomDeviceDisplayName": "اسم العرض:",
|
||||||
"LabelCustomDeviceDisplayNameHelp": "أذكر اسم عرض مخصوص أو أتركه فارغاً لاستخدام",
|
"LabelCustomDeviceDisplayNameHelp": "أذكر اسم عرض مخصوص أو أتركه فارغاً لاستخدام الاسم المبلغ من الجهاز.",
|
||||||
"LabelDateAddedBehavior": "كيف يتصرف المحتوى الجديد نحو \"تاريخ الإضافة\" الخاص به:",
|
"LabelDateAddedBehavior": "كيف يتصرف المحتوى الجديد نحو \"تاريخ الإضافة\" الخاص به:",
|
||||||
"LabelDateAddedBehaviorHelp": "إذا استعرضت قيمة واصفات البيانا فإنها سوف تستخدم قبل أن تستخدم أي من هذه الخيارات.",
|
"LabelDateAddedBehaviorHelp": "إذا اخذت واصفات البيانات قيمة، فإنها سوف تستخدم قبل أن تستخدم أي من هذه الخيارات.",
|
||||||
"LabelDay": "اليوم:",
|
"LabelDay": "اليوم:",
|
||||||
"LabelDeathDate": "تاريخ الوفاة:",
|
"LabelDeathDate": "تاريخ الوفاة:",
|
||||||
"LabelDefaultUser": "المستخدم الافتراضي",
|
"LabelDefaultUser": "المستخدم الافتراضي:",
|
||||||
"LabelDefaultUserHelp": "لتحديد مكتبة المستخدم التي تظهر على الأجهزة المتصلة. بإمكان الامتطاء على هذه القيمة لكل جهاز عن طريق عرائض الأجهزة.",
|
"LabelDefaultUserHelp": "لتحديد مكتبة المستخدم التي تظهر على الأجهزة المتصلة. بإمكان الامتطاء على هذه القيمة لكل جهاز عن طريق عرائض الأجهزة.",
|
||||||
"LabelDeviceDescription": "وصف الجهاز",
|
"LabelDeviceDescription": "وصف الجهاز",
|
||||||
"LabelDidlMode": "طور didl:",
|
"LabelDidlMode": "طور DIDL:",
|
||||||
"LabelDisplayMissingEpisodesWithinSeasons": "أظهر الحلقات المفقودة في مجلدات المواسم",
|
"LabelDisplayMissingEpisodesWithinSeasons": "أظهر الحلقات المفقودة في مجلدات المواسم",
|
||||||
"LabelDisplayName": "الاسم المعروض:",
|
"LabelDisplayName": "الاسم المعروض:",
|
||||||
"LabelDisplaySpecialsWithinSeasons": "أظهر الحلقات الخاصة في المواسم التي بثت فيها",
|
"LabelDisplaySpecialsWithinSeasons": "أظهر الحلقات الخاصة في المواسم التي بثت فيها",
|
||||||
"LabelDownMixAudioScale": "تعزيز الصوت عند تقليل توزيع قنوات الصوت:",
|
"LabelDownMixAudioScale": "تعزيز الصوت عند تقليل توزيع قنوات الصوت:",
|
||||||
"LabelDownMixAudioScaleHelp": "تعزيز الصوت عند تقليل توزيع قنوات الصوت. حدد القيمة بـ 1 للمحافظة على القيمة الأصلية للصوت.",
|
"LabelDownMixAudioScaleHelp": "تعزيز الصوت عند تقليل توزيع قنوات الصوت. حدد القيمة ب 1 للمحافظة على القيمة الأصلية للصوت.",
|
||||||
"LabelDownloadLanguages": "إنزال اللغة:",
|
"LabelDownloadLanguages": "إنزال اللغة:",
|
||||||
"LabelDynamicExternalId": "معرفة {0}:",
|
"LabelDynamicExternalId": "معرفة {0}:",
|
||||||
"LabelEasyPinCode": "الرمز الشخصي الميسر:",
|
"LabelEasyPinCode": "الرمز الشخصي الميسر:",
|
||||||
|
@ -354,8 +354,8 @@
|
||||||
"LabelEnableAutomaticPortMap": "فعل الخاصية الآلية في التوفيق بين المنافذ",
|
"LabelEnableAutomaticPortMap": "فعل الخاصية الآلية في التوفيق بين المنافذ",
|
||||||
"LabelEnableAutomaticPortMapHelp": "حاول التوفيق بين المنفذ العالمي والمنفذ المحلي آلياً باستخدام آلية UPnP. هذه الخاصية قد لا تعمل مع بعض أنواع الراوترات.",
|
"LabelEnableAutomaticPortMapHelp": "حاول التوفيق بين المنفذ العالمي والمنفذ المحلي آلياً باستخدام آلية UPnP. هذه الخاصية قد لا تعمل مع بعض أنواع الراوترات.",
|
||||||
"LabelEnableBlastAliveMessages": "بث رسائل قيد التشغيل",
|
"LabelEnableBlastAliveMessages": "بث رسائل قيد التشغيل",
|
||||||
"LabelEnableBlastAliveMessagesHelp": "فعل هذه الخاصية إذا كان الخادم لا يكتشف بكفاءة من قبل أجهزة UPnP الأخرى على شبكتك",
|
"LabelEnableBlastAliveMessagesHelp": "فعل هذه الخاصية إذا كان الخادم لا يكتشف بكفاءة من قبل أجهزة UPnP الأخرى على شبكتك.",
|
||||||
"LabelEnableDlnaClientDiscoveryInterval": "فترات استكشاف العملاء (بالثواني)",
|
"LabelEnableDlnaClientDiscoveryInterval": "فترات استكشاف العملاء",
|
||||||
"LabelEnableDlnaClientDiscoveryIntervalHelp": "يحدد الفترة بالثواني بين عمليات بحث SSDP التي يقوم بها أمبي.",
|
"LabelEnableDlnaClientDiscoveryIntervalHelp": "يحدد الفترة بالثواني بين عمليات بحث SSDP التي يقوم بها أمبي.",
|
||||||
"LabelEnableDlnaDebugLogging": "تفعيل خاصية كشوفات أخطاء DLNA",
|
"LabelEnableDlnaDebugLogging": "تفعيل خاصية كشوفات أخطاء DLNA",
|
||||||
"LabelEnableDlnaDebugLoggingHelp": "هذه ستنشئ سجلات كشفية ضخمة ولا ينبغي تفعيلها إلا عند الحاجة إليها بغرض استكشاف الأخطاء وحصرها.",
|
"LabelEnableDlnaDebugLoggingHelp": "هذه ستنشئ سجلات كشفية ضخمة ولا ينبغي تفعيلها إلا عند الحاجة إليها بغرض استكشاف الأخطاء وحصرها.",
|
||||||
|
@ -930,7 +930,7 @@
|
||||||
"Backdrops": "خلفيات متغيرة للصفحة",
|
"Backdrops": "خلفيات متغيرة للصفحة",
|
||||||
"Backdrop": "خلفية متغيرة للصفحة",
|
"Backdrop": "خلفية متغيرة للصفحة",
|
||||||
"Auto": "تلقائي",
|
"Auto": "تلقائي",
|
||||||
"AuthProviderHelp": "حدد مقدم المصادقات ليتم استخدامه لمصادقة كلمة مرور هذا المستخدم.",
|
"AuthProviderHelp": "اختار مقدم المصادقة ليتم استخدامه لمصادقة كلمة مرور هذا المستخدم.",
|
||||||
"AroundTime": "حول",
|
"AroundTime": "حول",
|
||||||
"AttributeNew": "جديد",
|
"AttributeNew": "جديد",
|
||||||
"AspectRatio": "نسبة العرض الى الارتفاع",
|
"AspectRatio": "نسبة العرض الى الارتفاع",
|
||||||
|
@ -1038,7 +1038,7 @@
|
||||||
"Director": "المخرج",
|
"Director": "المخرج",
|
||||||
"DirectPlaying": "بث بدون تحويل الصيغة",
|
"DirectPlaying": "بث بدون تحويل الصيغة",
|
||||||
"DirectStreaming": "البث المباشر",
|
"DirectStreaming": "البث المباشر",
|
||||||
"DirectStreamHelp2": "البث المباشر للملف يستخدم طاقة معالجة قليلة جدًا دون أي خسارة في جودة الفيديو.",
|
"DirectStreamHelp2": "البث المباشر للملف يستخدم قوة معالجة قليلة جدًا دون أي خسارة في جودة الفيديو.",
|
||||||
"DirectStreamHelp1": "الوسائط متوافقة مع الجهاز فيما يتعلق بالدقة ونوع الوسائط (H.264 ، AC3 ، إلخ) ، ولكنها في حاوية ملفات غير متوافقة (mkv ، avi ، wmv ، إلخ). سيتم إعادة حزم الفيديو في الوقت الحقيقي قبل بثه إلى الجهاز.",
|
"DirectStreamHelp1": "الوسائط متوافقة مع الجهاز فيما يتعلق بالدقة ونوع الوسائط (H.264 ، AC3 ، إلخ) ، ولكنها في حاوية ملفات غير متوافقة (mkv ، avi ، wmv ، إلخ). سيتم إعادة حزم الفيديو في الوقت الحقيقي قبل بثه إلى الجهاز.",
|
||||||
"DetectingDevices": "يتم الكشف عن الأجهزة",
|
"DetectingDevices": "يتم الكشف عن الأجهزة",
|
||||||
"Desktop": "سطح المكتب",
|
"Desktop": "سطح المكتب",
|
||||||
|
@ -1139,5 +1139,51 @@
|
||||||
"Dislike": "لم يعجبنى",
|
"Dislike": "لم يعجبنى",
|
||||||
"ButtonSyncPlay": "SyncPlay",
|
"ButtonSyncPlay": "SyncPlay",
|
||||||
"ExtraLarge": "كبير جدا",
|
"ExtraLarge": "كبير جدا",
|
||||||
"EnableNextVideoInfoOverlayHelp": "في نهاية الفيديو, عرض معلومات عن الفيديو القادم في قائمة التشغيل."
|
"EnableNextVideoInfoOverlayHelp": "في نهاية الفيديو, عرض معلومات عن الفيديو القادم في قائمة التشغيل.",
|
||||||
|
"LabelDroppedFrames": "الاطارات الساقطة:",
|
||||||
|
"LabelDropImageHere": "اسقط صورة هنا، او ضغط تصفح.",
|
||||||
|
"LabelDisplayOrder": "ترتيب المعروض:",
|
||||||
|
"LabelDisplayMode": "وضع المعروض:",
|
||||||
|
"LabelDisplayLanguageHelp": "ترجمة جيلليفين هو مشروع مستمر.",
|
||||||
|
"LabelDisplayLanguage": "لغة العرض:",
|
||||||
|
"LabelDiscNumber": "رقم القرص:",
|
||||||
|
"LabelDeinterlaceMethod": "طريقة تقليل التشابك:",
|
||||||
|
"LabelDefaultScreen": "الشاشة الافتراضية:",
|
||||||
|
"LabelDateTimeLocale": "وقت و تاريخ محلي:",
|
||||||
|
"LabelDateAdded": "تاريخ الاضافة:",
|
||||||
|
"LabelCustomRating": "تقييم مخصص:",
|
||||||
|
"LabelCriticRating": "تقييم النقاد:",
|
||||||
|
"LabelCorruptedFrames": "الإطارات التالفة:",
|
||||||
|
"LabelChannels": "القنوات:",
|
||||||
|
"LabelCertificatePasswordHelp": "اذا تطلبت شهادتك الامنية كلمة مرور، من فضلك ادخلها هنا.",
|
||||||
|
"LabelCertificatePassword": "كلمة مرور الشهادة الامنية:",
|
||||||
|
"LabelBurnSubtitles": "الترجمات المحروقة:",
|
||||||
|
"LabelBlockContentWithTags": "احجب العناصر بالعلامات:",
|
||||||
|
"LabelBitrate": "معدل البت:",
|
||||||
|
"LabelBirthYear": "عام الميلاد:",
|
||||||
|
"LabelBirthDate": "تاريخ الميلاد:",
|
||||||
|
"LabelAutomaticallyRefreshInternetMetadataEvery": "حدث وصف البيانات تلقائيا من الانترنت:",
|
||||||
|
"LabelAuthProvider": "مقدم التصديق:",
|
||||||
|
"LabelAudioSampleRate": "سرعة معينة الصوت:",
|
||||||
|
"LabelAudioCodec": "ترميز الصوت:",
|
||||||
|
"LabelAudioChannels": "قنوات الصوت:",
|
||||||
|
"LabelAudioBitrate": "معدل بث الصوت:",
|
||||||
|
"LabelAudioBitDepth": "عمق بث الصوت:",
|
||||||
|
"LabelAudio": "الصوت",
|
||||||
|
"LabelAllowedRemoteAddressesMode": "وضع مرشح عنوان المضيف IP البعيد:",
|
||||||
|
"LabelAllowedRemoteAddresses": "مرشح عنوان المضيف IP البعيد:",
|
||||||
|
"LabelAirsBeforeSeason": "عروض بث قبل الموسم:",
|
||||||
|
"LabelAirsBeforeEpisode": "عروض بث قبل الحلقة:",
|
||||||
|
"LabelAirsAfterSeason": "عروض بث بعد الموسم:",
|
||||||
|
"Label3DFormat": "صيغة ثلاثية الابعاد:",
|
||||||
|
"Kids": "اطفال",
|
||||||
|
"Items": "عناصر",
|
||||||
|
"ItemCount": "{0} عنصر",
|
||||||
|
"InstantMix": "خلط فوري",
|
||||||
|
"HeaderSyncPlayEnabled": "تزامن اللعب ممكَّن",
|
||||||
|
"HeaderSyncPlaySelectGroup": "انضم لمجموعة",
|
||||||
|
"EnableDetailsBannerHelp": "اظهر صوره اللافته اعلى عنصر تفاصيل الصفحة.",
|
||||||
|
"EnableDetailsBanner": "لافتة التفاصيل",
|
||||||
|
"EnableDecodingColorDepth10Vp9": "تمكين ترميز ال10 بت عبر العتاد الصلب من اجل VP9",
|
||||||
|
"EnableDecodingColorDepth10Hevc": "تمكين ترميز ال10 بت عبر العتاد الصلب من اجل HEVC"
|
||||||
}
|
}
|
||||||
|
|
|
@ -1542,5 +1542,8 @@
|
||||||
"ViewAlbumArtist": "Zeige Albumkünstler",
|
"ViewAlbumArtist": "Zeige Albumkünstler",
|
||||||
"PreviousTrack": "Zum Vorherigen springen",
|
"PreviousTrack": "Zum Vorherigen springen",
|
||||||
"NextTrack": "Zum Nächsten springen",
|
"NextTrack": "Zum Nächsten springen",
|
||||||
"LabelUnstable": "Instabil"
|
"LabelUnstable": "Instabil",
|
||||||
|
"SubtitleVerticalPositionHelp": "Zeilennummer, in der der Text angezeigt wird. Positive Zahlen geben die Zeile von oben an. Negative Zahlen geben die Zeile von unten an.",
|
||||||
|
"Preview": "Vorschau",
|
||||||
|
"LabelSubtitleVerticalPosition": "Vertikale Position:"
|
||||||
}
|
}
|
||||||
|
|
|
@ -1282,6 +1282,8 @@
|
||||||
"PleaseRestartServerName": "Please restart Jellyfin Server - {0}.",
|
"PleaseRestartServerName": "Please restart Jellyfin Server - {0}.",
|
||||||
"PleaseSelectTwoItems": "Please select at least two items.",
|
"PleaseSelectTwoItems": "Please select at least two items.",
|
||||||
"MessagePluginInstalled": "The plugin has been successfully installed. Jellyfin Server will need to be restarted for changes to take effect.",
|
"MessagePluginInstalled": "The plugin has been successfully installed. Jellyfin Server will need to be restarted for changes to take effect.",
|
||||||
|
"MessagePluginInstallError": "An error occured while installing the plugin.",
|
||||||
|
"MessageGetInstalledPluginsError": "An error occured while getting the list of currently installed plugins.",
|
||||||
"PreferEmbeddedTitlesOverFileNames": "Prefer embedded titles over filenames",
|
"PreferEmbeddedTitlesOverFileNames": "Prefer embedded titles over filenames",
|
||||||
"PreferEmbeddedTitlesOverFileNamesHelp": "This determines the default display title when no internet metadata or local metadata is available.",
|
"PreferEmbeddedTitlesOverFileNamesHelp": "This determines the default display title when no internet metadata or local metadata is available.",
|
||||||
"PreferEmbeddedEpisodeInfosOverFileNamesHelp": "This uses the episode information from the embedded metadata if available.",
|
"PreferEmbeddedEpisodeInfosOverFileNamesHelp": "This uses the episode information from the embedded metadata if available.",
|
||||||
|
@ -1542,5 +1544,8 @@
|
||||||
"ButtonCast": "Cast",
|
"ButtonCast": "Cast",
|
||||||
"ButtonPlayer": "Player",
|
"ButtonPlayer": "Player",
|
||||||
"StopPlayback": "Stop playback",
|
"StopPlayback": "Stop playback",
|
||||||
"ClearQueue": "Clear queue"
|
"ClearQueue": "Clear queue",
|
||||||
|
"LabelSubtitleVerticalPosition": "Vertical position:",
|
||||||
|
"SubtitleVerticalPositionHelp": "Line number where text appears. Positive numbers indicate top down. Negative numbers indicate bottom up.",
|
||||||
|
"Preview": "Preview"
|
||||||
}
|
}
|
||||||
|
|
|
@ -1542,5 +1542,8 @@
|
||||||
"ViewAlbumArtist": "Voir l'album de l'artiste",
|
"ViewAlbumArtist": "Voir l'album de l'artiste",
|
||||||
"PreviousTrack": "Revenir au précédent",
|
"PreviousTrack": "Revenir au précédent",
|
||||||
"NextTrack": "Passer au prochain",
|
"NextTrack": "Passer au prochain",
|
||||||
"LabelUnstable": "Instable"
|
"LabelUnstable": "Instable",
|
||||||
|
"Preview": "Aperçu",
|
||||||
|
"SubtitleVerticalPositionHelp": "Numéro de ligne où le texte apparaît. Un nombre positif compte les lignes de haut en bas. Un nombre négatif, de bas en haut.",
|
||||||
|
"LabelSubtitleVerticalPosition": "Position verticale :"
|
||||||
}
|
}
|
||||||
|
|
|
@ -471,7 +471,7 @@
|
||||||
"TabTrailers": "טריילרים",
|
"TabTrailers": "טריילרים",
|
||||||
"TabTranscoding": "קידוד",
|
"TabTranscoding": "קידוד",
|
||||||
"TabUpcoming": "בקרוב",
|
"TabUpcoming": "בקרוב",
|
||||||
"Tags": "תגים",
|
"Tags": "מילות מפתח",
|
||||||
"TellUsAboutYourself": "ספר לנו על עצמך",
|
"TellUsAboutYourself": "ספר לנו על עצמך",
|
||||||
"ThisWizardWillGuideYou": "אשף זה יעזור לך בהתליך ההתקנה.",
|
"ThisWizardWillGuideYou": "אשף זה יעזור לך בהתליך ההתקנה.",
|
||||||
"Thursday": "חמישי",
|
"Thursday": "חמישי",
|
||||||
|
@ -588,7 +588,7 @@
|
||||||
"MessageConfirmRestart": "האם אתה בטוח שברצונך לאתחל את שרת ה-Jellyfin?",
|
"MessageConfirmRestart": "האם אתה בטוח שברצונך לאתחל את שרת ה-Jellyfin?",
|
||||||
"HeaderThisUserIsCurrentlyDisabled": "משתמש זה אינו פעיל כרגע",
|
"HeaderThisUserIsCurrentlyDisabled": "משתמש זה אינו פעיל כרגע",
|
||||||
"HeaderTaskTriggers": "טריגרים של המשימה",
|
"HeaderTaskTriggers": "טריגרים של המשימה",
|
||||||
"HeaderTags": "תגיות",
|
"HeaderTags": "מילות מפתח",
|
||||||
"HeaderStopRecording": "עצור הקלטה",
|
"HeaderStopRecording": "עצור הקלטה",
|
||||||
"HeaderSortOrder": "סדר מיון",
|
"HeaderSortOrder": "סדר מיון",
|
||||||
"HeaderSortBy": "מיין לפי",
|
"HeaderSortBy": "מיין לפי",
|
||||||
|
@ -867,5 +867,7 @@
|
||||||
"OptionEveryday": "כל יום",
|
"OptionEveryday": "כל יום",
|
||||||
"OptionEnableExternalContentInSuggestions": "הפעל תוכן חיצוני בהמלצות",
|
"OptionEnableExternalContentInSuggestions": "הפעל תוכן חיצוני בהמלצות",
|
||||||
"OptionEnableAccessToAllLibraries": "אפשר גישה לכל הספריות",
|
"OptionEnableAccessToAllLibraries": "אפשר גישה לכל הספריות",
|
||||||
"OptionEnableAccessToAllChannels": "אפשר גישה לכל הערוצים"
|
"OptionEnableAccessToAllChannels": "אפשר גישה לכל הערוצים",
|
||||||
|
"HeaderSyncPlaySelectGroup": "הצטרף לקבוצה",
|
||||||
|
"TabUsers": "משתמשים"
|
||||||
}
|
}
|
||||||
|
|
|
@ -378,7 +378,7 @@
|
||||||
"HeaderPreferredMetadataLanguage": "Gewenste metadata taal",
|
"HeaderPreferredMetadataLanguage": "Gewenste metadata taal",
|
||||||
"HeaderProfile": "Profiel",
|
"HeaderProfile": "Profiel",
|
||||||
"HeaderProfileInformation": "Profiel Informatie",
|
"HeaderProfileInformation": "Profiel Informatie",
|
||||||
"HeaderProfileServerSettingsHelp": "Deze waarden bepalen hoe Jellyfin Server zich zal presenteren aan het apparaat.",
|
"HeaderProfileServerSettingsHelp": "Deze waarden bepalen hoe de server zich zal presenteren aan het apparaat.",
|
||||||
"HeaderRecentlyPlayed": "Recent afgespeeld",
|
"HeaderRecentlyPlayed": "Recent afgespeeld",
|
||||||
"HeaderRecordingOptions": "Opname instellingen",
|
"HeaderRecordingOptions": "Opname instellingen",
|
||||||
"HeaderRecordingPostProcessing": "Opname nabewerking",
|
"HeaderRecordingPostProcessing": "Opname nabewerking",
|
||||||
|
@ -396,13 +396,13 @@
|
||||||
"HeaderSecondsValue": "{0} Seconden",
|
"HeaderSecondsValue": "{0} Seconden",
|
||||||
"HeaderSelectCertificatePath": "Selecteer Certificaat Pad",
|
"HeaderSelectCertificatePath": "Selecteer Certificaat Pad",
|
||||||
"HeaderSelectMetadataPath": "Selecteer Metadata Pad",
|
"HeaderSelectMetadataPath": "Selecteer Metadata Pad",
|
||||||
"HeaderSelectMetadataPathHelp": "Blader of voer het pad in dat u wilt gebruiken om metadata in op te slaan. De map moet beschrijfbaar zijn.",
|
"HeaderSelectMetadataPathHelp": "Blader of voer het pad in dat u wilt gebruiken om metadata in op te slaan. De map moet schrijfbaar zijn.",
|
||||||
"HeaderSelectPath": "Selecteer Pad",
|
"HeaderSelectPath": "Selecteer Pad",
|
||||||
"HeaderSelectServer": "Selecteer server",
|
"HeaderSelectServer": "Selecteer server",
|
||||||
"HeaderSelectServerCachePath": "Selecteer Server Cache Pad",
|
"HeaderSelectServerCachePath": "Selecteer Server Cache Pad",
|
||||||
"HeaderSelectServerCachePathHelp": "Bladeren of voer het pad in om te gebruiken voor server cache-bestanden. De map moet beschrijfbaar zijn.",
|
"HeaderSelectServerCachePathHelp": "Bladeren of voer het pad in om te gebruiken voor server cache-bestanden. De map moet beschrijfbaar zijn.",
|
||||||
"HeaderSelectTranscodingPath": "Selecteer Tijdelijke Transcodeer Pad",
|
"HeaderSelectTranscodingPath": "Selecteer Tijdelijke Transcodeer Pad",
|
||||||
"HeaderSelectTranscodingPathHelp": "Bladeren of voer het pad in om te gebruiken voor het transcoderen van tijdelijke bestanden. De map moet beschrijfbaar zijn.",
|
"HeaderSelectTranscodingPathHelp": "Blader of voer het pad in om te gebruiken voor het transcoderen van tijdelijke bestanden. De map moet schrijfbaar zijn.",
|
||||||
"HeaderSendMessage": "Stuur bericht",
|
"HeaderSendMessage": "Stuur bericht",
|
||||||
"HeaderSeries": "Series",
|
"HeaderSeries": "Series",
|
||||||
"HeaderSeriesOptions": "Series Opties",
|
"HeaderSeriesOptions": "Series Opties",
|
||||||
|
@ -1255,7 +1255,7 @@
|
||||||
"HeaderGenres": "Genres",
|
"HeaderGenres": "Genres",
|
||||||
"HeaderHttpHeaders": "HTTP Headers",
|
"HeaderHttpHeaders": "HTTP Headers",
|
||||||
"HeaderStatus": "Status",
|
"HeaderStatus": "Status",
|
||||||
"AuthProviderHelp": "Selecteer een Authenticatie Provider om het wachtwoord van deze gebruiker te verifiëren.",
|
"AuthProviderHelp": "Selecteer een authenticatie provider om het wachtwoord van deze gebruiker te verifiëren.",
|
||||||
"HeaderFavoriteMovies": "Favoriete Films",
|
"HeaderFavoriteMovies": "Favoriete Films",
|
||||||
"HeaderFavoriteShows": "Favoriete shows",
|
"HeaderFavoriteShows": "Favoriete shows",
|
||||||
"HeaderFavoriteEpisodes": "Favoriete afleveringen",
|
"HeaderFavoriteEpisodes": "Favoriete afleveringen",
|
||||||
|
|
|
@ -61,9 +61,9 @@
|
||||||
"HeaderTaskTriggers": "Declanșatori Sarcini",
|
"HeaderTaskTriggers": "Declanșatori Sarcini",
|
||||||
"HeaderUsers": "Utilizatori",
|
"HeaderUsers": "Utilizatori",
|
||||||
"Help": "Ajutor",
|
"Help": "Ajutor",
|
||||||
"ImportMissingEpisodesHelp": "Dacă este activată, informația despre episoadele lipsă va fi importată in baza de date Jellyfin și va fi afișată în cadrul serialelor. Aceasta poate cauza un timp semnificativ mai îndelungat la scanarea bibliotecilor.",
|
"ImportMissingEpisodesHelp": "Informația despre episoadele lipsă va fi importată în baza de date și va fi afișată în cadrul serialelor. Aceasta poate cauza un timp semnificativ mai îndelungat la scanarea bibliotecilor.",
|
||||||
"LabelArtists": "Artisti:",
|
"LabelArtists": "Artisti:",
|
||||||
"LabelArtistsHelp": "Separare multiplă utilizând ;",
|
"LabelArtistsHelp": "Separară înșiruirea artiștilor utilizând ;",
|
||||||
"LabelAudioLanguagePreference": "Preferințe de limbă pentru audio:",
|
"LabelAudioLanguagePreference": "Preferințe de limbă pentru audio:",
|
||||||
"LabelCachePath": "Cale pentru depozit:",
|
"LabelCachePath": "Cale pentru depozit:",
|
||||||
"LabelCachePathHelp": "Specificați o locație specială pentru fișierele de tip depozit, precum imagini etc. Lasați gol pentru a folosi setarea implicită.",
|
"LabelCachePathHelp": "Specificați o locație specială pentru fișierele de tip depozit, precum imagini etc. Lasați gol pentru a folosi setarea implicită.",
|
||||||
|
@ -82,7 +82,7 @@
|
||||||
"LabelMetadataPath": "Cale pentru metadata:",
|
"LabelMetadataPath": "Cale pentru metadata:",
|
||||||
"LabelMetadataPathHelp": "Specificați o locație specială pentru a descărca postere și metadata.",
|
"LabelMetadataPathHelp": "Specificați o locație specială pentru a descărca postere și metadata.",
|
||||||
"LabelMinBackdropDownloadWidth": "Lățimea maximă pentru fundalurile descărcate:",
|
"LabelMinBackdropDownloadWidth": "Lățimea maximă pentru fundalurile descărcate:",
|
||||||
"LabelMovieRecordingPath": "Calea pentru înregistrări filme (opțional):",
|
"LabelMovieRecordingPath": "Calea pentru înregistrări filme:",
|
||||||
"LabelName": "Nume:",
|
"LabelName": "Nume:",
|
||||||
"LabelNewPassword": "Parola nouă:",
|
"LabelNewPassword": "Parola nouă:",
|
||||||
"LabelNewPasswordConfirm": "Confirmă parola nouă:",
|
"LabelNewPasswordConfirm": "Confirmă parola nouă:",
|
||||||
|
@ -96,7 +96,7 @@
|
||||||
"LabelSaveLocalMetadata": "Salvează posterele si metadata în dosarele ce conțin fișierele media",
|
"LabelSaveLocalMetadata": "Salvează posterele si metadata în dosarele ce conțin fișierele media",
|
||||||
"LabelSaveLocalMetadataHelp": "Salvând posterele și metadata direct in dosarele media, acestea vor fi mai accesibile pentru a fi modificate.",
|
"LabelSaveLocalMetadataHelp": "Salvând posterele și metadata direct in dosarele media, acestea vor fi mai accesibile pentru a fi modificate.",
|
||||||
"LabelSelectUsers": "Selectare utilizatori:",
|
"LabelSelectUsers": "Selectare utilizatori:",
|
||||||
"LabelSeriesRecordingPath": "Calea pentru înregistrări seriale (opțional):",
|
"LabelSeriesRecordingPath": "Calea pentru înregistrări de seriale:",
|
||||||
"LabelStopWhenPossible": "Oprește când este posibil:",
|
"LabelStopWhenPossible": "Oprește când este posibil:",
|
||||||
"LabelTimeLimitHours": "Limită de timp(ore):",
|
"LabelTimeLimitHours": "Limită de timp(ore):",
|
||||||
"LabelTranscodingTempPathHelp": "Specificați o cale specială pentru fișierele transcodate trimise clienților. Lasați gol pentru a folosi pe cea implicită în directorul de lucru al serverului.",
|
"LabelTranscodingTempPathHelp": "Specificați o cale specială pentru fișierele transcodate trimise clienților. Lasați gol pentru a folosi pe cea implicită în directorul de lucru al serverului.",
|
||||||
|
@ -133,7 +133,7 @@
|
||||||
"OptionDatePlayed": "Dată Rulare",
|
"OptionDatePlayed": "Dată Rulare",
|
||||||
"OptionDescending": "Descrescător",
|
"OptionDescending": "Descrescător",
|
||||||
"OptionDisableUser": "Dezactivați acest utilizator",
|
"OptionDisableUser": "Dezactivați acest utilizator",
|
||||||
"OptionDisableUserHelp": "Dacă este dezactivat, serverul nu va permite nicio conexiune de la acest utilizator. Conexiunile existente vor fi terminate brusc.",
|
"OptionDisableUserHelp": "Serverul nu va permite nici o conexiune de la acest utilizator. Conexiunile existente vor fi terminate brusc.",
|
||||||
"OptionDislikes": "Dislike-uri",
|
"OptionDislikes": "Dislike-uri",
|
||||||
"OptionDownloadArtImage": "Fundal",
|
"OptionDownloadArtImage": "Fundal",
|
||||||
"OptionDownloadBackImage": "Înapoi",
|
"OptionDownloadBackImage": "Înapoi",
|
||||||
|
@ -419,7 +419,7 @@
|
||||||
"HeaderExternalIds": "ID-uri Externe:",
|
"HeaderExternalIds": "ID-uri Externe:",
|
||||||
"HeaderFavoriteBooks": "Cărți Favorite",
|
"HeaderFavoriteBooks": "Cărți Favorite",
|
||||||
"HeaderBranding": "Marca",
|
"HeaderBranding": "Marca",
|
||||||
"HeaderApiKeysHelp": "Aplicațiile externe trebuie să aibă o cheie API pentru a comunica cu Jellyfin Server. Cheile sunt emise prin conectarea cu un cont Jellyfin sau prin acordarea manuală a unei chei aplicației.",
|
"HeaderApiKeysHelp": "Aplicațiile externe trebuie să aibă o cheie API pentru a comunica cu serverul. Cheile sunt emise prin conectarea cu un cont de utilizator sau prin acordarea manuală a unei chei aplicației.",
|
||||||
"Sync": "Sincronizare",
|
"Sync": "Sincronizare",
|
||||||
"ErrorAddingXmlTvFile": "A apărut o eroare la accesarea fișierului XMLTV. Vă rugăm să vă asigurați că fișierul există și încercați din nou.",
|
"ErrorAddingXmlTvFile": "A apărut o eroare la accesarea fișierului XMLTV. Vă rugăm să vă asigurați că fișierul există și încercați din nou.",
|
||||||
"HeaderApiKey": "Cheie API",
|
"HeaderApiKey": "Cheie API",
|
||||||
|
@ -459,7 +459,7 @@
|
||||||
"HeaderMyMediaSmall": "Fișierele mele Media ( micșorat )",
|
"HeaderMyMediaSmall": "Fișierele mele Media ( micșorat )",
|
||||||
"HeaderNewApiKey": "Nouă cheie API",
|
"HeaderNewApiKey": "Nouă cheie API",
|
||||||
"HeaderNewDevices": "Dispozitive noi",
|
"HeaderNewDevices": "Dispozitive noi",
|
||||||
"HeaderKodiMetadataHelp": "Pentru a activa sau dezactiva metadatele NFO, editați o bibliotecă, în configurarea bibliotecii Jellyfin, și localizați secțiunea de salvare a metadatelor.",
|
"HeaderKodiMetadataHelp": "Pentru a activa sau dezactiva metadatele NFO, editați o bibliotecă, și localizați secțiunea de salvare a metadatelor.",
|
||||||
"HeaderNextVideoPlayingInValue": "Următorul video se redă în {0}",
|
"HeaderNextVideoPlayingInValue": "Următorul video se redă în {0}",
|
||||||
"HeaderOnNow": "Pornit Acum",
|
"HeaderOnNow": "Pornit Acum",
|
||||||
"HeaderOtherItems": "Alte Elemente",
|
"HeaderOtherItems": "Alte Elemente",
|
||||||
|
@ -475,7 +475,7 @@
|
||||||
"HeaderPlaybackError": "Eroare la redare",
|
"HeaderPlaybackError": "Eroare la redare",
|
||||||
"HeaderPluginInstallation": "Instalare Plugin",
|
"HeaderPluginInstallation": "Instalare Plugin",
|
||||||
"HeaderProfileInformation": "Informații Profil",
|
"HeaderProfileInformation": "Informații Profil",
|
||||||
"HeaderProfileServerSettingsHelp": "Aceste valori controlează modul în care Jellyfin Server va fi reprezentat in dispozitiv.",
|
"HeaderProfileServerSettingsHelp": "Aceste valori controlează modul în care serverul va fi reprezentat in dispozitivele clientilor.",
|
||||||
"HeaderRecordingOptions": "Opțiuni Înregistrare",
|
"HeaderRecordingOptions": "Opțiuni Înregistrare",
|
||||||
"HeaderRecordingPostProcessing": "Post procesarea înregistrării",
|
"HeaderRecordingPostProcessing": "Post procesarea înregistrării",
|
||||||
"HeaderRemoveMediaFolder": "Eliminați Dosarul Media",
|
"HeaderRemoveMediaFolder": "Eliminați Dosarul Media",
|
||||||
|
@ -614,7 +614,7 @@
|
||||||
"HeaderSelectServer": "Selectați Serverul",
|
"HeaderSelectServer": "Selectați Serverul",
|
||||||
"HeaderSelectServerCachePath": "Selectați ruta pentru Server Cache",
|
"HeaderSelectServerCachePath": "Selectați ruta pentru Server Cache",
|
||||||
"HeaderSelectTranscodingPath": "Selectați ruta temporară pentru transcodare",
|
"HeaderSelectTranscodingPath": "Selectați ruta temporară pentru transcodare",
|
||||||
"HeaderSelectTranscodingPathHelp": "Căutați sau introduceți ruta dosarului de utilizat pentru transcodarea fișierelor temporare. Dosarul trebuie permisiuni de scriere.",
|
"HeaderSelectTranscodingPathHelp": "Căutați sau introduceți ruta dosarului de utilizat pentru transcodarea fișierelor. Dosarul trebuie permisiuni de scriere.",
|
||||||
"HeaderSendMessage": "Trimite Mesaj",
|
"HeaderSendMessage": "Trimite Mesaj",
|
||||||
"HeaderSeriesOptions": "Opțiuni Seriale",
|
"HeaderSeriesOptions": "Opțiuni Seriale",
|
||||||
"HeaderSeriesStatus": "Starea Serialelor",
|
"HeaderSeriesStatus": "Starea Serialelor",
|
||||||
|
@ -675,7 +675,7 @@
|
||||||
"LabelSeasonNumber": "Numărul sezonului:",
|
"LabelSeasonNumber": "Numărul sezonului:",
|
||||||
"LabelScreensaver": "Protector de ecran:",
|
"LabelScreensaver": "Protector de ecran:",
|
||||||
"LabelScheduledTaskLastRan": "Ultima redare{0}, cu durata {1}.",
|
"LabelScheduledTaskLastRan": "Ultima redare{0}, cu durata {1}.",
|
||||||
"LabelRuntimeMinutes": "Timp de redare (minute):",
|
"LabelRuntimeMinutes": "Timp de redare:",
|
||||||
"LabelRemoteClientBitrateLimitHelp": "O limită de biți per-stream opțională pentru toate dispozitivele din rețea. Acest lucru este util pentru a împiedica dispozitivele să solicite un bitrate mai mare decât poate gestiona conexiunea dvs. de internet. Acest lucru poate duce la creșterea încărcării procesorului pe serverul dvs. pentru a transcoda videoclipurile din zbor la un bitrate mai mic.",
|
"LabelRemoteClientBitrateLimitHelp": "O limită de biți per-stream opțională pentru toate dispozitivele din rețea. Acest lucru este util pentru a împiedica dispozitivele să solicite un bitrate mai mare decât poate gestiona conexiunea dvs. de internet. Acest lucru poate duce la creșterea încărcării procesorului pe serverul dvs. pentru a transcoda videoclipurile din zbor la un bitrate mai mic.",
|
||||||
"LabelRemoteClientBitrateLimit": "Limită de biți pentru streaming pe Internet (Mbps):",
|
"LabelRemoteClientBitrateLimit": "Limită de biți pentru streaming pe Internet (Mbps):",
|
||||||
"LabelReleaseDate": "Data lansării:",
|
"LabelReleaseDate": "Data lansării:",
|
||||||
|
@ -720,7 +720,7 @@
|
||||||
"LabelOriginalTitle": "Titlu original:",
|
"LabelOriginalTitle": "Titlu original:",
|
||||||
"LabelOriginalAspectRatio": "Raport aspect original:",
|
"LabelOriginalAspectRatio": "Raport aspect original:",
|
||||||
"LabelOptionalNetworkPathHelp": "Dacă acest folder este partajat în rețeaua dvs., furnizarea căii de partajare a rețelei poate permite aplicațiilor Jellyfin de pe alte dispozitive să acceseze fișiere media direct.",
|
"LabelOptionalNetworkPathHelp": "Dacă acest folder este partajat în rețeaua dvs., furnizarea căii de partajare a rețelei poate permite aplicațiilor Jellyfin de pe alte dispozitive să acceseze fișiere media direct.",
|
||||||
"LabelOptionalNetworkPath": "(Optional) Dosar partajat în rețea:",
|
"LabelOptionalNetworkPath": "Dosar partajat în rețea:",
|
||||||
"LabelNumber": "Număr:",
|
"LabelNumber": "Număr:",
|
||||||
"LabelNotificationEnabled": "Activează această notificare",
|
"LabelNotificationEnabled": "Activează această notificare",
|
||||||
"LabelNewsCategories": "Categoriile știrilor:",
|
"LabelNewsCategories": "Categoriile știrilor:",
|
||||||
|
@ -741,7 +741,7 @@
|
||||||
"LabelMinResumeDurationHelp": "Cea mai scurtă lungime video în secunde, care va salva locația de redare și vă va permite să reluați.",
|
"LabelMinResumeDurationHelp": "Cea mai scurtă lungime video în secunde, care va salva locația de redare și vă va permite să reluați.",
|
||||||
"LabelMinResumeDuration": "Durata minimă a reluării:",
|
"LabelMinResumeDuration": "Durata minimă a reluării:",
|
||||||
"LabelMethod": "Metoda:",
|
"LabelMethod": "Metoda:",
|
||||||
"LabelMetadataSaversHelp": "Alegeți formatele de fișiere pentru a vă salva metadatele.",
|
"LabelMetadataSaversHelp": "Alegeți formatele de fișiere pentru salvarea metadatele.",
|
||||||
"LabelMetadataSavers": "Salvări de metadate:",
|
"LabelMetadataSavers": "Salvări de metadate:",
|
||||||
"LabelMetadataReadersHelp": "Clasificați sursele preferate de metadate locale în ordinea priorității. Primul fișier găsit va fi citit.",
|
"LabelMetadataReadersHelp": "Clasificați sursele preferate de metadate locale în ordinea priorității. Primul fișier găsit va fi citit.",
|
||||||
"LabelMetadataReaders": "Cititori de metadate:",
|
"LabelMetadataReaders": "Cititori de metadate:",
|
||||||
|
@ -761,7 +761,7 @@
|
||||||
"LabelLoginDisclaimerHelp": "Un mesaj care va fi afișat în partea de jos a paginii de conectare.",
|
"LabelLoginDisclaimerHelp": "Un mesaj care va fi afișat în partea de jos a paginii de conectare.",
|
||||||
"LabelLoginDisclaimer": "Act de renunțare la autentificare:",
|
"LabelLoginDisclaimer": "Act de renunțare la autentificare:",
|
||||||
"LabelLockItemToPreventChanges": "Blocați acest element pentru a preveni modificările viitoare",
|
"LabelLockItemToPreventChanges": "Blocați acest element pentru a preveni modificările viitoare",
|
||||||
"LabelLocalHttpServerPortNumberHelp": "Portul TCP pe care serverul HTTP Jellyfin ar trebui să îl utilizeze.",
|
"LabelLocalHttpServerPortNumberHelp": "Portul TCP pentru serverul HTTP.",
|
||||||
"LabelLocalHttpServerPortNumber": "Portul local HTTP:",
|
"LabelLocalHttpServerPortNumber": "Portul local HTTP:",
|
||||||
"LabelLineup": "Echipa:",
|
"LabelLineup": "Echipa:",
|
||||||
"LabelLanNetworks": "Rețele LAN:",
|
"LabelLanNetworks": "Rețele LAN:",
|
||||||
|
@ -788,7 +788,7 @@
|
||||||
"LabelIconMaxWidth": "Lățimea maximă a pictogramei:",
|
"LabelIconMaxWidth": "Lățimea maximă a pictogramei:",
|
||||||
"LabelIconMaxHeightHelp": "Rezoluția maximă a pictogramelor expuse via upnp:icon.",
|
"LabelIconMaxHeightHelp": "Rezoluția maximă a pictogramelor expuse via upnp:icon.",
|
||||||
"LabelIconMaxHeight": "Înălțimea maximă a pictogramei:",
|
"LabelIconMaxHeight": "Înălțimea maximă a pictogramei:",
|
||||||
"LabelHttpsPortHelp": "Portul TCP pe care serverul HTTPS Jellyfin ar trebui sa îl utilizeze.",
|
"LabelHttpsPortHelp": "Portul TCP pentru serverul HTTPS.",
|
||||||
"LabelHttpsPort": "Portul local HTTPS:",
|
"LabelHttpsPort": "Portul local HTTPS:",
|
||||||
"LabelHomeScreenSectionValue": "Secțiunea ecranului de pornire {0}:",
|
"LabelHomeScreenSectionValue": "Secțiunea ecranului de pornire {0}:",
|
||||||
"LabelHomeNetworkQuality": "Calitatea pe rețeaua de domiciliu:",
|
"LabelHomeNetworkQuality": "Calitatea pe rețeaua de domiciliu:",
|
||||||
|
@ -816,7 +816,7 @@
|
||||||
"LabelEndDate": "Data de încheiere:",
|
"LabelEndDate": "Data de încheiere:",
|
||||||
"LabelEnableSingleImageInDidlLimitHelp": "Unele dispozitive nu vor reda corect dacă mai multe imagini sunt încorporate în Didl.",
|
"LabelEnableSingleImageInDidlLimitHelp": "Unele dispozitive nu vor reda corect dacă mai multe imagini sunt încorporate în Didl.",
|
||||||
"LabelEnableSingleImageInDidlLimit": "Limitați la o singură imagine încorporată",
|
"LabelEnableSingleImageInDidlLimit": "Limitați la o singură imagine încorporată",
|
||||||
"LabelEnableRealtimeMonitorHelp": "Modificările la fișiere vor fi procesate imediat, pe sistemele de fișiere acceptate.",
|
"LabelEnableRealtimeMonitorHelp": "Modificările la fișiere vor fi procesate imediat pe sistemele de fișiere acceptate.",
|
||||||
"LabelEnableRealtimeMonitor": "Activați monitorizarea în timp real",
|
"LabelEnableRealtimeMonitor": "Activați monitorizarea în timp real",
|
||||||
"LabelEnableHardwareDecodingFor": "Activați decodarea hardware pentru:",
|
"LabelEnableHardwareDecodingFor": "Activați decodarea hardware pentru:",
|
||||||
"LabelEnableDlnaServerHelp": "Permite dispozitivelor UPnP din rețeaua dvs. să răsfoiască și să redea conținut.",
|
"LabelEnableDlnaServerHelp": "Permite dispozitivelor UPnP din rețeaua dvs. să răsfoiască și să redea conținut.",
|
||||||
|
@ -826,7 +826,7 @@
|
||||||
"LabelEnableDlnaDebugLoggingHelp": "Creați fișiere de jurnal mari și trebuie utilizate numai în funcție de necesități pentru rezolvarea problemelor.",
|
"LabelEnableDlnaDebugLoggingHelp": "Creați fișiere de jurnal mari și trebuie utilizate numai în funcție de necesități pentru rezolvarea problemelor.",
|
||||||
"LabelEnableDlnaDebugLogging": "Activați jurnalul de depanare DLNA",
|
"LabelEnableDlnaDebugLogging": "Activați jurnalul de depanare DLNA",
|
||||||
"LabelEnableDlnaClientDiscoveryIntervalHelp": "Determină durata în secunde între căutările SSDP efectuate de Jellyfin.",
|
"LabelEnableDlnaClientDiscoveryIntervalHelp": "Determină durata în secunde între căutările SSDP efectuate de Jellyfin.",
|
||||||
"LabelEnableDlnaClientDiscoveryInterval": "Interval de descoperire a clientului (secunde)",
|
"LabelEnableDlnaClientDiscoveryInterval": "Interval de descoperire a clientului",
|
||||||
"LabelEnableBlastAliveMessagesHelp": "Activați acest lucru dacă serverul nu este detectat în mod fiabil de alte dispozitive UPnP din rețeaua dvs.",
|
"LabelEnableBlastAliveMessagesHelp": "Activați acest lucru dacă serverul nu este detectat în mod fiabil de alte dispozitive UPnP din rețeaua dvs.",
|
||||||
"LabelEnableBlastAliveMessages": "Trimitere mesaje de disponibilitate",
|
"LabelEnableBlastAliveMessages": "Trimitere mesaje de disponibilitate",
|
||||||
"LabelEnableAutomaticPortMapHelp": "Încercați să mapați automat portul public către portul local prin UPnP. Este posibil să nu funcționeze cu unele modele de router. Modificările nu se vor aplica decât după repornirea serverului.",
|
"LabelEnableAutomaticPortMapHelp": "Încercați să mapați automat portul public către portul local prin UPnP. Este posibil să nu funcționeze cu unele modele de router. Modificările nu se vor aplica decât după repornirea serverului.",
|
||||||
|
@ -874,11 +874,11 @@
|
||||||
"LabelBurnSubtitles": "Imprimă subtitrările:",
|
"LabelBurnSubtitles": "Imprimă subtitrările:",
|
||||||
"LabelBlockContentWithTags": "Blochează articolele cu etichetele:",
|
"LabelBlockContentWithTags": "Blochează articolele cu etichetele:",
|
||||||
"LabelBlastMessageIntervalHelp": "Determină durata în secunde între transmiterea mesajele de viață.",
|
"LabelBlastMessageIntervalHelp": "Determină durata în secunde între transmiterea mesajele de viață.",
|
||||||
"LabelBlastMessageInterval": "Interval transmitere mesaj viu (secunde)",
|
"LabelBlastMessageInterval": "Interval transmitere mesaj viu",
|
||||||
"LabelBitrate": "Rată de biți:",
|
"LabelBitrate": "Rată de biți:",
|
||||||
"LabelBirthYear": "Anul nașterii:",
|
"LabelBirthYear": "Anul nașterii:",
|
||||||
"LabelBirthDate": "Data nașterii:",
|
"LabelBirthDate": "Data nașterii:",
|
||||||
"LabelBindToLocalNetworkAddressHelp": "Opțional. Rescrie adresa IP locală pentru a o utiliza serverul http. Dacă este lăsat gol, serverul se va lega la toate adresele disponibile. Modificarea acestei valori necesită repornirea Jellyfin Server.",
|
"LabelBindToLocalNetworkAddressHelp": "Rescrie adresa IP locală a serverului http. Dacă este lăsat gol, serverul se va lega la toate adresele disponibile. Modificarea acestei valori necesită repornirea Jellyfin Server.",
|
||||||
"LabelBindToLocalNetworkAddress": "Utilizează adresa de rețea locală:",
|
"LabelBindToLocalNetworkAddress": "Utilizează adresa de rețea locală:",
|
||||||
"LabelAutomaticallyRefreshInternetMetadataEvery": "Actualizați automat metadatele de pe internet:",
|
"LabelAutomaticallyRefreshInternetMetadataEvery": "Actualizați automat metadatele de pe internet:",
|
||||||
"LabelAuthProvider": "Furnizor de autentificare:",
|
"LabelAuthProvider": "Furnizor de autentificare:",
|
||||||
|
@ -917,7 +917,7 @@
|
||||||
"ItemCount": "{0} articole",
|
"ItemCount": "{0} articole",
|
||||||
"InstantMix": "Mix instant",
|
"InstantMix": "Mix instant",
|
||||||
"InstallingPackage": "Instalare {0} (versiune {1})",
|
"InstallingPackage": "Instalare {0} (versiune {1})",
|
||||||
"ImportFavoriteChannelsHelp": "Dacă este activat, vor fi importate numai canalele marcate ca preferate pe dispozitivul tuner.",
|
"ImportFavoriteChannelsHelp": "Vor fi importate numai canalele marcate ca preferate pe dispozitivul tuner.",
|
||||||
"Images": "Imagini",
|
"Images": "Imagini",
|
||||||
"Identify": "Identifică",
|
"Identify": "Identifică",
|
||||||
"HttpsRequiresCert": "Pentru a activa conexiunile securizate, va trebui să furnizați un certificat SSL de încredere, cum ar fi Let's Encrypt. Vă rugăm să furnizați un certificat sau să dezactivați conexiunile securizate.",
|
"HttpsRequiresCert": "Pentru a activa conexiunile securizate, va trebui să furnizați un certificat SSL de încredere, cum ar fi Let's Encrypt. Vă rugăm să furnizați un certificat sau să dezactivați conexiunile securizate.",
|
||||||
|
@ -969,14 +969,14 @@
|
||||||
"OptionBlockChannelContent": "Conținut canal Internet",
|
"OptionBlockChannelContent": "Conținut canal Internet",
|
||||||
"OptionBlockBooks": "Cărți",
|
"OptionBlockBooks": "Cărți",
|
||||||
"OptionBanner": "Steag",
|
"OptionBanner": "Steag",
|
||||||
"OptionAutomaticallyGroupSeriesHelp": "Dacă este activat, seriile distribuite pe mai multe foldere din această bibliotecă vor fi comasate automat într-o singură serie.",
|
"OptionAutomaticallyGroupSeriesHelp": "Seriile distribuite pe mai multe foldere din această bibliotecă vor fi comasate automat într-o singură serie.",
|
||||||
"OptionAutomaticallyGroupSeries": "Fuzionează automat seriile care sunt răspândite pe mai multe foldere",
|
"OptionAutomaticallyGroupSeries": "Fuzionează automat seriile care sunt răspândite pe mai multe foldere",
|
||||||
"OptionAuto": "Auto",
|
"OptionAuto": "Auto",
|
||||||
"OptionArtist": "Artist",
|
"OptionArtist": "Artist",
|
||||||
"OptionAllowVideoPlaybackTranscoding": "Permiteți redarea video care necesită transcodare",
|
"OptionAllowVideoPlaybackTranscoding": "Permiteți redarea video care necesită transcodare",
|
||||||
"OptionAllowVideoPlaybackRemuxing": "Permiteți redarea video care necesită conversie fără re-codificare",
|
"OptionAllowVideoPlaybackRemuxing": "Permiteți redarea video care necesită conversie fără re-codificare",
|
||||||
"OptionAllowSyncTranscoding": "Permiteți descărcarea și sincronizarea media care necesită transcodare",
|
"OptionAllowSyncTranscoding": "Permiteți descărcarea și sincronizarea media care necesită transcodare",
|
||||||
"OptionAllowMediaPlaybackTranscodingHelp": "Restrângerea accesului la transcodare poate provoca defecțiuni de redare în aplicațiile Jellyfin din cauza formatelor media neacceptate.",
|
"OptionAllowMediaPlaybackTranscodingHelp": "Restrângerea accesului la transcodare poate provoca defecțiuni de redare în aplicațiile client din cauza formatelor media neacceptate.",
|
||||||
"OptionAllowContentDownloading": "Permiteți descărcarea și sincronizarea media",
|
"OptionAllowContentDownloading": "Permiteți descărcarea și sincronizarea media",
|
||||||
"OptionAllowAudioPlaybackTranscoding": "Permiteți redarea audio care necesită transcodare",
|
"OptionAllowAudioPlaybackTranscoding": "Permiteți redarea audio care necesită transcodare",
|
||||||
"OptionAllUsers": "Toți utilizatorii",
|
"OptionAllUsers": "Toți utilizatorii",
|
||||||
|
@ -1113,7 +1113,7 @@
|
||||||
"LatestFromLibrary": "Ultimele {0}",
|
"LatestFromLibrary": "Ultimele {0}",
|
||||||
"Large": "Mare",
|
"Large": "Mare",
|
||||||
"LanNetworksHelp": "Lista separată de virgule a adreselor IP sau a intrărilor de tip IP/mască de rețea pentru rețelele care vor fi luate în considerare în rețeaua locală atunci când se aplică restricțiile de lățime de bandă. Dacă este setat, toate celelalte adrese IP vor fi considerate a fi în rețeaua externă și vor fi supuse restricțiilor de lățime de bandă externe. Dacă este lăsat necompletat, numai subnetul serverului este considerat a fi în rețeaua locală.",
|
"LanNetworksHelp": "Lista separată de virgule a adreselor IP sau a intrărilor de tip IP/mască de rețea pentru rețelele care vor fi luate în considerare în rețeaua locală atunci când se aplică restricțiile de lățime de bandă. Dacă este setat, toate celelalte adrese IP vor fi considerate a fi în rețeaua externă și vor fi supuse restricțiilor de lățime de bandă externe. Dacă este lăsat necompletat, numai subnetul serverului este considerat a fi în rețeaua locală.",
|
||||||
"LabelffmpegPathHelp": "Calea către executabilul ffmpeg, sau dosarul care conține ffmpeg.",
|
"LabelffmpegPathHelp": "Calea către executabilul ffmpeg sau dosarul care conține ffmpeg.",
|
||||||
"LabelffmpegPath": "Calea către FFmpeg:",
|
"LabelffmpegPath": "Calea către FFmpeg:",
|
||||||
"LabelZipCode": "Cod poștal:",
|
"LabelZipCode": "Cod poștal:",
|
||||||
"LabelYear": "Anul:",
|
"LabelYear": "Anul:",
|
||||||
|
@ -1217,7 +1217,7 @@
|
||||||
"ReleaseDate": "Data lansării",
|
"ReleaseDate": "Data lansării",
|
||||||
"RefreshQueued": "Actualizare adăugată în coadă.",
|
"RefreshQueued": "Actualizare adăugată în coadă.",
|
||||||
"RefreshMetadata": "Actualizați metadatele",
|
"RefreshMetadata": "Actualizați metadatele",
|
||||||
"RefreshDialogHelp": "Metadatele sunt actualizate pe baza setărilor și a serviciilor de internet care sunt activate în tabloul de bord Jellyfin Server.",
|
"RefreshDialogHelp": "Metadatele sunt actualizate pe baza setărilor și a serviciilor de internet care sunt activate în tabloul de bord.",
|
||||||
"Refresh": "Reîmprospătează",
|
"Refresh": "Reîmprospătează",
|
||||||
"Recordings": "Înregistrări",
|
"Recordings": "Înregistrări",
|
||||||
"RecordingScheduled": "Înregistrare programată.",
|
"RecordingScheduled": "Înregistrare programată.",
|
||||||
|
@ -1263,7 +1263,7 @@
|
||||||
"PerfectMatch": "Potrivire perfectă",
|
"PerfectMatch": "Potrivire perfectă",
|
||||||
"People": "Oameni",
|
"People": "Oameni",
|
||||||
"PasswordSaved": "Parolă salvată.",
|
"PasswordSaved": "Parolă salvată.",
|
||||||
"PasswordResetProviderHelp": "Alegeți un furnizor de resetare a parolei pentru a fi utilizat atunci când acest utilizator solicită o resetare a parolei",
|
"PasswordResetProviderHelp": "Alegeți un furnizor de resetare a parolei pentru a fi utilizat atunci când acest utilizator solicită o resetare a parolei.",
|
||||||
"HeaderResetPassword": "Resetează parola",
|
"HeaderResetPassword": "Resetează parola",
|
||||||
"PasswordResetConfirmation": "Sigur doriți să resetați parola?",
|
"PasswordResetConfirmation": "Sigur doriți să resetați parola?",
|
||||||
"PasswordResetComplete": "Parola a fost resetată.",
|
"PasswordResetComplete": "Parola a fost resetată.",
|
||||||
|
@ -1300,9 +1300,9 @@
|
||||||
"OptionProfileAudio": "Audio",
|
"OptionProfileAudio": "Audio",
|
||||||
"OptionPosterCard": "Carte de afiș",
|
"OptionPosterCard": "Carte de afiș",
|
||||||
"OptionPoster": "Afiș",
|
"OptionPoster": "Afiș",
|
||||||
"OptionPlainVideoItemsHelp": "Dacă este activat, toate videoclipurile sunt reprezentate în DIDL ca „object.item.videoItem” în loc de un tip mai specific, cum ar fi „object.item.videoItem.movie”.",
|
"OptionPlainVideoItemsHelp": "Toate videoclipurile sunt reprezentate în DIDL ca „object.item.videoItem” în loc de un tip mai specific, cum ar fi „object.item.videoItem.movie”.",
|
||||||
"OptionPlainVideoItems": "Afișați toate videoclipurile ca elemente video simple",
|
"OptionPlainVideoItems": "Afișați toate videoclipurile ca elemente video simple",
|
||||||
"OptionPlainStorageFoldersHelp": "Dacă este activat, toate folderele sunt reprezentate în DIDL ca „object.container.storageFolder” în loc de un tip mai specific, cum ar fi „object.container.person.musicArtist”.",
|
"OptionPlainStorageFoldersHelp": "Toate dosarele sunt reprezentate în DIDL ca „object.container.storageFolder” în loc de un tip mai specific, cum ar fi „object.container.person.musicArtist”.",
|
||||||
"OptionPlainStorageFolders": "Afișați toate dosarele ca dosare simple de stocare",
|
"OptionPlainStorageFolders": "Afișați toate dosarele ca dosare simple de stocare",
|
||||||
"OptionOnInterval": "La un interval",
|
"OptionOnInterval": "La un interval",
|
||||||
"OptionOnAppStartup": "La pornirea aplicației",
|
"OptionOnAppStartup": "La pornirea aplicației",
|
||||||
|
@ -1315,7 +1315,7 @@
|
||||||
"OptionList": "Listă",
|
"OptionList": "Listă",
|
||||||
"OptionIsSD": "SD",
|
"OptionIsSD": "SD",
|
||||||
"OptionIsHD": "HD",
|
"OptionIsHD": "HD",
|
||||||
"OptionIgnoreTranscodeByteRangeRequestsHelp": "Dacă sunt activate, aceste solicitări vor fi respectate, dar vor ignora antetul intervalului de octeți.",
|
"OptionIgnoreTranscodeByteRangeRequestsHelp": "Aceste solicitări vor fi respectate, dar vor ignora antetul intervalului de octeți.",
|
||||||
"OptionIgnoreTranscodeByteRangeRequests": "Ignorați solicitările pentru transcodarea intervalului de octeți",
|
"OptionIgnoreTranscodeByteRangeRequests": "Ignorați solicitările pentru transcodarea intervalului de octeți",
|
||||||
"OptionHomeVideos": "Fotografii",
|
"OptionHomeVideos": "Fotografii",
|
||||||
"OptionHlsSegmentedSubtitles": "Subtitrare segmentată HLS",
|
"OptionHlsSegmentedSubtitles": "Subtitrare segmentată HLS",
|
||||||
|
@ -1332,7 +1332,7 @@
|
||||||
"OptionEnableExternalContentInSuggestions": "Activați conținut extern în sugestii",
|
"OptionEnableExternalContentInSuggestions": "Activați conținut extern în sugestii",
|
||||||
"OptionEmbedSubtitles": "Inclus în container",
|
"OptionEmbedSubtitles": "Inclus în container",
|
||||||
"OptionDownloadLogoImage": "Siglă",
|
"OptionDownloadLogoImage": "Siglă",
|
||||||
"OptionDownloadImagesInAdvanceHelp": "În mod implicit, majoritatea imaginilor sunt descărcate numai la cererea unei aplicații din Jellyfin. Activați această opțiune pentru a descărca în prealabil toate imaginile, pe măsură ce fișierele media sunt importate. Acest lucru poate provoca scanări ale bibliotecii semnificativ mai lungi.",
|
"OptionDownloadImagesInAdvanceHelp": "În mod implicit, majoritatea imaginilor sunt descărcate numai la cererea unei aplicații Jellyfin. Activați această opțiune pentru a descărca în avans toate imaginile, pe măsură ce fișiere media noi sunt importate. Acest lucru poate duce la mărirea semnificativă a timpilor de scanare a bibliotecii.",
|
||||||
"OptionDownloadImagesInAdvance": "Descărcați imaginile în avans",
|
"OptionDownloadImagesInAdvance": "Descărcați imaginile în avans",
|
||||||
"OptionDownloadDiscImage": "Disc",
|
"OptionDownloadDiscImage": "Disc",
|
||||||
"OptionDisplayFolderViewHelp": "Afișați dosarele alături de celelalte biblioteci media. Acest lucru poate fi util dacă doriți să aveți o vizualizare direct în dosar.",
|
"OptionDisplayFolderViewHelp": "Afișați dosarele alături de celelalte biblioteci media. Acest lucru poate fi util dacă doriți să aveți o vizualizare direct în dosar.",
|
||||||
|
@ -1476,7 +1476,7 @@
|
||||||
"LabelRequireHttps": "Trebuie HTTPS",
|
"LabelRequireHttps": "Trebuie HTTPS",
|
||||||
"LabelStable": "Stabilă",
|
"LabelStable": "Stabilă",
|
||||||
"LabelChromecastVersion": "Versiunea de Chromecast",
|
"LabelChromecastVersion": "Versiunea de Chromecast",
|
||||||
"LabelEnableHttpsHelp": "Activează serverul să asculte pe portul HTTPS configurat. Un certificat valid trebuie de asemenea configurat pentru ca să funcţioneze.",
|
"LabelEnableHttpsHelp": "Ascultă pe portul HTTPS configurat. Un certificat valid trebuie de asemenea configurat pentru ca să funcţioneze.",
|
||||||
"LabelEnableHttps": "Activați HTTPS",
|
"LabelEnableHttps": "Activați HTTPS",
|
||||||
"HeaderServerAddressSettings": "Setările adresei serverului",
|
"HeaderServerAddressSettings": "Setările adresei serverului",
|
||||||
"HeaderRemoteAccessSettings": "Setări pentru aces remote",
|
"HeaderRemoteAccessSettings": "Setări pentru aces remote",
|
||||||
|
@ -1539,5 +1539,11 @@
|
||||||
"LabelRepositoryNameHelp": "Un nume personalizat pentru a distinge acest repertoriu de altele adăugate la serverul dvs.",
|
"LabelRepositoryNameHelp": "Un nume personalizat pentru a distinge acest repertoriu de altele adăugate la serverul dvs.",
|
||||||
"ClearQueue": "Golește lista de redare",
|
"ClearQueue": "Golește lista de redare",
|
||||||
"StopPlayback": "Oprește redarea",
|
"StopPlayback": "Oprește redarea",
|
||||||
"ViewAlbumArtist": "Vezi artistul albumului"
|
"ViewAlbumArtist": "Vezi artistul albumului",
|
||||||
|
"NextTrack": "Sari la următorul",
|
||||||
|
"LabelUnstable": "Instabil",
|
||||||
|
"Preview": "Previzualizare",
|
||||||
|
"SubtitleVerticalPositionHelp": "Numărul de linie unde apare textul. Numerele pozitive indică de sus în jos. Numerele negative indică de jos în sus.",
|
||||||
|
"LabelSubtitleVerticalPosition": "Poziție verticală:",
|
||||||
|
"PreviousTrack": "Sari anterior"
|
||||||
}
|
}
|
||||||
|
|
|
@ -1542,5 +1542,8 @@
|
||||||
"ButtonPlayer": "Проигрыватель",
|
"ButtonPlayer": "Проигрыватель",
|
||||||
"PreviousTrack": "Перейти к предыдущему",
|
"PreviousTrack": "Перейти к предыдущему",
|
||||||
"NextTrack": "Перейти к следующему",
|
"NextTrack": "Перейти к следующему",
|
||||||
"LabelUnstable": "Нестабильная"
|
"LabelUnstable": "Нестабильная",
|
||||||
|
"LabelSubtitleVerticalPosition": "Вертикальная позиция:",
|
||||||
|
"SubtitleVerticalPositionHelp": "Номер строки, где появляется текст. Положительные числа означают сверху вниз. Отрицательные числа означают снизу вверх.",
|
||||||
|
"Preview": "Предварительный просмотр"
|
||||||
}
|
}
|
||||||
|
|
|
@ -1429,5 +1429,23 @@
|
||||||
"OptionEnableM2tsModeHelp": "Omogoči m2ts način pri kodiranju v mpegts.",
|
"OptionEnableM2tsModeHelp": "Omogoči m2ts način pri kodiranju v mpegts.",
|
||||||
"OptionEnableM2tsMode": "Omogoči M2ts način",
|
"OptionEnableM2tsMode": "Omogoči M2ts način",
|
||||||
"OptionDisplayFolderViewHelp": "Prikaže mape poleg ostalih knjižnic predstavnosti. Uporabno za preprost ogled map.",
|
"OptionDisplayFolderViewHelp": "Prikaže mape poleg ostalih knjižnic predstavnosti. Uporabno za preprost ogled map.",
|
||||||
"OptionDisplayFolderView": "Prikaži pogled mape za prikaz navadnih map predstavnosti"
|
"OptionDisplayFolderView": "Prikaži pogled mape za prikaz navadnih map predstavnosti",
|
||||||
|
"Yesterday": "Včeraj",
|
||||||
|
"Yes": "Da",
|
||||||
|
"RecommendationStarring": "Nastopa {0}",
|
||||||
|
"Recordings": "Posnetki",
|
||||||
|
"RemoveFromCollection": "Odstrani iz zbirke",
|
||||||
|
"ResumeAt": "Nadaljuj od {0}",
|
||||||
|
"SaveSubtitlesIntoMediaFolders": "Shrani podnapise v mape predstavnosti",
|
||||||
|
"ScanForNewAndUpdatedFiles": "Poišči nove in spremenjene datoteke",
|
||||||
|
"Screenshot": "Posnetek zaslona",
|
||||||
|
"Screenshots": "Posnetki zaslona",
|
||||||
|
"Search": "Iskanje",
|
||||||
|
"ShowAdvancedSettings": "Prikaži napredne nastavitve",
|
||||||
|
"New": "Novo",
|
||||||
|
"SubtitleOffset": "Zamik podnapisev",
|
||||||
|
"Subtitles": "Podnapisi",
|
||||||
|
"Sunday": "Nedelja",
|
||||||
|
"TabAdvanced": "Napredno",
|
||||||
|
"TabAlbums": "Albumi"
|
||||||
}
|
}
|
||||||
|
|
24
yarn.lock
24
yarn.lock
|
@ -3020,10 +3020,10 @@ css-has-pseudo@^0.10.0:
|
||||||
postcss "^7.0.6"
|
postcss "^7.0.6"
|
||||||
postcss-selector-parser "^5.0.0-rc.4"
|
postcss-selector-parser "^5.0.0-rc.4"
|
||||||
|
|
||||||
css-loader@^4.2.0:
|
css-loader@^4.2.1:
|
||||||
version "4.2.0"
|
version "4.2.1"
|
||||||
resolved "https://registry.yarnpkg.com/css-loader/-/css-loader-4.2.0.tgz#b57efb92ac8f0cd85bf92d89df9634ef1f51b8bf"
|
resolved "https://registry.yarnpkg.com/css-loader/-/css-loader-4.2.1.tgz#9f48fd7eae1219d629a3f085ba9a9102ca1141a7"
|
||||||
integrity sha512-ko7a9b0iFpWtk9eSI/C8IICvZeGtYnjxYjw45rJprokXj/+kBd/siX4vAIBq9Uij8Jubc4jL1EvSnTjCEwaHSw==
|
integrity sha512-MoqmF1if7Z0pZIEXA4ZF9PgtCXxWbfzfJM+3p+OYfhcrwcqhaCRb74DSnfzRl7e024xEiCRn5hCvfUbTf2sgFA==
|
||||||
dependencies:
|
dependencies:
|
||||||
camelcase "^6.0.0"
|
camelcase "^6.0.0"
|
||||||
cssesc "^3.0.0"
|
cssesc "^3.0.0"
|
||||||
|
@ -5465,10 +5465,10 @@ hex-color-regex@^1.1.0:
|
||||||
resolved "https://registry.yarnpkg.com/hex-color-regex/-/hex-color-regex-1.1.0.tgz#4c06fccb4602fe2602b3c93df82d7e7dbf1a8a8e"
|
resolved "https://registry.yarnpkg.com/hex-color-regex/-/hex-color-regex-1.1.0.tgz#4c06fccb4602fe2602b3c93df82d7e7dbf1a8a8e"
|
||||||
integrity sha512-l9sfDFsuqtOqKDsQdqrMRk0U85RZc0RtOR9yPI7mRVOa4FsR/BVnZ0shmQRM96Ji99kYZP/7hn1cedc1+ApsTQ==
|
integrity sha512-l9sfDFsuqtOqKDsQdqrMRk0U85RZc0RtOR9yPI7mRVOa4FsR/BVnZ0shmQRM96Ji99kYZP/7hn1cedc1+ApsTQ==
|
||||||
|
|
||||||
hls.js@^0.14.7:
|
hls.js@^0.14.8:
|
||||||
version "0.14.7"
|
version "0.14.8"
|
||||||
resolved "https://registry.yarnpkg.com/hls.js/-/hls.js-0.14.7.tgz#47fbd2662b13121ab17c07aea06b1c07828240cf"
|
resolved "https://registry.yarnpkg.com/hls.js/-/hls.js-0.14.8.tgz#c2c6ca7005524c81eece316c2a4a199258bd0590"
|
||||||
integrity sha512-9JY0D9nwMrfQPRWc8/kEJTKK0TYfDTzIs6Xq+gdCvasRxdvQKQ2T76rdueTkS0AsFV6sQlJN0wxbnI44aRvvUA==
|
integrity sha512-4fh8k/sl1SmYXsT4Om8AY5fKa5tUUtAxup2sffrSMh5MNk4Kt4FOZxbjqTGL5VwkroY1oJ9twSciNQNFbPA/WQ==
|
||||||
dependencies:
|
dependencies:
|
||||||
eventemitter3 "^4.0.3"
|
eventemitter3 "^4.0.3"
|
||||||
url-toolkit "^2.1.6"
|
url-toolkit "^2.1.6"
|
||||||
|
@ -11994,10 +11994,10 @@ webworkify@^1.5.0:
|
||||||
resolved "https://registry.yarnpkg.com/webworkify/-/webworkify-1.5.0.tgz#734ad87a774de6ebdd546e1d3e027da5b8f4a42c"
|
resolved "https://registry.yarnpkg.com/webworkify/-/webworkify-1.5.0.tgz#734ad87a774de6ebdd546e1d3e027da5b8f4a42c"
|
||||||
integrity sha512-AMcUeyXAhbACL8S2hqqdqOLqvJ8ylmIbNwUIqQujRSouf4+eUFaXbG6F1Rbu+srlJMmxQWsiU7mOJi0nMBfM1g==
|
integrity sha512-AMcUeyXAhbACL8S2hqqdqOLqvJ8ylmIbNwUIqQujRSouf4+eUFaXbG6F1Rbu+srlJMmxQWsiU7mOJi0nMBfM1g==
|
||||||
|
|
||||||
whatwg-fetch@^3.3.1:
|
whatwg-fetch@^3.4.0:
|
||||||
version "3.3.1"
|
version "3.4.0"
|
||||||
resolved "https://registry.yarnpkg.com/whatwg-fetch/-/whatwg-fetch-3.3.1.tgz#6c1acf37dec176b0fd6bc9a74b616bec2f612935"
|
resolved "https://registry.yarnpkg.com/whatwg-fetch/-/whatwg-fetch-3.4.0.tgz#e11de14f4878f773fbebcde8871b2c0699af8b30"
|
||||||
integrity sha512-faXTmGDcLuEPBpJwb5LQfyxvubKiE+RlbmmweFGKjvIPFj4uHTTfdtTIkdTRhC6OSH9S9eyYbx8kZ0UEaQqYTA==
|
integrity sha512-rsum2ulz2iuZH08mJkT0Yi6JnKhwdw4oeyMjokgxd+mmqYSd9cPpOQf01TIWgjxG/U4+QR+AwKq6lSbXVxkyoQ==
|
||||||
|
|
||||||
which-module@^1.0.0:
|
which-module@^1.0.0:
|
||||||
version "1.0.0"
|
version "1.0.0"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue