mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-17 19:08:18 -07:00
add sports and kids recording categories
This commit is contained in:
parent
5ec5a0d9fa
commit
1efcc067f0
@ -940,6 +940,13 @@
|
||||
return self.getJSON(url);
|
||||
};
|
||||
|
||||
self.getLiveTvRecordingSeries = function (options) {
|
||||
|
||||
var url = self.getUrl("LiveTv/Recordings/Series", options || {});
|
||||
|
||||
return self.getJSON(url);
|
||||
};
|
||||
|
||||
self.getLiveTvRecordingGroups = function (options) {
|
||||
|
||||
var url = self.getUrl("LiveTv/Recordings/Groups", options || {});
|
||||
|
@ -14,12 +14,12 @@
|
||||
},
|
||||
"devDependencies": {},
|
||||
"ignore": [],
|
||||
"version": "1.4.218",
|
||||
"_release": "1.4.218",
|
||||
"version": "1.4.219",
|
||||
"_release": "1.4.219",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "1.4.218",
|
||||
"commit": "4374b68415ef644f1b9ef55c91744ad788d829a1"
|
||||
"tag": "1.4.219",
|
||||
"commit": "01b409b14bf53cb71f5af887266d0dec0645f7fe"
|
||||
},
|
||||
"_source": "https://github.com/MediaBrowser/emby-webcomponents.git",
|
||||
"_target": "^1.2.1",
|
||||
|
@ -970,8 +970,8 @@ define(['datetime', 'imageLoader', 'connectionManager', 'itemHelper', 'mediaInfo
|
||||
if (item.MovieCount) {
|
||||
|
||||
childText = item.MovieCount == 1 ?
|
||||
globalize.translate('ValueOneMovie') :
|
||||
globalize.translate('ValueMovieCount', item.MovieCount);
|
||||
globalize.translate('sharedcomponents#ValueOneMovie') :
|
||||
globalize.translate('sharedcomponents#ValueMovieCount', item.MovieCount);
|
||||
|
||||
counts.push(childText);
|
||||
}
|
||||
@ -979,24 +979,24 @@ define(['datetime', 'imageLoader', 'connectionManager', 'itemHelper', 'mediaInfo
|
||||
if (item.SeriesCount) {
|
||||
|
||||
childText = item.SeriesCount == 1 ?
|
||||
globalize.translate('ValueOneSeries') :
|
||||
globalize.translate('ValueSeriesCount', item.SeriesCount);
|
||||
globalize.translate('sharedcomponents#ValueOneSeries') :
|
||||
globalize.translate('sharedcomponents#ValueSeriesCount', item.SeriesCount);
|
||||
|
||||
counts.push(childText);
|
||||
}
|
||||
if (item.EpisodeCount) {
|
||||
|
||||
childText = item.EpisodeCount == 1 ?
|
||||
globalize.translate('ValueOneEpisode') :
|
||||
globalize.translate('ValueEpisodeCount', item.EpisodeCount);
|
||||
globalize.translate('sharedcomponents#ValueOneEpisode') :
|
||||
globalize.translate('sharedcomponents#ValueEpisodeCount', item.EpisodeCount);
|
||||
|
||||
counts.push(childText);
|
||||
}
|
||||
if (item.GameCount) {
|
||||
|
||||
childText = item.GameCount == 1 ?
|
||||
globalize.translate('ValueOneGame') :
|
||||
globalize.translate('ValueGameCount', item.GameCount);
|
||||
globalize.translate('sharedcomponents#ValueOneGame') :
|
||||
globalize.translate('sharedcomponents#ValueGameCount', item.GameCount);
|
||||
|
||||
counts.push(childText);
|
||||
}
|
||||
@ -1037,6 +1037,14 @@ define(['datetime', 'imageLoader', 'connectionManager', 'itemHelper', 'mediaInfo
|
||||
|
||||
counts.push(childText);
|
||||
}
|
||||
|
||||
} else if (item.Type == 'Series') {
|
||||
|
||||
childText = item.RecursiveItemCount == 1 ?
|
||||
globalize.translate('sharedcomponents#ValueOneEpisode') :
|
||||
globalize.translate('sharedcomponents#ValueEpisodeCount', item.RecursiveItemCount);
|
||||
|
||||
counts.push(childText);
|
||||
}
|
||||
|
||||
return counts.join(', ');
|
||||
|
@ -807,7 +807,7 @@
|
||||
// find guide cells by timer id, remove timer icon
|
||||
var cells = options.element.querySelectorAll('.programCell[data-timerid="' + id + '"]');
|
||||
for (var i = 0, length = cells.length; i < length; i++) {
|
||||
var cells = cells[i];
|
||||
var cell = cells[i];
|
||||
var icon = cell.querySelector('.timerIcon');
|
||||
if (icon) {
|
||||
icon.parentNode.removeChild(icon);
|
||||
@ -821,7 +821,7 @@
|
||||
// find guide cells by timer id, remove timer icon
|
||||
var cells = options.element.querySelectorAll('.programCell[data-seriestimerid="' + id + '"]');
|
||||
for (var i = 0, length = cells.length; i < length; i++) {
|
||||
var cells = cells[i];
|
||||
var cell = cells[i];
|
||||
var icon = cell.querySelector('.seriesTimerIcon');
|
||||
if (icon) {
|
||||
icon.parentNode.removeChild(icon);
|
||||
@ -834,6 +834,13 @@
|
||||
var context = options.element;
|
||||
context.innerHTML = globalize.translateDocument(template, 'sharedcomponents');
|
||||
|
||||
if (layoutManager.desktop) {
|
||||
var visibleGuideScrollers = context.querySelectorAll('.guideScroller');
|
||||
for (var i = 0, length = visibleGuideScrollers.length; i < length; i++) {
|
||||
visibleGuideScrollers[i].classList.add('visibleGuideScroller');
|
||||
}
|
||||
}
|
||||
|
||||
var programGrid = context.querySelector('.programGrid');
|
||||
var timeslotHeaders = context.querySelector('.timeslotHeaders');
|
||||
|
||||
|
@ -17,13 +17,13 @@
|
||||
<div class="tvGuideHeader">
|
||||
<div class="channelTimeslotHeader">
|
||||
</div>
|
||||
<div class="timeslotHeaders smoothScrollX visibleGuideScroller" style="scroll-behavior: auto;"></div>
|
||||
<div class="timeslotHeaders smoothScrollX guideScroller" style="scroll-behavior: auto;"></div>
|
||||
</div>
|
||||
|
||||
<div class="smoothScrollY guideVerticalScroller programContainer visibleGuideScroller" style="flex-grow: 1;">
|
||||
<div class="smoothScrollY guideVerticalScroller programContainer guideScroller" style="flex-grow: 1;">
|
||||
<div class="channelList"></div>
|
||||
|
||||
<div class="programGridContainer programGrid smoothScrollX visibleGuideScroller" style="white-space: nowrap;">
|
||||
<div class="programGridContainer programGrid smoothScrollX guideScroller" style="white-space: nowrap;">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -32,14 +32,14 @@
|
||||
"web-component-tester": "^4.0.0",
|
||||
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
|
||||
},
|
||||
"homepage": "https://github.com/PolymerElements/iron-icon",
|
||||
"homepage": "https://github.com/polymerelements/iron-icon",
|
||||
"_release": "1.0.10",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "v1.0.10",
|
||||
"commit": "f4e146da4982ff96bb25db85290c09e8de4ec734"
|
||||
},
|
||||
"_source": "git://github.com/PolymerElements/iron-icon.git",
|
||||
"_source": "git://github.com/polymerelements/iron-icon.git",
|
||||
"_target": "^1.0.0",
|
||||
"_originalSource": "PolymerElements/iron-icon"
|
||||
"_originalSource": "polymerelements/iron-icon"
|
||||
}
|
@ -40,6 +40,6 @@
|
||||
"commit": "1f197d9d7874b1e5808b2a5c26f34446a7d912fc"
|
||||
},
|
||||
"_source": "git://github.com/Polymer/polymer.git",
|
||||
"_target": "^1.1.0",
|
||||
"_target": "^1.2.0",
|
||||
"_originalSource": "Polymer/polymer"
|
||||
}
|
@ -55,10 +55,6 @@
|
||||
$('.autoUpdatesContainer', page).addClass('hide');
|
||||
}
|
||||
|
||||
$('#chkEnableDashboardResponseCache', page).checked(config.EnableDashboardResponseCaching);
|
||||
$('#chkEnableMinification', page).checked(config.EnableDashboardResourceMinification);
|
||||
$('#txtDashboardSourcePath', page).val(config.DashboardSourcePath).trigger('change');
|
||||
|
||||
Dashboard.hideLoadingMsg();
|
||||
}
|
||||
|
||||
@ -87,10 +83,6 @@
|
||||
config.EnableAutomaticRestart = $('#chkEnableAutomaticRestart', form).checked();
|
||||
config.EnableAutoUpdate = $('#chkEnableAutomaticServerUpdates', form).checked();
|
||||
|
||||
config.EnableDashboardResourceMinification = $('#chkEnableMinification', form).checked();
|
||||
config.EnableDashboardResponseCaching = $('#chkEnableDashboardResponseCache', form).checked();
|
||||
config.DashboardSourcePath = $('#txtDashboardSourcePath', form).val();
|
||||
|
||||
ApiClient.updateServerConfiguration(config).then(function () {
|
||||
|
||||
ApiClient.getNamedConfiguration(brandingConfigKey).then(function (brandingConfig) {
|
||||
@ -141,25 +133,6 @@
|
||||
});
|
||||
});
|
||||
|
||||
$('#btnSelectDashboardSourcePath', view).on("click.selectDirectory", function () {
|
||||
|
||||
require(['directorybrowser'], function (directoryBrowser) {
|
||||
|
||||
var picker = new directoryBrowser();
|
||||
|
||||
picker.show({
|
||||
|
||||
callback: function (path) {
|
||||
|
||||
if (path) {
|
||||
view.querySelector('#txtDashboardSourcePath').value = path;
|
||||
}
|
||||
picker.close();
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
$('.dashboardGeneralForm', view).off('submit', onSubmit).on('submit', onSubmit);
|
||||
|
||||
view.addEventListener('viewshow', function () {
|
||||
|
@ -90,32 +90,6 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div is="emby-collapse" title="${HeaderDeveloperOptions}">
|
||||
<div class="collapseContent">
|
||||
<br />
|
||||
<label class="checkboxContainer">
|
||||
<input is="emby-checkbox" type="checkbox" id="chkEnableDashboardResponseCache" />
|
||||
<span>${OptionEnableWebClientResponseCache}</span>
|
||||
</label>
|
||||
<div class="checkboxContainer checkboxContainer-withDescription">
|
||||
<label>
|
||||
<input is="emby-checkbox" type="checkbox" id="chkEnableMinification" />
|
||||
<span>${OptionEnableWebClientResourceMinification}</span>
|
||||
</label>
|
||||
<div class="fieldDescription checkboxFieldDescription">${OptionDisableForDevelopmentHelp}</div>
|
||||
</div>
|
||||
<div class="inputContainer">
|
||||
<div style="display: flex; align-items: center;">
|
||||
<div style="flex-grow:1;">
|
||||
<input is="emby-input" id="txtDashboardSourcePath" label="${LabelDashboardSourcePath}" autocomplete="off" />
|
||||
</div>
|
||||
<button type="button" is="paper-icon-button-light" id="btnSelectDashboardSourcePath" title="${ButtonSelectDirectory}" class="autoSize"><i class="md-icon">search</i></button>
|
||||
</div>
|
||||
<div class="fieldDescription">${LabelDashboardSourcePathHelp}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<div>
|
||||
<button is="emby-button" type="submit" class="raised submit block"><i class="md-icon">check</i><span>${ButtonSave}</span></button>
|
||||
|
@ -87,7 +87,7 @@
|
||||
</div>
|
||||
<div id="movieRecordings" class="homePageSection hide">
|
||||
<div>
|
||||
<h1 class="listHeader" style="display: inline-block; vertical-align: middle;">${HeaderRecordedMovies}</h1>
|
||||
<h1 class="listHeader" style="display: inline-block; vertical-align: middle;">${TabMovies}</h1>
|
||||
<button is="emby-button" type="button" class="raised more mini" data-type="movies">${ButtonMore}</button>
|
||||
</div>
|
||||
<div is="emby-itemscontainer" class="recordingItems itemsContainer"></div>
|
||||
@ -95,22 +95,35 @@
|
||||
</div>
|
||||
<div id="episodeRecordings" class="homePageSection hide">
|
||||
<div>
|
||||
<h1 class="listHeader" style="display: inline-block; vertical-align: middle;">${HeaderRecordedEpisodes}</h1>
|
||||
<h1 class="listHeader" style="display: inline-block; vertical-align: middle;">${TabSeries}</h1>
|
||||
<button is="emby-button" type="button" class="raised more mini" data-type="episodes">${ButtonMore}</button>
|
||||
</div>
|
||||
<div is="emby-itemscontainer" class="recordingItems itemsContainer"></div>
|
||||
<br />
|
||||
</div>
|
||||
<div id="programRecordings" class="homePageSection hide">
|
||||
<div id="sportsRecordings" class="homePageSection hide">
|
||||
<div>
|
||||
<h1 class="listHeader" style="display: inline-block; vertical-align: middle;">${HeaderRecordedPrograms}</h1>
|
||||
<button is="emby-button" type="button" class="raised more mini" data-type="programs">${ButtonMore}</button>
|
||||
<h1 class="listHeader" style="display: inline-block; vertical-align: middle;">${Sports}</h1>
|
||||
<button is="emby-button" type="button" class="raised more mini" data-type="sports">${ButtonMore}</button>
|
||||
</div>
|
||||
<div is="emby-itemscontainer" class="recordingItems itemsContainer"></div>
|
||||
<br />
|
||||
</div>
|
||||
<div id="kidsRecordings" class="homePageSection hide">
|
||||
<div>
|
||||
<h1 class="listHeader" style="display: inline-block; vertical-align: middle;">${HeaderForKids}</h1>
|
||||
<button is="emby-button" type="button" class="raised more mini" data-type="kids">${ButtonMore}</button>
|
||||
</div>
|
||||
<div is="emby-itemscontainer" class="recordingItems itemsContainer"></div>
|
||||
<br />
|
||||
</div>
|
||||
</div>
|
||||
<div class="pageTabContent ehsContent" id="scheduleTab" data-index="4">
|
||||
<div id="activeRecordings" class="homePageSection hide">
|
||||
<h1 class="listHeader">${HeaderActiveRecordings}</h1>
|
||||
<div class="recordingItems"></div>
|
||||
<br />
|
||||
</div>
|
||||
<div id="upcomingRecordings" class="homePageSection hide">
|
||||
<div class="recordingItems"></div>
|
||||
<br />
|
||||
|
@ -108,19 +108,19 @@
|
||||
if (params.IsMovie == 'true') {
|
||||
query.IsMovie = true;
|
||||
}
|
||||
else if (params.IsMovie == 'true') {
|
||||
else if (params.IsMovie == 'false') {
|
||||
query.IsMovie = false;
|
||||
}
|
||||
if (params.IsSports == 'true') {
|
||||
query.IsSports = true;
|
||||
}
|
||||
else if (params.IsSports == 'true') {
|
||||
else if (params.IsSports == 'false') {
|
||||
query.IsSports = false;
|
||||
}
|
||||
if (params.IsKids == 'true') {
|
||||
query.IsKids = true;
|
||||
}
|
||||
else if (params.IsKids == 'true') {
|
||||
else if (params.IsKids == 'false') {
|
||||
query.IsKids = false;
|
||||
}
|
||||
|
||||
|
@ -53,18 +53,6 @@
|
||||
indexByDate: false
|
||||
});
|
||||
});
|
||||
|
||||
//ApiClient.getLiveTvRecordings({
|
||||
|
||||
// userId: Dashboard.getCurrentUserId(),
|
||||
// IsInProgress: true,
|
||||
// Fields: 'CanDelete'
|
||||
|
||||
//}).then(function (result) {
|
||||
|
||||
// renderRecordings(context.querySelector('#activeRecordings'), result.Items);
|
||||
|
||||
//});
|
||||
}
|
||||
|
||||
function renderLatestRecordings(context) {
|
||||
@ -107,7 +95,7 @@
|
||||
|
||||
function renderEpisodeRecordings(context) {
|
||||
|
||||
ApiClient.getLiveTvRecordings({
|
||||
ApiClient.getLiveTvRecordingSeries({
|
||||
|
||||
UserId: Dashboard.getCurrentUserId(),
|
||||
Limit: enableScrollX() ? 12 : 8,
|
||||
@ -118,11 +106,14 @@
|
||||
|
||||
}).then(function (result) {
|
||||
|
||||
renderRecordings(context.querySelector('#episodeRecordings'), result.Items);
|
||||
renderRecordings(context.querySelector('#episodeRecordings'), result.Items, {
|
||||
showItemCounts: true,
|
||||
showParentTitle: false
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function renderProgramRecordings(context) {
|
||||
function renderSportsRecordings(context) {
|
||||
|
||||
ApiClient.getLiveTvRecordings({
|
||||
|
||||
@ -131,12 +122,31 @@
|
||||
IsInProgress: false,
|
||||
Fields: 'CanDelete,PrimaryImageAspectRatio,BasicSyncInfo',
|
||||
EnableTotalRecordCount: false,
|
||||
IsMovie: false,
|
||||
IsSeries: false
|
||||
IsSports: true
|
||||
|
||||
}).then(function (result) {
|
||||
|
||||
renderRecordings(context.querySelector('#programRecordings'), result.Items, {
|
||||
renderRecordings(context.querySelector('#sportsRecordings'), result.Items, {
|
||||
showYear: true,
|
||||
showParentTitle: false
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function renderKidsRecordings(context) {
|
||||
|
||||
ApiClient.getLiveTvRecordings({
|
||||
|
||||
UserId: Dashboard.getCurrentUserId(),
|
||||
Limit: enableScrollX() ? 12 : 8,
|
||||
IsInProgress: false,
|
||||
Fields: 'CanDelete,PrimaryImageAspectRatio,BasicSyncInfo',
|
||||
EnableTotalRecordCount: false,
|
||||
IsKids: true
|
||||
|
||||
}).then(function (result) {
|
||||
|
||||
renderRecordings(context.querySelector('#kidsRecordings'), result.Items, {
|
||||
showYear: true,
|
||||
showParentTitle: false
|
||||
});
|
||||
@ -169,7 +179,8 @@
|
||||
renderLatestRecordings(context);
|
||||
renderMovieRecordings(context);
|
||||
renderEpisodeRecordings(context);
|
||||
renderProgramRecordings(context);
|
||||
renderSportsRecordings(context);
|
||||
renderKidsRecordings(context);
|
||||
}
|
||||
|
||||
function onMoreClick(e) {
|
||||
@ -189,6 +200,12 @@
|
||||
case 'programs':
|
||||
Dashboard.navigate('livetvitems.html?type=Recordings&IsSeries=false&IsMovie=false');
|
||||
break;
|
||||
case 'kids':
|
||||
Dashboard.navigate('livetvitems.html?type=Recordings&IsKids=true');
|
||||
break;
|
||||
case 'sports':
|
||||
Dashboard.navigate('livetvitems.html?type=Recordings&IsSports=true');
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -1,5 +1,24 @@
|
||||
define(['scripts/livetvcomponents', 'emby-button', 'emby-itemscontainer'], function () {
|
||||
|
||||
function renderActiveRecordings(context) {
|
||||
|
||||
ApiClient.getLiveTvTimers({
|
||||
|
||||
IsActive: true
|
||||
|
||||
}).then(function (result) {
|
||||
|
||||
// The IsActive param is new, so handle older servers that don't support it
|
||||
if (result.Items.length && result.Items[0].Status != 'InProgress') {
|
||||
result.Items = [];
|
||||
}
|
||||
|
||||
renderTimers(context.querySelector('#activeRecordings'), result.Items, {
|
||||
indexByDate: false
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function renderTimers(context, timers, options) {
|
||||
|
||||
LiveTvHelpers.getTimersHtml(timers, options).then(function (html) {
|
||||
@ -33,6 +52,7 @@
|
||||
|
||||
Dashboard.showLoadingMsg();
|
||||
|
||||
renderActiveRecordings(context);
|
||||
renderUpcomingRecordings(context);
|
||||
}
|
||||
|
||||
|
@ -2133,6 +2133,6 @@
|
||||
"H264EncodingPresetHelp": "Choose a faster value to improve performance, or a slower value to improve quality.",
|
||||
"LabelH264Crf": "H264 encoding CRF:",
|
||||
"H264CrfHelp": "The Constant Rate Factor (CRF) is the default quality setting for the x264 encoder. You can set the values between 0 and 51, where lower values would result in better quality (at the expense of higher file sizes). Sane values are between 18 and 28. The default for x264 is 23, so you can use this as a starting point.",
|
||||
"HeaderRecordedMovies": "Recorded Movies",
|
||||
"HeaderRecordedEpisodes": "Recorded Episodes"
|
||||
"Sports": "Sports",
|
||||
"HeaderForKids": "For Kids"
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user