mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update recording dialogs
This commit is contained in:
parent
9146727fda
commit
0c7088e379
19 changed files with 143 additions and 70 deletions
|
@ -18,7 +18,7 @@
|
||||||
<input is="emby-input" id="txtWatchFolder" type="text" label="${LabelWatchFolder}" />
|
<input is="emby-input" id="txtWatchFolder" type="text" label="${LabelWatchFolder}" />
|
||||||
<div class="fieldDescription">${LabelWatchFolderHelp}</div>
|
<div class="fieldDescription">${LabelWatchFolderHelp}</div>
|
||||||
</div>
|
</div>
|
||||||
<button type="button" is="emby-button" id="btnSelectWatchFolder" title="${ButtonSelectDirectory}" class="autoSize"><i class="md-icon">search</i></button>
|
<button type="button" is="paper-icon-button-light" id="btnSelectWatchFolder" title="${ButtonSelectDirectory}" class="autoSize"><i class="md-icon">search</i></button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="inputContainer">
|
<div class="inputContainer">
|
||||||
|
|
|
@ -14,12 +14,12 @@
|
||||||
},
|
},
|
||||||
"devDependencies": {},
|
"devDependencies": {},
|
||||||
"ignore": [],
|
"ignore": [],
|
||||||
"version": "1.4.260",
|
"version": "1.4.261",
|
||||||
"_release": "1.4.260",
|
"_release": "1.4.261",
|
||||||
"_resolution": {
|
"_resolution": {
|
||||||
"type": "version",
|
"type": "version",
|
||||||
"tag": "1.4.260",
|
"tag": "1.4.261",
|
||||||
"commit": "17a68c9487039020a8056d4aec2617d0daf16d8b"
|
"commit": "c985fe644bf1268d66f69ddcf3ba73faf5c6bd3e"
|
||||||
},
|
},
|
||||||
"_source": "https://github.com/MediaBrowser/emby-webcomponents.git",
|
"_source": "https://github.com/MediaBrowser/emby-webcomponents.git",
|
||||||
"_target": "^1.2.1",
|
"_target": "^1.2.1",
|
||||||
|
|
|
@ -138,13 +138,14 @@ define(['browser'], function (browser) {
|
||||||
|
|
||||||
function testCanPlayTs() {
|
function testCanPlayTs() {
|
||||||
|
|
||||||
return browser.tizen || browser.web0s;
|
return browser.tizen || browser.web0s || browser.edgeUwp;
|
||||||
}
|
}
|
||||||
|
|
||||||
function getDirectPlayProfileForVideoContainer(container, videoAudioCodecs) {
|
function getDirectPlayProfileForVideoContainer(container, videoAudioCodecs) {
|
||||||
|
|
||||||
var supported = false;
|
var supported = false;
|
||||||
var profileContainer = container;
|
var profileContainer = container;
|
||||||
|
var videoCodecs = [];
|
||||||
|
|
||||||
switch (container) {
|
switch (container) {
|
||||||
|
|
||||||
|
@ -169,16 +170,19 @@ define(['browser'], function (browser) {
|
||||||
break;
|
break;
|
||||||
case 'mov':
|
case 'mov':
|
||||||
supported = browser.chrome || browser.edgeUwp;
|
supported = browser.chrome || browser.edgeUwp;
|
||||||
|
videoCodecs.push('h264');
|
||||||
break;
|
break;
|
||||||
case 'm2ts':
|
case 'm2ts':
|
||||||
supported = browser.tizen || browser.web0s || browser.edgeUwp;
|
supported = browser.tizen || browser.web0s || browser.edgeUwp;
|
||||||
|
videoCodecs.push('h264');
|
||||||
break;
|
break;
|
||||||
case 'wmv':
|
case 'wmv':
|
||||||
supported = browser.tizen || browser.web0s || browser.edgeUwp;
|
supported = browser.tizen || browser.web0s || browser.edgeUwp;
|
||||||
videoAudioCodecs = [];
|
videoAudioCodecs = [];
|
||||||
break;
|
break;
|
||||||
case 'ts':
|
case 'ts':
|
||||||
supported = browser.tizen || browser.web0s || browser.edgeUwp;
|
supported = testCanPlayTs();
|
||||||
|
videoCodecs.push('h264');
|
||||||
profileContainer = 'ts,mpegts';
|
profileContainer = 'ts,mpegts';
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -192,6 +196,7 @@ define(['browser'], function (browser) {
|
||||||
return {
|
return {
|
||||||
Container: profileContainer,
|
Container: profileContainer,
|
||||||
Type: 'Video',
|
Type: 'Video',
|
||||||
|
VideoCodec: videoCodecs.join(','),
|
||||||
AudioCodec: videoAudioCodecs.join(',')
|
AudioCodec: videoAudioCodecs.join(',')
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -239,7 +244,6 @@ define(['browser'], function (browser) {
|
||||||
var canPlayWebm = videoTestElement.canPlayType('video/webm').replace(/no/, '');
|
var canPlayWebm = videoTestElement.canPlayType('video/webm').replace(/no/, '');
|
||||||
|
|
||||||
var canPlayMkv = testCanPlayMkv(videoTestElement);
|
var canPlayMkv = testCanPlayMkv(videoTestElement);
|
||||||
var canPlayTs = testCanPlayTs();
|
|
||||||
|
|
||||||
var profile = {};
|
var profile = {};
|
||||||
|
|
||||||
|
@ -269,7 +273,7 @@ define(['browser'], function (browser) {
|
||||||
}
|
}
|
||||||
|
|
||||||
var mp3Added = false;
|
var mp3Added = false;
|
||||||
if (canPlayMkv || canPlayTs) {
|
if (canPlayMkv) {
|
||||||
if (supportsMp3VideoAudio) {
|
if (supportsMp3VideoAudio) {
|
||||||
mp3Added = true;
|
mp3Added = true;
|
||||||
videoAudioCodecs.push('mp3');
|
videoAudioCodecs.push('mp3');
|
||||||
|
@ -401,20 +405,6 @@ define(['browser'], function (browser) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if (canPlayTs && options.supportsCustomSeeking && !browser.tizen && !browser.web0s && options.enableTsProgressive !== false) {
|
|
||||||
profile.TranscodingProfiles.push({
|
|
||||||
Container: 'ts',
|
|
||||||
Type: 'Video',
|
|
||||||
AudioCodec: videoAudioCodecs.join(','),
|
|
||||||
VideoCodec: 'h264',
|
|
||||||
Context: 'Streaming',
|
|
||||||
CopyTimestamps: copyTimestamps,
|
|
||||||
// If audio transcoding is needed, limit channels to number of physical audio channels
|
|
||||||
// Trying to transcode to 5 channels when there are only 2 speakers generally does not sound good
|
|
||||||
MaxAudioChannels: physicalAudioChannels.toString()
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
if (canPlayHls() && options.enableHls !== false) {
|
if (canPlayHls() && options.enableHls !== false) {
|
||||||
profile.TranscodingProfiles.push({
|
profile.TranscodingProfiles.push({
|
||||||
Container: 'ts',
|
Container: 'ts',
|
||||||
|
|
|
@ -419,6 +419,11 @@
|
||||||
color: #cc3333 !important;
|
color: #cc3333 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.seriesTimerIcon-inactive {
|
||||||
|
color: inherit !important;
|
||||||
|
opacity: .7;
|
||||||
|
}
|
||||||
|
|
||||||
.visibleGuideScroller::-webkit-scrollbar {
|
.visibleGuideScroller::-webkit-scrollbar {
|
||||||
width: 10px;
|
width: 10px;
|
||||||
height: 10px;
|
height: 10px;
|
||||||
|
|
|
@ -395,8 +395,12 @@
|
||||||
html += '<i class="guideHdIcon md-icon programIcon">hd</i>';
|
html += '<i class="guideHdIcon md-icon programIcon">hd</i>';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (program.SeriesTimerId && program.TimerId) {
|
if (program.SeriesTimerId) {
|
||||||
|
if (program.TimerId) {
|
||||||
html += '<i class="seriesTimerIcon md-icon programIcon"></i>';
|
html += '<i class="seriesTimerIcon md-icon programIcon"></i>';
|
||||||
|
} else {
|
||||||
|
html += '<i class="seriesTimerIcon seriesTimerIcon-inactive md-icon programIcon"></i>';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (program.TimerId) {
|
else if (program.TimerId) {
|
||||||
html += '<i class="timerIcon md-icon programIcon"></i>';
|
html += '<i class="timerIcon md-icon programIcon"></i>';
|
||||||
|
|
|
@ -28,6 +28,10 @@
|
||||||
color: #CB272A;
|
color: #CB272A;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.timerIndicator-inactive {
|
||||||
|
color: #888;
|
||||||
|
}
|
||||||
|
|
||||||
.indicator + .indicator {
|
.indicator + .indicator {
|
||||||
margin-left: .25em;
|
margin-left: .25em;
|
||||||
}
|
}
|
||||||
|
|
|
@ -98,8 +98,12 @@ define(['css!./indicators.css', 'material-icons'], function () {
|
||||||
|
|
||||||
function getTimerIndicator(item) {
|
function getTimerIndicator(item) {
|
||||||
|
|
||||||
if (item.SeriesTimerId && item.TimerId) {
|
if (item.SeriesTimerId) {
|
||||||
|
if (item.TimerId) {
|
||||||
return '<i class="md-icon timerIndicator indicatorIcon"></i>';
|
return '<i class="md-icon timerIndicator indicatorIcon"></i>';
|
||||||
|
} else {
|
||||||
|
return '<i class="md-icon timerIndicator timerIndicator-inactive indicatorIcon"></i>';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (item.TimerId) {
|
else if (item.TimerId) {
|
||||||
return '<i class="md-icon timerIndicator indicatorIcon"></i>';
|
return '<i class="md-icon timerIndicator indicatorIcon"></i>';
|
||||||
|
|
|
@ -41,10 +41,16 @@ define(['datetime', 'globalize', 'embyRouter', 'itemHelper', 'material-icons', '
|
||||||
}
|
}
|
||||||
|
|
||||||
if (options.timerIndicator !== false) {
|
if (options.timerIndicator !== false) {
|
||||||
if (item.SeriesTimerId && item.TimerId) {
|
if (item.SeriesTimerId) {
|
||||||
|
if (item.TimerId) {
|
||||||
miscInfo.push({
|
miscInfo.push({
|
||||||
html: '<i class="md-icon mediaInfoItem mediaInfoTimerIcon mediaInfoIconItem"></i>'
|
html: '<i class="md-icon mediaInfoItem mediaInfoTimerIcon mediaInfoIconItem"></i>'
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
|
miscInfo.push({
|
||||||
|
html: '<i class="md-icon mediaInfoItem mediaInfoIconItem"></i>'
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (item.TimerId) {
|
else if (item.TimerId) {
|
||||||
miscInfo.push({
|
miscInfo.push({
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
<div style="flex-grow: 1;">
|
<div style="flex-grow: 1;">
|
||||||
<input is="emby-input" type="number" id="txtPrePaddingMinutes" pattern="[0-9]*" required="required" min="0" step="1" label="${LabelStartWhenPossible}" />
|
<input is="emby-input" type="number" id="txtPrePaddingMinutes" pattern="[0-9]*" required="required" min="0" step="1" label="${LabelStartWhenPossible}" />
|
||||||
</div>
|
</div>
|
||||||
<div class="fieldDescription" style="margin-left:.5em;font-size:90%;">
|
<div class="fieldDescription" style="margin-left:.5em;font-size:90%;margin-top:1.5em;">
|
||||||
${MinutesBefore}
|
${MinutesBefore}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -25,7 +25,7 @@
|
||||||
<div style="flex-grow: 1;">
|
<div style="flex-grow: 1;">
|
||||||
<input is="emby-input" type="number" id="txtPostPaddingMinutes" pattern="[0-9]*" required="required" min="0" step="1" label="${LabelStopWhenPossible}" />
|
<input is="emby-input" type="number" id="txtPostPaddingMinutes" pattern="[0-9]*" required="required" min="0" step="1" label="${LabelStopWhenPossible}" />
|
||||||
</div>
|
</div>
|
||||||
<div class="fieldDescription" style="margin-left:.5em;font-size:90%;">
|
<div class="fieldDescription" style="margin-left:.5em;font-size:90%;margin-top:1.5em;">
|
||||||
${MinutesAfter}
|
${MinutesAfter}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -224,6 +224,12 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function sendToast(msg) {
|
||||||
|
require(['toast'], function (toast) {
|
||||||
|
toast(msg);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
function onRecordSeriesChange(e) {
|
function onRecordSeriesChange(e) {
|
||||||
|
|
||||||
this.changed = true;
|
this.changed = true;
|
||||||
|
@ -254,6 +260,7 @@
|
||||||
|
|
||||||
if (this.SeriesTimerId) {
|
if (this.SeriesTimerId) {
|
||||||
apiClient.cancelLiveTvSeriesTimer(this.SeriesTimerId).then(function () {
|
apiClient.cancelLiveTvSeriesTimer(this.SeriesTimerId).then(function () {
|
||||||
|
sendToast(globalize.translate('sharedcomponents#RecordingCancelled'));
|
||||||
fetchData(self);
|
fetchData(self);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -59,9 +59,33 @@
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function toggleRecording(serverId, programId, timerId, seriesTimerId) {
|
||||||
|
|
||||||
|
var apiClient = connectionManager.getApiClient(serverId);
|
||||||
|
|
||||||
|
if (seriesTimerId && timerId) {
|
||||||
|
|
||||||
|
// cancel
|
||||||
|
return cancelTimer(apiClient, timerId, true);
|
||||||
|
|
||||||
|
} else if (timerId && programId) {
|
||||||
|
|
||||||
|
// change to series recording, if possible
|
||||||
|
// otherwise cancel individual recording
|
||||||
|
return changeRecordingToSeries(apiClient, timerId, programId);
|
||||||
|
|
||||||
|
} else if (programId) {
|
||||||
|
// schedule recording
|
||||||
|
return createRecording(apiClient, programId);
|
||||||
|
} else {
|
||||||
|
return Promise.reject();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
cancelTimer: cancelTimer,
|
cancelTimer: cancelTimer,
|
||||||
createRecording: createRecording,
|
createRecording: createRecording,
|
||||||
changeRecordingToSeries: changeRecordingToSeries
|
changeRecordingToSeries: changeRecordingToSeries,
|
||||||
|
toggleRecording: toggleRecording
|
||||||
};
|
};
|
||||||
});
|
});
|
|
@ -48,7 +48,7 @@
|
||||||
<div style="flex-grow: 1;">
|
<div style="flex-grow: 1;">
|
||||||
<input is="emby-input" type="number" id="txtPrePaddingMinutes" pattern="[0-9]*" required="required" min="0" step="1" label="${LabelStartWhenPossible}" />
|
<input is="emby-input" type="number" id="txtPrePaddingMinutes" pattern="[0-9]*" required="required" min="0" step="1" label="${LabelStartWhenPossible}" />
|
||||||
</div>
|
</div>
|
||||||
<div class="fieldDescription" style="margin-left:.5em;font-size:90%;">
|
<div class="fieldDescription" style="margin-left:.5em;font-size:90%;margin-top:1.5em;">
|
||||||
${MinutesBefore}
|
${MinutesBefore}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -58,7 +58,7 @@
|
||||||
<div style="flex-grow: 1;">
|
<div style="flex-grow: 1;">
|
||||||
<input is="emby-input" type="number" id="txtPostPaddingMinutes" pattern="[0-9]*" required="required" min="0" step="1" label="${LabelStopWhenPossible}" />
|
<input is="emby-input" type="number" id="txtPostPaddingMinutes" pattern="[0-9]*" required="required" min="0" step="1" label="${LabelStopWhenPossible}" />
|
||||||
</div>
|
</div>
|
||||||
<div class="fieldDescription" style="margin-left:.5em;font-size:90%;">
|
<div class="fieldDescription" style="margin-left:.5em;font-size:90%;margin-top:1.5em;">
|
||||||
${MinutesAfter}
|
${MinutesAfter}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -335,22 +335,10 @@ define(['playbackManager', 'inputManager', 'connectionManager', 'embyRouter', 'g
|
||||||
|
|
||||||
function onRecordCommand(serverId, id, type, timerId, seriesTimerId) {
|
function onRecordCommand(serverId, id, type, timerId, seriesTimerId) {
|
||||||
|
|
||||||
var apiClient = connectionManager.getApiClient(serverId);
|
if (type == 'Program' || timerId || seriesTimerId) {
|
||||||
|
|
||||||
if (seriesTimerId && timerId) {
|
var programId = type == 'Program' ? id : null;
|
||||||
|
recordingHelper.toggle(serverId, programId, timerId, seriesTimerId);
|
||||||
// cancel
|
|
||||||
recordingHelper.cancelTimer(apiClient, timerId, true);
|
|
||||||
|
|
||||||
} else if (timerId) {
|
|
||||||
|
|
||||||
// change to series recording, if possible
|
|
||||||
// otherwise cancel individual recording
|
|
||||||
recordingHelper.changeRecordingToSeries(apiClient, timerId, id);
|
|
||||||
|
|
||||||
} else if (type == 'Program') {
|
|
||||||
// schedule recording
|
|
||||||
recordingHelper.createRecording(apiClient, id);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -300,7 +300,7 @@
|
||||||
"LabelStopWhenPossible": "Stop when possible:",
|
"LabelStopWhenPossible": "Stop when possible:",
|
||||||
"MinutesBefore": "minutes before",
|
"MinutesBefore": "minutes before",
|
||||||
"MinutesAfter": "minutes after",
|
"MinutesAfter": "minutes after",
|
||||||
"SkipEpisodesAlreadyInMyLibrary": "Skip recording episodes that are already in my library",
|
"SkipEpisodesAlreadyInMyLibrary": "Skip episodes that are already in my library",
|
||||||
"SkipEpisodesAlreadyInMyLibraryHelp": "Episodes will be compared using season and episode numbers, when available.",
|
"SkipEpisodesAlreadyInMyLibraryHelp": "Episodes will be compared using season and episode numbers, when available.",
|
||||||
"LabelKeepUpTo": "Keep up to:",
|
"LabelKeepUpTo": "Keep up to:",
|
||||||
"AsManyAsPossible": "As many as possible"
|
"AsManyAsPossible": "As many as possible"
|
||||||
|
|
|
@ -16,16 +16,23 @@
|
||||||
<div>
|
<div>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<h1 class="serverNameHeader"></h1>
|
<div style="display: flex; align-items: center;margin-top:1.45em;">
|
||||||
<div class="paperList" style="padding:1em;">
|
<h1 class="serverNameHeader" style="margin:0;"></h1>
|
||||||
|
<button is="paper-icon-button-light" type="button" class="btnEditServerName" style="margin-left: .5em;color:#666;">
|
||||||
|
<i class="md-icon">mode_edit</i>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<div class="paperList" style="padding: 1em;">
|
||||||
<p id="appVersionNumber">
|
<p id="appVersionNumber">
|
||||||
</p>
|
</p>
|
||||||
<p id="pUpToDate" style="display: flex; align-items:center;" class="hide">
|
<p id="pUpToDate" style="display: flex; align-items: center;" class="hide">
|
||||||
<i class="md-icon" style="background-color: #52B54B;border-radius:.25em;color: #fff;margin-right:.5em;padding:.25em;font-size:110%;">check</i>
|
<i class="md-icon" style="background-color: #52B54B; border-radius: .25em; color: #fff; margin-right: .5em; padding: .25em; font-size: 110%;">check</i>
|
||||||
${ServerUpToDate}
|
${ServerUpToDate}
|
||||||
</p>
|
</p>
|
||||||
<div id="pUpdateNow" style="display: none;">
|
<div id="pUpdateNow" style="display: none;">
|
||||||
<p><strong>${NewServerVersionAvailable}</strong></p>
|
<p>
|
||||||
|
<strong>${NewServerVersionAvailable}</strong>
|
||||||
|
</p>
|
||||||
<p id="newVersionNumber"></p>
|
<p id="newVersionNumber"></p>
|
||||||
<div id="btnUpdateApplicationContainer">
|
<div id="btnUpdateApplicationContainer">
|
||||||
<button id="btnUpdateApplication" type="button" data-icon="arrow-d" data-theme="b" onclick="DashboardPage.updateApplication();">${ButtonUpdateNow}</button>
|
<button id="btnUpdateApplication" type="button" data-icon="arrow-d" data-theme="b" onclick="DashboardPage.updateApplication();">${ButtonUpdateNow}</button>
|
||||||
|
@ -39,7 +46,9 @@
|
||||||
|
|
||||||
<p class="localUrl"></p>
|
<p class="localUrl"></p>
|
||||||
<p class="externalUrl"></p>
|
<p class="externalUrl"></p>
|
||||||
<p class="hide"><a class="btnConnectionHelp" href="#">${HowToConnectFromEmbyApps}</a></p>
|
<p class="hide">
|
||||||
|
<a class="btnConnectionHelp" href="#">${HowToConnectFromEmbyApps}</a>
|
||||||
|
</p>
|
||||||
<div style="margin-top: 1em;">
|
<div style="margin-top: 1em;">
|
||||||
<button is="emby-button" type="button" class="raised button-cancel btnRestartContainer hide" onclick="DashboardPage.restart();">
|
<button is="emby-button" type="button" class="raised button-cancel btnRestartContainer hide" onclick="DashboardPage.restart();">
|
||||||
<i class="md-icon">refresh</i>
|
<i class="md-icon">refresh</i>
|
||||||
|
|
|
@ -21,7 +21,6 @@
|
||||||
$('#fldRunAtStartup', page).hide();
|
$('#fldRunAtStartup', page).hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
page.querySelector('#txtServerName').value = config.ServerName || '';
|
|
||||||
page.querySelector('#txtCachePath').value = config.CachePath || '';
|
page.querySelector('#txtCachePath').value = config.CachePath || '';
|
||||||
|
|
||||||
$('#selectLocalizationLanguage', page).html(languageOptions.map(function (l) {
|
$('#selectLocalizationLanguage', page).html(languageOptions.map(function (l) {
|
||||||
|
@ -66,7 +65,6 @@
|
||||||
|
|
||||||
ApiClient.getServerConfiguration().then(function (config) {
|
ApiClient.getServerConfiguration().then(function (config) {
|
||||||
|
|
||||||
config.ServerName = form.querySelector('#txtServerName').value;
|
|
||||||
config.UICulture = $('#selectLocalizationLanguage', form).val();
|
config.UICulture = $('#selectLocalizationLanguage', form).val();
|
||||||
|
|
||||||
config.CachePath = form.querySelector('#txtCachePath').value;
|
config.CachePath = form.querySelector('#txtCachePath').value;
|
||||||
|
|
|
@ -5,10 +5,6 @@
|
||||||
|
|
||||||
<form class="dashboardGeneralForm">
|
<form class="dashboardGeneralForm">
|
||||||
|
|
||||||
<div class="inputContainer">
|
|
||||||
<input is="emby-input" type="text" id="txtServerName" label="${LabelFriendlyServerName}" />
|
|
||||||
<div class="fieldDescription">${LabelFriendlyServerNameHelp}</div>
|
|
||||||
</div>
|
|
||||||
<div class="selectContainer">
|
<div class="selectContainer">
|
||||||
<select is="emby-select" id="selectLocalizationLanguage" label="${LabelPreferredDisplayLanguage}"></select>
|
<select is="emby-select" id="selectLocalizationLanguage" label="${LabelPreferredDisplayLanguage}"></select>
|
||||||
<div class="fieldDescription">
|
<div class="fieldDescription">
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
define(['datetime', 'jQuery', 'cardStyle'], function (datetime, $) {
|
define(['datetime', 'jQuery', 'dom', 'cardStyle'], function (datetime, $, dom) {
|
||||||
|
|
||||||
function renderNoHealthAlertsMessage(page) {
|
function renderNoHealthAlertsMessage(page) {
|
||||||
|
|
||||||
|
@ -22,6 +22,37 @@
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function onEditServerNameClick(e) {
|
||||||
|
|
||||||
|
var page = dom.parentWithClass(this, 'page');
|
||||||
|
|
||||||
|
require(['prompt'], function (prompt) {
|
||||||
|
|
||||||
|
prompt({
|
||||||
|
label: Globalize.translate('LabelFriendlyServerName'),
|
||||||
|
description: Globalize.translate('LabelFriendlyServerNameHelp'),
|
||||||
|
value: page.querySelector('.serverNameHeader').innerHTML
|
||||||
|
|
||||||
|
}).then(function (value) {
|
||||||
|
|
||||||
|
Dashboard.showLoadingMsg();
|
||||||
|
|
||||||
|
ApiClient.getServerConfiguration().then(function (config) {
|
||||||
|
|
||||||
|
config.ServerName = value;
|
||||||
|
|
||||||
|
ApiClient.updateServerConfiguration(config).then(function () {
|
||||||
|
page.querySelector('.serverNameHeader').innerHTML = value;
|
||||||
|
Dashboard.hideLoadingMsg();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
e.preventDefault();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
window.DashboardPage = {
|
window.DashboardPage = {
|
||||||
|
|
||||||
newsStartIndex: 0,
|
newsStartIndex: 0,
|
||||||
|
@ -31,6 +62,7 @@
|
||||||
var page = this;
|
var page = this;
|
||||||
|
|
||||||
page.querySelector('.btnConnectionHelp').addEventListener('click', onConnectionHelpClick);
|
page.querySelector('.btnConnectionHelp').addEventListener('click', onConnectionHelpClick);
|
||||||
|
page.querySelector('.btnEditServerName').addEventListener('click', onEditServerNameClick);
|
||||||
},
|
},
|
||||||
|
|
||||||
onPageShow: function () {
|
onPageShow: function () {
|
||||||
|
@ -123,9 +155,9 @@
|
||||||
$('#appVersionNumber', page).html(localizedVersion);
|
$('#appVersionNumber', page).html(localizedVersion);
|
||||||
|
|
||||||
if (systemInfo.SupportsHttps) {
|
if (systemInfo.SupportsHttps) {
|
||||||
$('#ports', page).html(Globalize.translate('LabelRunningOnPorts', '<b>' + systemInfo.HttpServerPortNumber + '</b>', '<b>' + systemInfo.HttpsPortNumber + '</b>'));
|
$('#ports', page).html(Globalize.translate('LabelRunningOnPorts', systemInfo.HttpServerPortNumber, systemInfo.HttpsPortNumber));
|
||||||
} else {
|
} else {
|
||||||
$('#ports', page).html(Globalize.translate('LabelRunningOnPort', '<b>' + systemInfo.HttpServerPortNumber + '</b>'));
|
$('#ports', page).html(Globalize.translate('LabelRunningOnPort', systemInfo.HttpServerPortNumber));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (systemInfo.CanSelfRestart) {
|
if (systemInfo.CanSelfRestart) {
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
define(['layoutManager', 'cardBuilder', 'datetime', 'mediaInfo', 'backdrop', 'listView', 'itemContextMenu', 'itemHelper', 'userdataButtons', 'dom', 'indicators', 'apphost', 'scrollStyles', 'emby-itemscontainer', 'emby-checkbox', 'emby-toggle'], function (layoutManager, cardBuilder, datetime, mediaInfo, backdrop, listView, itemContextMenu, itemHelper, userdataButtons, dom, indicators, appHost) {
|
define(['layoutManager', 'cardBuilder', 'datetime', 'mediaInfo', 'backdrop', 'listView', 'itemContextMenu', 'itemHelper', 'userdataButtons', 'dom', 'indicators', 'apphost', 'scrollStyles', 'emby-itemscontainer', 'emby-checkbox', 'emby-toggle'], function (layoutManager, cardBuilder, datetime, mediaInfo, backdrop, listView, itemContextMenu, itemHelper, userdataButtons, dom, indicators, appHost) {
|
||||||
|
|
||||||
var currentItem;
|
var currentItem;
|
||||||
|
var currentRecordingFields;
|
||||||
|
|
||||||
function getPromise(params) {
|
function getPromise(params) {
|
||||||
|
|
||||||
|
@ -298,13 +299,17 @@
|
||||||
|
|
||||||
function showRecordingFields(page, item, user) {
|
function showRecordingFields(page, item, user) {
|
||||||
|
|
||||||
|
if (currentRecordingFields) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
var recordingFieldsElement = page.querySelector('.recordingFields');
|
var recordingFieldsElement = page.querySelector('.recordingFields');
|
||||||
|
|
||||||
if (item.Type == 'Program' && user.Policy.EnableLiveTvManagement) {
|
if (item.Type == 'Program' && user.Policy.EnableLiveTvManagement) {
|
||||||
|
|
||||||
require(['recordingFields'], function (recordingFields) {
|
require(['recordingFields'], function (recordingFields) {
|
||||||
|
|
||||||
var currentRecordingFields = new recordingFields({
|
currentRecordingFields = new recordingFields({
|
||||||
parent: recordingFieldsElement,
|
parent: recordingFieldsElement,
|
||||||
programId: item.Id,
|
programId: item.Id,
|
||||||
serverId: item.ServerId
|
serverId: item.ServerId
|
||||||
|
@ -2181,6 +2186,7 @@
|
||||||
view.addEventListener('viewbeforehide', function () {
|
view.addEventListener('viewbeforehide', function () {
|
||||||
|
|
||||||
currentItem = null;
|
currentItem = null;
|
||||||
|
currentRecordingFields = null;
|
||||||
|
|
||||||
Events.off(ApiClient, 'websocketmessage', onWebSocketMessage);
|
Events.off(ApiClient, 'websocketmessage', onWebSocketMessage);
|
||||||
LibraryMenu.setTransparentMenu(false);
|
LibraryMenu.setTransparentMenu(false);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue