${HeaderChapterImages}
';
}
- let elem = context.querySelector('.subtitleList');
+ const elem = context.querySelector('.subtitleList');
if (subs.length) {
elem.classList.remove('hide');
@@ -138,18 +137,18 @@ function fillSubtitleList(context, item) {
}
function fillLanguages(context, apiClient, languages) {
- let selectLanguage = context.querySelector('#selectLanguage');
+ const selectLanguage = context.querySelector('#selectLanguage');
selectLanguage.innerHTML = languages.map(function (l) {
return '
';
});
- let lastLanguage = userSettings.get('subtitleeditor-language');
+ const lastLanguage = userSettings.get('subtitleeditor-language');
if (lastLanguage) {
selectLanguage.value = lastLanguage;
} else {
apiClient.getCurrentUser().then(function (user) {
- let lang = user.Configuration.SubtitleLanguagePreference;
+ const lang = user.Configuration.SubtitleLanguagePreference;
if (lang) {
selectLanguage.value = lang;
@@ -172,9 +171,9 @@ function renderSearchResults(context, results) {
context.querySelector('.noSearchResults').classList.add('hide');
for (let i = 0, length = results.length; i < length; i++) {
- let result = results[i];
+ const result = results[i];
- let provider = result.ProviderName;
+ const provider = result.ProviderName;
if (provider !== lastProvider) {
if (i > 0) {
@@ -185,7 +184,7 @@ function renderSearchResults(context, results) {
lastProvider = provider;
}
- let tagName = layoutManager.tv ? 'button' : 'div';
+ const tagName = layoutManager.tv ? 'button' : 'div';
let className = layoutManager.tv ? 'listItem listItem-border btnOptions' : 'listItem listItem-border';
if (layoutManager.tv) {
className += ' listItem-focusscale listItem-button';
@@ -195,7 +194,7 @@ function renderSearchResults(context, results) {
html += '
';
- let bodyClass = result.Comment || result.IsHashMatch ? 'three-line' : 'two-line';
+ const bodyClass = result.Comment || result.IsHashMatch ? 'three-line' : 'two-line';
html += '
';
@@ -232,7 +231,7 @@ function renderSearchResults(context, results) {
html += '
';
}
- let elem = context.querySelector('.subtitleResults');
+ const elem = context.querySelector('.subtitleResults');
elem.innerHTML = html;
loading.hide();
@@ -243,8 +242,8 @@ function searchForSubtitles(context, language) {
loading.show();
- let apiClient = connectionManager.getApiClient(currentItem.ServerId);
- let url = apiClient.getUrl('Items/' + currentItem.Id + '/RemoteSearch/Subtitles/' + language);
+ const apiClient = window.connectionManager.getApiClient(currentItem.ServerId);
+ const url = apiClient.getUrl('Items/' + currentItem.Id + '/RemoteSearch/Subtitles/' + language);
apiClient.getJSON(url).then(function (results) {
renderSearchResults(context, results);
@@ -259,7 +258,7 @@ function reload(context, apiClient, itemId) {
fillSubtitleList(context, item);
let file = item.Path || '';
- let index = Math.max(file.lastIndexOf('/'), file.lastIndexOf('\\'));
+ const index = Math.max(file.lastIndexOf('/'), file.lastIndexOf('\\'));
if (index > -1) {
file = file.substring(index + 1);
}
@@ -283,9 +282,9 @@ function reload(context, apiClient, itemId) {
}
function onSearchSubmit(e) {
- let form = this;
+ const form = this;
- let lang = form.querySelector('#selectLanguage', form).value;
+ const lang = form.querySelector('#selectLanguage', form).value;
searchForSubtitles(dom.parentWithClass(form, 'formDialogContent'), lang);
@@ -294,10 +293,10 @@ function onSearchSubmit(e) {
}
function onSubtitleListClick(e) {
- let btnDelete = dom.parentWithClass(e.target, 'btnDelete');
+ const btnDelete = dom.parentWithClass(e.target, 'btnDelete');
if (btnDelete) {
- let index = btnDelete.getAttribute('data-index');
- let context = dom.parentWithClass(btnDelete, 'subtitleEditorDialog');
+ const index = btnDelete.getAttribute('data-index');
+ const context = dom.parentWithClass(btnDelete, 'subtitleEditorDialog');
deleteLocalSubtitle(context, index);
}
}
@@ -306,14 +305,14 @@ function onSubtitleResultsClick(e) {
let subtitleId;
let context;
- let btnOptions = dom.parentWithClass(e.target, 'btnOptions');
+ const btnOptions = dom.parentWithClass(e.target, 'btnOptions');
if (btnOptions) {
subtitleId = btnOptions.getAttribute('data-subid');
context = dom.parentWithClass(btnOptions, 'subtitleEditorDialog');
showDownloadOptions(btnOptions, context, subtitleId);
}
- let btnDownload = dom.parentWithClass(e.target, 'btnDownload');
+ const btnDownload = dom.parentWithClass(e.target, 'btnDownload');
if (btnDownload) {
subtitleId = btnDownload.getAttribute('data-subid');
context = dom.parentWithClass(btnDownload, 'subtitleEditorDialog');
@@ -322,7 +321,7 @@ function onSubtitleResultsClick(e) {
}
function showDownloadOptions(button, context, subtitleId) {
- let items = [];
+ const items = [];
items.push({
name: globalize.translate('Download'),
@@ -348,7 +347,7 @@ function showDownloadOptions(button, context, subtitleId) {
function centerFocus(elem, horiz, on) {
import('scrollHelper').then(({default: scrollHelper}) => {
- let fn = on ? 'on' : 'off';
+ const fn = on ? 'on' : 'off';
scrollHelper.centerFocus[fn](elem, horiz);
});
}
@@ -356,9 +355,9 @@ function centerFocus(elem, horiz, on) {
function showEditorInternal(itemId, serverId, template) {
hasChanges = false;
- let apiClient = connectionManager.getApiClient(serverId);
+ const apiClient = window.connectionManager.getApiClient(serverId);
return apiClient.getItem(apiClient.getCurrentUserId(), itemId).then(function (item) {
- let dialogOptions = {
+ const dialogOptions = {
removeOnClose: true,
scrollY: false
};
@@ -369,7 +368,7 @@ function showEditorInternal(itemId, serverId, template) {
dialogOptions.size = 'small';
}
- let dlg = dialogHelper.createDialog(dialogOptions);
+ const dlg = dialogHelper.createDialog(dialogOptions);
dlg.classList.add('formDialog');
dlg.classList.add('subtitleEditorDialog');
@@ -380,7 +379,7 @@ function showEditorInternal(itemId, serverId, template) {
dlg.querySelector('.subtitleSearchForm').addEventListener('submit', onSearchSubmit);
- let btnSubmit = dlg.querySelector('.btnSubmit');
+ const btnSubmit = dlg.querySelector('.btnSubmit');
if (layoutManager.tv) {
centerFocus(dlg.querySelector('.formDialogContent'), false, true);
@@ -389,7 +388,7 @@ function showEditorInternal(itemId, serverId, template) {
btnSubmit.classList.add('hide');
}
- let editorContent = dlg.querySelector('.formDialogContent');
+ const editorContent = dlg.querySelector('.formDialogContent');
dlg.querySelector('.subtitleList').addEventListener('click', onSubtitleListClick);
dlg.querySelector('.subtitleResults').addEventListener('click', onSubtitleResultsClick);
diff --git a/src/components/subtitlesettings/subtitlesettings.js b/src/components/subtitlesettings/subtitlesettings.js
index 46760be4c8..0e2c4e3661 100644
--- a/src/components/subtitlesettings/subtitlesettings.js
+++ b/src/components/subtitlesettings/subtitlesettings.js
@@ -4,7 +4,6 @@ import appSettings from 'appSettings';
import focusManager from 'focusManager';
import layoutManager from 'layoutManager';
import loading from 'loading';
-import connectionManager from 'connectionManager';
import subtitleAppearanceHelper from 'subtitleAppearanceHelper';
import settingsHelper from 'settingsHelper';
import dom from 'dom';
@@ -232,7 +231,7 @@ export class SubtitleSettings {
loading.show();
const userId = self.options.userId;
- const apiClient = connectionManager.getApiClient(self.options.serverId);
+ const apiClient = window.connectionManager.getApiClient(self.options.serverId);
const userSettings = self.options.userSettings;
apiClient.getUser(userId).then(function (user) {
@@ -256,7 +255,7 @@ export class SubtitleSettings {
onSubmit(e) {
const self = this;
- const apiClient = connectionManager.getApiClient(self.options.serverId);
+ const apiClient = window.connectionManager.getApiClient(self.options.serverId);
const userId = self.options.userId;
const userSettings = self.options.userSettings;
diff --git a/src/components/syncPlay/groupSelectionMenu.js b/src/components/syncPlay/groupSelectionMenu.js
index 360aa0b0c2..b554817b8c 100644
--- a/src/components/syncPlay/groupSelectionMenu.js
+++ b/src/components/syncPlay/groupSelectionMenu.js
@@ -1,5 +1,4 @@
import events from 'events';
-import connectionManager from 'connectionManager';
import playbackManager from 'playbackManager';
import syncPlayManager from 'syncPlayManager';
import loading from 'loading';
@@ -13,7 +12,7 @@ import playbackPermissionManager from 'playbackPermissionManager';
* @returns {string} The player's id.
*/
function getActivePlayerId () {
- var info = playbackManager.getPlayerInfo();
+ const info = playbackManager.getPlayerInfo();
return info ? info.id : null;
}
@@ -39,7 +38,7 @@ function showNewJoinGroupSelection (button, user, apiClient) {
apiClient.getSyncPlayGroups().then(function (response) {
response.json().then(function (groups) {
- var menuItems = groups.map(function (group) {
+ const menuItems = groups.map(function (group) {
return {
name: group.PlayingItemName,
icon: 'group',
@@ -73,7 +72,7 @@ function showNewJoinGroupSelection (button, user, apiClient) {
return;
}
- var menuOptions = {
+ const menuOptions = {
title: globalize.translate('HeaderSyncPlaySelectGroup'),
items: menuItems,
positionTo: button,
@@ -130,7 +129,7 @@ function showLeaveGroupSelection (button, user, apiClient) {
secondaryText: globalize.translate('LabelSyncPlayLeaveGroupDescription')
}];
- var menuOptions = {
+ const menuOptions = {
title: globalize.translate('HeaderSyncPlayEnabled'),
items: menuItems,
positionTo: button,
@@ -172,8 +171,8 @@ export function show (button) {
});
});
- const apiClient = connectionManager.currentApiClient();
- connectionManager.user(apiClient).then((user) => {
+ const apiClient = window.connectionManager.currentApiClient();
+ window.connectionManager.user(apiClient).then((user) => {
if (syncPlayEnabled) {
showLeaveGroupSelection(button, user, apiClient);
} else {
diff --git a/src/components/syncPlay/syncPlayManager.js b/src/components/syncPlay/syncPlayManager.js
index 2366172a79..c72d20a111 100644
--- a/src/components/syncPlay/syncPlayManager.js
+++ b/src/components/syncPlay/syncPlayManager.js
@@ -4,7 +4,6 @@
*/
import events from 'events';
-import connectionManager from 'connectionManager';
import playbackManager from 'playbackManager';
import timeSyncManager from 'timeSyncManager';
import toast from 'toast';
@@ -41,7 +40,7 @@ function waitForEventOnce(emitter, eventType, timeout) {
* @returns {string} The player's id.
*/
function getActivePlayerId() {
- var info = playbackManager.getPlayerInfo();
+ const info = playbackManager.getPlayerInfo();
return info ? info.id : null;
}
@@ -128,7 +127,7 @@ class SyncPlayManager {
// Report ping
if (this.syncEnabled) {
- const apiClient = connectionManager.currentApiClient();
+ const apiClient = window.connectionManager.currentApiClient();
const sessionId = getActivePlayerId();
if (!sessionId) {
@@ -277,7 +276,7 @@ class SyncPlayManager {
* Removes the bindings to the current player's events.
*/
releaseCurrentPlayer () {
- var player = this.currentPlayer;
+ const player = this.currentPlayer;
if (player) {
events.off(player, 'unpause', this._onPlayerUnpause);
events.off(player, 'pause', this._onPlayerPause);
@@ -427,7 +426,7 @@ class SyncPlayManager {
serverId: serverId
}).then(() => {
waitForEventOnce(this, 'playbackstart', WaitForEventDefaultTimeout).then(() => {
- var sessionId = getActivePlayerId();
+ const sessionId = getActivePlayerId();
if (!sessionId) {
console.error('Missing sessionId!');
toast({
@@ -660,7 +659,7 @@ class SyncPlayManager {
* Overrides PlaybackManager's unpause method.
*/
playRequest (player) {
- var apiClient = connectionManager.currentApiClient();
+ const apiClient = window.connectionManager.currentApiClient();
apiClient.requestSyncPlayStart();
}
@@ -668,7 +667,7 @@ class SyncPlayManager {
* Overrides PlaybackManager's pause method.
*/
pauseRequest (player) {
- var apiClient = connectionManager.currentApiClient();
+ const apiClient = window.connectionManager.currentApiClient();
apiClient.requestSyncPlayPause();
// Pause locally as well, to give the user some little control
playbackManager._localUnpause(player);
@@ -678,7 +677,7 @@ class SyncPlayManager {
* Overrides PlaybackManager's seek method.
*/
seekRequest (PositionTicks, player) {
- var apiClient = connectionManager.currentApiClient();
+ const apiClient = window.connectionManager.currentApiClient();
apiClient.requestSyncPlaySeek({
PositionTicks: PositionTicks
});
@@ -741,7 +740,7 @@ class SyncPlayManager {
const playAtTime = this.lastCommand.When;
- const currentPositionTicks = playbackManager.currentTime();
+ const currentPositionTicks = playbackManager.currentTime() * 10000;
// Estimate PositionTicks on server
const serverPositionTicks = this.lastCommand.PositionTicks + ((currentTime - playAtTime) + this.timeOffsetWithServer) * 10000;
// Measure delay that needs to be recovered
diff --git a/src/components/syncPlay/timeSyncManager.js b/src/components/syncPlay/timeSyncManager.js
index e219fb0413..6ded631de3 100644
--- a/src/components/syncPlay/timeSyncManager.js
+++ b/src/components/syncPlay/timeSyncManager.js
@@ -4,7 +4,6 @@
*/
import events from 'events';
-import connectionManager from 'connectionManager';
/**
* Time estimation
@@ -114,7 +113,7 @@ class TimeSyncManager {
if (!this.poller) {
this.poller = setTimeout(() => {
this.poller = null;
- const apiClient = connectionManager.currentApiClient();
+ const apiClient = window.connectionManager.currentApiClient();
const requestSent = new Date();
apiClient.getServerTime().then((response) => {
const responseReceived = new Date();
diff --git a/src/components/tabbedview/tabbedview.js b/src/components/tabbedview/tabbedview.js
index 710a0e3c40..4e7ccb6529 100644
--- a/src/components/tabbedview/tabbedview.js
+++ b/src/components/tabbedview/tabbedview.js
@@ -4,7 +4,7 @@ import layoutManager from 'layoutManager';
import 'emby-tabs';
function onViewDestroy(e) {
- var tabControllers = this.tabControllers;
+ const tabControllers = this.tabControllers;
if (tabControllers) {
tabControllers.forEach(function (t) {
@@ -32,9 +32,9 @@ class TabbedView {
this.view = view;
this.params = params;
- var self = this;
+ const self = this;
- var currentTabIndex = parseInt(params.tab || this.getDefaultTabIndex(params.parentId));
+ let currentTabIndex = parseInt(params.tab || this.getDefaultTabIndex(params.parentId));
this.initialTabIndex = currentTabIndex;
function validateTabLoad(index) {
@@ -44,7 +44,7 @@ class TabbedView {
function loadTab(index, previousIndex) {
validateTabLoad(index).then(function () {
self.getTabController(index).then(function (controller) {
- var refresh = !controller.refreshed;
+ const refresh = !controller.refreshed;
controller.onResume({
autoFocus: previousIndex == null && layoutManager.tv,
@@ -64,10 +64,10 @@ class TabbedView {
}
function onTabChange(e) {
- var newIndex = parseInt(e.detail.selectedTabIndex);
- var previousIndex = e.detail.previousIndex;
+ const newIndex = parseInt(e.detail.selectedTabIndex);
+ const previousIndex = e.detail.previousIndex;
- var previousTabController = previousIndex == null ? null : self.tabControllers[previousIndex];
+ const previousTabController = previousIndex == null ? null : self.tabControllers[previousIndex];
if (previousTabController && previousTabController.onPause) {
previousTabController.onPause();
}
@@ -92,7 +92,7 @@ class TabbedView {
this.setTitle();
backdrop.clearBackdrop();
- var currentTabController = this.currentTabController;
+ const currentTabController = this.currentTabController;
if (!currentTabController) {
mainTabsManager.selectedTabIndex(this.initialTabIndex);
@@ -102,7 +102,7 @@ class TabbedView {
}
onPause() {
- var currentTabController = this.currentTabController;
+ const currentTabController = this.currentTabController;
if (currentTabController && currentTabController.onPause) {
currentTabController.onPause();
diff --git a/src/components/themeMediaPlayer.js b/src/components/themeMediaPlayer.js
index 8225156bf0..8f288a5348 100644
--- a/src/components/themeMediaPlayer.js
+++ b/src/components/themeMediaPlayer.js
@@ -1,6 +1,5 @@
import playbackManager from 'playbackManager';
import * as userSettings from 'userSettings';
-import connectionManager from 'connectionManager';
let currentOwnerId;
let currentThemeIds = [];
@@ -62,7 +61,7 @@ function loadThemeMedia(item) {
return;
}
- const apiClient = connectionManager.getApiClient(item.ServerId);
+ const apiClient = window.connectionManager.getApiClient(item.ServerId);
apiClient.getThemeMedia(apiClient.getCurrentUserId(), item.Id, true).then(function (themeMediaResult) {
const ownerId = themeMediaResult.ThemeVideosResult.Items.length ? themeMediaResult.ThemeVideosResult.OwnerId : themeMediaResult.ThemeSongsResult.OwnerId;
diff --git a/src/components/tunerPicker.js b/src/components/tunerPicker.js
index 13625ddb67..2e7629a3c5 100644
--- a/src/components/tunerPicker.js
+++ b/src/components/tunerPicker.js
@@ -1,7 +1,6 @@
import dialogHelper from 'dialogHelper';
import dom from 'dom';
import layoutManager from 'layoutManager';
-import connectionManager from 'connectionManager';
import globalize from 'globalize';
import loading from 'loading';
import browser from 'browser';
@@ -163,7 +162,7 @@ function tunerPicker() {
scrollHelper.centerFocus.on(dlg.querySelector('.formDialogContent'), false);
}
- const apiClient = connectionManager.getApiClient(options.serverId);
+ const apiClient = window.connectionManager.getApiClient(options.serverId);
discoverDevices(dlg, apiClient);
if (layoutManager.tv) {
diff --git a/src/components/upnextdialog/upnextdialog.css b/src/components/upnextdialog/upnextdialog.css
index 05e3b10f57..efb0366488 100644
--- a/src/components/upnextdialog/upnextdialog.css
+++ b/src/components/upnextdialog/upnextdialog.css
@@ -1,9 +1,10 @@
-.upNextDialog {
+.upNextContainer {
position: fixed;
- left: 0;
- bottom: 0;
right: 0;
- padding: 1%;
+ bottom: 0;
+ width: 30em;
+ padding: 1em;
+ margin: 0 2em 2em 0;
display: flex;
flex-direction: column;
will-change: transform, opacity;
@@ -22,13 +23,18 @@
font-weight: 500;
}
-.upNextDialog-poster {
- max-width: 40%;
- max-height: 15%;
- position: relative;
- margin-right: 1em;
- flex-shrink: 0;
- margin-bottom: 0.5em;
+.upNextDialog-nextVideoText,
+.upNextDialog-title {
+ width: 25.5em;
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+}
+
+.upNextDialog-buttons {
+ width: 29.75em;
+ justify-content: end;
+ align-content: flex-end;
}
.upNextDialog-button {
@@ -40,34 +46,4 @@
.upNextDialog {
flex-direction: row;
}
-
- .upNextDialog-poster {
- max-width: initial;
- max-height: initial;
- width: 10%;
- margin-bottom: 0;
- }
-}
-
-@media all and (max-width: 50em) {
- .upNextDialog-overview {
- display: none !important;
- }
-}
-
-.upNextDialog-poster-img {
- position: absolute;
- bottom: 0;
- left: 0;
- right: 0;
- height: auto;
- width: 100%;
- box-shadow: 0 0.0725em 0.29em 0 rgba(0, 0, 0, 0.37);
- user-drag: none;
- border: 0;
- user-select: none;
- -moz-user-select: none;
- -webkit-user-drag: none;
- -webkit-user-select: none;
- -ms-user-select: none;
}
diff --git a/src/components/upnextdialog/upnextdialog.js b/src/components/upnextdialog/upnextdialog.js
index e28bb03abe..45ac72b139 100644
--- a/src/components/upnextdialog/upnextdialog.js
+++ b/src/components/upnextdialog/upnextdialog.js
@@ -1,6 +1,5 @@
import dom from 'dom';
import playbackManager from 'playbackManager';
-import connectionManager from 'connectionManager';
import events from 'events';
import mediaInfo from 'mediaInfo';
import layoutManager from 'layoutManager';
@@ -15,84 +14,9 @@ import 'flexStyles';
const transitionEndEventName = dom.whichTransitionEvent();
- function seriesImageUrl(item, options) {
- if (item.Type !== 'Episode') {
- return null;
- }
-
- options = options || {};
- options.type = options.type || 'Primary';
-
- if (options.type === 'Primary') {
- if (item.SeriesPrimaryImageTag) {
- options.tag = item.SeriesPrimaryImageTag;
-
- return connectionManager.getApiClient(item.ServerId).getScaledImageUrl(item.SeriesId, options);
- }
- }
-
- if (options.type === 'Thumb') {
- if (item.SeriesThumbImageTag) {
- options.tag = item.SeriesThumbImageTag;
-
- return connectionManager.getApiClient(item.ServerId).getScaledImageUrl(item.SeriesId, options);
- }
- if (item.ParentThumbImageTag) {
- options.tag = item.ParentThumbImageTag;
-
- return connectionManager.getApiClient(item.ServerId).getScaledImageUrl(item.ParentThumbItemId, options);
- }
- }
-
- return null;
- }
-
- function imageUrl(item, options) {
- options = options || {};
- options.type = options.type || 'Primary';
-
- if (item.ImageTags && item.ImageTags[options.type]) {
- options.tag = item.ImageTags[options.type];
- return connectionManager.getApiClient(item.ServerId).getScaledImageUrl(item.PrimaryImageItemId || item.Id, options);
- }
-
- if (options.type === 'Primary') {
- if (item.AlbumId && item.AlbumPrimaryImageTag) {
- options.tag = item.AlbumPrimaryImageTag;
- return connectionManager.getApiClient(item.ServerId).getScaledImageUrl(item.AlbumId, options);
- }
- }
-
- return null;
- }
-
- function setPoster(osdPoster, item, secondaryItem) {
- if (item) {
- let imgUrl = seriesImageUrl(item, { type: 'Primary' }) ||
- seriesImageUrl(item, { type: 'Thumb' }) ||
- imageUrl(item, { type: 'Primary' });
-
- if (!imgUrl && secondaryItem) {
- imgUrl = seriesImageUrl(secondaryItem, { type: 'Primary' }) ||
- seriesImageUrl(secondaryItem, { type: 'Thumb' }) ||
- imageUrl(secondaryItem, { type: 'Primary' });
- }
-
- if (imgUrl) {
- osdPoster.innerHTML = '
';
- return;
- }
- }
-
- osdPoster.innerHTML = '';
- }
-
function getHtml() {
let html = '';
- html += '
';
- html += '
';
-
html += '
';
html += '
';
@@ -102,8 +26,6 @@ import 'flexStyles';
html += '
';
html += '
';
- html += '
';
-
html += '
';
html += '
+
';
@@ -551,13 +551,13 @@ import 'emby-itemscontainer';
row.classList.remove('playingSession');
}
- if (session.ServerId && session.SupportedCommands.indexOf('DisplayMessage') !== -1 && session.DeviceId !== connectionManager.deviceId()) {
+ if (session.ServerId && session.SupportedCommands.indexOf('DisplayMessage') !== -1) {
row.querySelector('.btnSessionSendMessage').classList.remove('hide');
} else {
row.querySelector('.btnSessionSendMessage').classList.add('hide');
}
- if (session.TranscodingInfo && session.TranscodingInfo.TranscodeReasons && session.TranscodingInfo && session.TranscodingInfo.TranscodeReasons.length) {
+ if (session.TranscodingInfo && session.TranscodingInfo.TranscodeReasons && session.TranscodingInfo) {
row.querySelector('.btnSessionInfo').classList.remove('hide');
} else {
row.querySelector('.btnSessionInfo').classList.add('hide');
@@ -565,7 +565,7 @@ import 'emby-itemscontainer';
const btnSessionPlayPause = row.querySelector('.btnSessionPlayPause');
- if (session.ServerId && nowPlayingItem && session.SupportsRemoteControl && session.DeviceId !== connectionManager.deviceId()) {
+ if (session.ServerId && nowPlayingItem && session.SupportsRemoteControl) {
btnSessionPlayPause.classList.remove('hide');
row.querySelector('.btnSessionStop').classList.remove('hide');
} else {
@@ -722,9 +722,9 @@ import 'emby-itemscontainer';
restart: function (btn) {
import('confirm').then(({default: confirm}) => {
confirm({
- title: globalize.translate('HeaderRestart'),
+ title: globalize.translate('Restart'),
text: globalize.translate('MessageConfirmRestart'),
- confirmText: globalize.translate('ButtonRestart'),
+ confirmText: globalize.translate('Restart'),
primary: 'delete'
}).then(function () {
const page = dom.parentWithClass(btn, 'page');
@@ -828,9 +828,17 @@ import 'emby-itemscontainer';
refreshActiveRecordings(view, apiClient);
loading.hide();
}
+
+ taskButton({
+ mode: 'on',
+ taskKey: 'RefreshLibrary',
+ button: page.querySelector('.btnRefresh')
+ });
});
view.addEventListener('viewbeforehide', function () {
const apiClient = ApiClient;
+ const page = this;
+
events.off(serverNotifications, 'RestartRequired', onRestartRequired);
events.off(serverNotifications, 'ServerShuttingDown', onServerShuttingDown);
events.off(serverNotifications, 'ServerRestarting', onServerRestarting);
@@ -842,6 +850,12 @@ import 'emby-itemscontainer';
if (apiClient) {
DashboardPage.stopInterval(apiClient);
}
+
+ taskButton({
+ mode: 'off',
+ taskKey: 'RefreshLibrary',
+ button: page.querySelector('.btnRefresh')
+ });
});
view.addEventListener('viewdestroy', function () {
const page = this;
diff --git a/src/controllers/dashboard/dlna/profile.html b/src/controllers/dashboard/dlna/profile.html
index 3ac3a71c6c..22edffed99 100644
--- a/src/controllers/dashboard/dlna/profile.html
+++ b/src/controllers/dashboard/dlna/profile.html
@@ -29,15 +29,15 @@
@@ -144,19 +144,19 @@