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
|
@ -14,12 +14,12 @@
|
|||
},
|
||||
"devDependencies": {},
|
||||
"ignore": [],
|
||||
"version": "1.4.260",
|
||||
"_release": "1.4.260",
|
||||
"version": "1.4.261",
|
||||
"_release": "1.4.261",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "1.4.260",
|
||||
"commit": "17a68c9487039020a8056d4aec2617d0daf16d8b"
|
||||
"tag": "1.4.261",
|
||||
"commit": "c985fe644bf1268d66f69ddcf3ba73faf5c6bd3e"
|
||||
},
|
||||
"_source": "https://github.com/MediaBrowser/emby-webcomponents.git",
|
||||
"_target": "^1.2.1",
|
||||
|
|
|
@ -138,13 +138,14 @@ define(['browser'], function (browser) {
|
|||
|
||||
function testCanPlayTs() {
|
||||
|
||||
return browser.tizen || browser.web0s;
|
||||
return browser.tizen || browser.web0s || browser.edgeUwp;
|
||||
}
|
||||
|
||||
function getDirectPlayProfileForVideoContainer(container, videoAudioCodecs) {
|
||||
|
||||
var supported = false;
|
||||
var profileContainer = container;
|
||||
var videoCodecs = [];
|
||||
|
||||
switch (container) {
|
||||
|
||||
|
@ -169,16 +170,19 @@ define(['browser'], function (browser) {
|
|||
break;
|
||||
case 'mov':
|
||||
supported = browser.chrome || browser.edgeUwp;
|
||||
videoCodecs.push('h264');
|
||||
break;
|
||||
case 'm2ts':
|
||||
supported = browser.tizen || browser.web0s || browser.edgeUwp;
|
||||
videoCodecs.push('h264');
|
||||
break;
|
||||
case 'wmv':
|
||||
supported = browser.tizen || browser.web0s || browser.edgeUwp;
|
||||
videoAudioCodecs = [];
|
||||
break;
|
||||
case 'ts':
|
||||
supported = browser.tizen || browser.web0s || browser.edgeUwp;
|
||||
supported = testCanPlayTs();
|
||||
videoCodecs.push('h264');
|
||||
profileContainer = 'ts,mpegts';
|
||||
break;
|
||||
default:
|
||||
|
@ -192,6 +196,7 @@ define(['browser'], function (browser) {
|
|||
return {
|
||||
Container: profileContainer,
|
||||
Type: 'Video',
|
||||
VideoCodec: videoCodecs.join(','),
|
||||
AudioCodec: videoAudioCodecs.join(',')
|
||||
};
|
||||
}
|
||||
|
@ -239,7 +244,6 @@ define(['browser'], function (browser) {
|
|||
var canPlayWebm = videoTestElement.canPlayType('video/webm').replace(/no/, '');
|
||||
|
||||
var canPlayMkv = testCanPlayMkv(videoTestElement);
|
||||
var canPlayTs = testCanPlayTs();
|
||||
|
||||
var profile = {};
|
||||
|
||||
|
@ -269,7 +273,7 @@ define(['browser'], function (browser) {
|
|||
}
|
||||
|
||||
var mp3Added = false;
|
||||
if (canPlayMkv || canPlayTs) {
|
||||
if (canPlayMkv) {
|
||||
if (supportsMp3VideoAudio) {
|
||||
mp3Added = true;
|
||||
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) {
|
||||
profile.TranscodingProfiles.push({
|
||||
Container: 'ts',
|
||||
|
|
|
@ -419,6 +419,11 @@
|
|||
color: #cc3333 !important;
|
||||
}
|
||||
|
||||
.seriesTimerIcon-inactive {
|
||||
color: inherit !important;
|
||||
opacity: .7;
|
||||
}
|
||||
|
||||
.visibleGuideScroller::-webkit-scrollbar {
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
|
|
|
@ -395,8 +395,12 @@
|
|||
html += '<i class="guideHdIcon md-icon programIcon">hd</i>';
|
||||
}
|
||||
|
||||
if (program.SeriesTimerId && program.TimerId) {
|
||||
html += '<i class="seriesTimerIcon md-icon programIcon"></i>';
|
||||
if (program.SeriesTimerId) {
|
||||
if (program.TimerId) {
|
||||
html += '<i class="seriesTimerIcon md-icon programIcon"></i>';
|
||||
} else {
|
||||
html += '<i class="seriesTimerIcon seriesTimerIcon-inactive md-icon programIcon"></i>';
|
||||
}
|
||||
}
|
||||
else if (program.TimerId) {
|
||||
html += '<i class="timerIcon md-icon programIcon"></i>';
|
||||
|
|
|
@ -28,6 +28,10 @@
|
|||
color: #CB272A;
|
||||
}
|
||||
|
||||
.timerIndicator-inactive {
|
||||
color: #888;
|
||||
}
|
||||
|
||||
.indicator + .indicator {
|
||||
margin-left: .25em;
|
||||
}
|
||||
|
@ -73,4 +77,4 @@
|
|||
|
||||
.fullSyncIndicator {
|
||||
background: rgba(82,181,75,1);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -98,8 +98,12 @@ define(['css!./indicators.css', 'material-icons'], function () {
|
|||
|
||||
function getTimerIndicator(item) {
|
||||
|
||||
if (item.SeriesTimerId && item.TimerId) {
|
||||
return '<i class="md-icon timerIndicator indicatorIcon"></i>';
|
||||
if (item.SeriesTimerId) {
|
||||
if (item.TimerId) {
|
||||
return '<i class="md-icon timerIndicator indicatorIcon"></i>';
|
||||
} else {
|
||||
return '<i class="md-icon timerIndicator timerIndicator-inactive indicatorIcon"></i>';
|
||||
}
|
||||
}
|
||||
else if (item.TimerId) {
|
||||
return '<i class="md-icon timerIndicator indicatorIcon"></i>';
|
||||
|
|
|
@ -41,10 +41,16 @@ define(['datetime', 'globalize', 'embyRouter', 'itemHelper', 'material-icons', '
|
|||
}
|
||||
|
||||
if (options.timerIndicator !== false) {
|
||||
if (item.SeriesTimerId && item.TimerId) {
|
||||
miscInfo.push({
|
||||
html: '<i class="md-icon mediaInfoItem mediaInfoTimerIcon mediaInfoIconItem"></i>'
|
||||
});
|
||||
if (item.SeriesTimerId) {
|
||||
if (item.TimerId) {
|
||||
miscInfo.push({
|
||||
html: '<i class="md-icon mediaInfoItem mediaInfoTimerIcon mediaInfoIconItem"></i>'
|
||||
});
|
||||
} else {
|
||||
miscInfo.push({
|
||||
html: '<i class="md-icon mediaInfoItem mediaInfoIconItem"></i>'
|
||||
});
|
||||
}
|
||||
}
|
||||
else if (item.TimerId) {
|
||||
miscInfo.push({
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
<div style="flex-grow: 1;">
|
||||
<input is="emby-input" type="number" id="txtPrePaddingMinutes" pattern="[0-9]*" required="required" min="0" step="1" label="${LabelStartWhenPossible}" />
|
||||
</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}
|
||||
</div>
|
||||
</div>
|
||||
|
@ -25,7 +25,7 @@
|
|||
<div style="flex-grow: 1;">
|
||||
<input is="emby-input" type="number" id="txtPostPaddingMinutes" pattern="[0-9]*" required="required" min="0" step="1" label="${LabelStopWhenPossible}" />
|
||||
</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}
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -224,6 +224,12 @@
|
|||
}
|
||||
}
|
||||
|
||||
function sendToast(msg) {
|
||||
require(['toast'], function (toast) {
|
||||
toast(msg);
|
||||
});
|
||||
}
|
||||
|
||||
function onRecordSeriesChange(e) {
|
||||
|
||||
this.changed = true;
|
||||
|
@ -254,6 +260,7 @@
|
|||
|
||||
if (this.SeriesTimerId) {
|
||||
apiClient.cancelLiveTvSeriesTimer(this.SeriesTimerId).then(function () {
|
||||
sendToast(globalize.translate('sharedcomponents#RecordingCancelled'));
|
||||
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 {
|
||||
cancelTimer: cancelTimer,
|
||||
createRecording: createRecording,
|
||||
changeRecordingToSeries: changeRecordingToSeries
|
||||
changeRecordingToSeries: changeRecordingToSeries,
|
||||
toggleRecording: toggleRecording
|
||||
};
|
||||
});
|
|
@ -48,7 +48,7 @@
|
|||
<div style="flex-grow: 1;">
|
||||
<input is="emby-input" type="number" id="txtPrePaddingMinutes" pattern="[0-9]*" required="required" min="0" step="1" label="${LabelStartWhenPossible}" />
|
||||
</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}
|
||||
</div>
|
||||
</div>
|
||||
|
@ -58,7 +58,7 @@
|
|||
<div style="flex-grow: 1;">
|
||||
<input is="emby-input" type="number" id="txtPostPaddingMinutes" pattern="[0-9]*" required="required" min="0" step="1" label="${LabelStopWhenPossible}" />
|
||||
</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}
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -335,22 +335,10 @@ define(['playbackManager', 'inputManager', 'connectionManager', 'embyRouter', 'g
|
|||
|
||||
function onRecordCommand(serverId, id, type, timerId, seriesTimerId) {
|
||||
|
||||
var apiClient = connectionManager.getApiClient(serverId);
|
||||
if (type == 'Program' || timerId || seriesTimerId) {
|
||||
|
||||
if (seriesTimerId && timerId) {
|
||||
|
||||
// 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);
|
||||
var programId = type == 'Program' ? id : null;
|
||||
recordingHelper.toggle(serverId, programId, timerId, seriesTimerId);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -300,7 +300,7 @@
|
|||
"LabelStopWhenPossible": "Stop when possible:",
|
||||
"MinutesBefore": "minutes before",
|
||||
"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.",
|
||||
"LabelKeepUpTo": "Keep up to:",
|
||||
"AsManyAsPossible": "As many as possible"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue