mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Merge pull request #3473 from thornbill/next-up-rewatching
This commit is contained in:
commit
9a8c1a0c21
8 changed files with 39 additions and 39 deletions
|
@ -757,13 +757,7 @@ class AppRouter {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (item === 'nextup') {
|
if (item === 'nextup') {
|
||||||
url = '#!/list.html?type=nextup&serverId=' + options.serverId;
|
return '#!/list.html?type=nextup&serverId=' + options.serverId;
|
||||||
|
|
||||||
if (options.rewatching) {
|
|
||||||
url += '&rewatching=' + options.rewatching;
|
|
||||||
}
|
|
||||||
|
|
||||||
return url;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (item === 'list') {
|
if (item === 'list') {
|
||||||
|
|
|
@ -113,7 +113,6 @@ import template from './displaySettings.template.html';
|
||||||
context.querySelector('#chkBlurhash').checked = userSettings.enableBlurhash();
|
context.querySelector('#chkBlurhash').checked = userSettings.enableBlurhash();
|
||||||
context.querySelector('#chkBackdrops').checked = userSettings.enableBackdrops();
|
context.querySelector('#chkBackdrops').checked = userSettings.enableBackdrops();
|
||||||
context.querySelector('#chkDetailsBanner').checked = userSettings.detailsBanner();
|
context.querySelector('#chkDetailsBanner').checked = userSettings.detailsBanner();
|
||||||
context.querySelector('#chkUseEpisodeImagesInNextUp').checked = userSettings.useEpisodeImagesInNextUpAndResume();
|
|
||||||
|
|
||||||
context.querySelector('#chkDisableCustomCss').checked = userSettings.disableCustomCss();
|
context.querySelector('#chkDisableCustomCss').checked = userSettings.disableCustomCss();
|
||||||
context.querySelector('#txtLocalCustomCss').value = userSettings.customCss();
|
context.querySelector('#txtLocalCustomCss').value = userSettings.customCss();
|
||||||
|
@ -122,7 +121,10 @@ import template from './displaySettings.template.html';
|
||||||
context.querySelector('.selectDateTimeLocale').value = userSettings.dateTimeLocale() || '';
|
context.querySelector('.selectDateTimeLocale').value = userSettings.dateTimeLocale() || '';
|
||||||
|
|
||||||
context.querySelector('#txtLibraryPageSize').value = userSettings.libraryPageSize();
|
context.querySelector('#txtLibraryPageSize').value = userSettings.libraryPageSize();
|
||||||
|
|
||||||
context.querySelector('#txtMaxDaysForNextUp').value = userSettings.maxDaysForNextUp();
|
context.querySelector('#txtMaxDaysForNextUp').value = userSettings.maxDaysForNextUp();
|
||||||
|
context.querySelector('#chkRewatchingNextUp').checked = userSettings.enableRewatchingInNextUp();
|
||||||
|
context.querySelector('#chkUseEpisodeImagesInNextUp').checked = userSettings.useEpisodeImagesInNextUpAndResume();
|
||||||
|
|
||||||
context.querySelector('.selectLayout').value = layoutManager.getSavedLayout() || '';
|
context.querySelector('.selectLayout').value = layoutManager.getSavedLayout() || '';
|
||||||
|
|
||||||
|
@ -147,13 +149,15 @@ import template from './displaySettings.template.html';
|
||||||
userSettingsInstance.screensaver(context.querySelector('.selectScreensaver').value);
|
userSettingsInstance.screensaver(context.querySelector('.selectScreensaver').value);
|
||||||
|
|
||||||
userSettingsInstance.libraryPageSize(context.querySelector('#txtLibraryPageSize').value);
|
userSettingsInstance.libraryPageSize(context.querySelector('#txtLibraryPageSize').value);
|
||||||
|
|
||||||
userSettingsInstance.maxDaysForNextUp(context.querySelector('#txtMaxDaysForNextUp').value);
|
userSettingsInstance.maxDaysForNextUp(context.querySelector('#txtMaxDaysForNextUp').value);
|
||||||
|
userSettingsInstance.enableRewatchingInNextUp(context.querySelector('#chkRewatchingNextUp').checked);
|
||||||
|
userSettingsInstance.useEpisodeImagesInNextUpAndResume(context.querySelector('#chkUseEpisodeImagesInNextUp').checked);
|
||||||
|
|
||||||
userSettingsInstance.enableFastFadein(context.querySelector('#chkFadein').checked);
|
userSettingsInstance.enableFastFadein(context.querySelector('#chkFadein').checked);
|
||||||
userSettingsInstance.enableBlurhash(context.querySelector('#chkBlurhash').checked);
|
userSettingsInstance.enableBlurhash(context.querySelector('#chkBlurhash').checked);
|
||||||
userSettingsInstance.enableBackdrops(context.querySelector('#chkBackdrops').checked);
|
userSettingsInstance.enableBackdrops(context.querySelector('#chkBackdrops').checked);
|
||||||
userSettingsInstance.detailsBanner(context.querySelector('#chkDetailsBanner').checked);
|
userSettingsInstance.detailsBanner(context.querySelector('#chkDetailsBanner').checked);
|
||||||
userSettingsInstance.useEpisodeImagesInNextUpAndResume(context.querySelector('#chkUseEpisodeImagesInNextUp').checked);
|
|
||||||
|
|
||||||
userSettingsInstance.disableCustomCss(context.querySelector('#chkDisableCustomCss').checked);
|
userSettingsInstance.disableCustomCss(context.querySelector('#chkDisableCustomCss').checked);
|
||||||
userSettingsInstance.customCss(context.querySelector('#txtLocalCustomCss').value);
|
userSettingsInstance.customCss(context.querySelector('#txtLocalCustomCss').value);
|
||||||
|
|
|
@ -207,6 +207,14 @@
|
||||||
<div class="fieldDescription">${LabelMaxDaysForNextUpHelp}</div>
|
<div class="fieldDescription">${LabelMaxDaysForNextUpHelp}</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="checkboxContainer checkboxContainer-withDescription">
|
||||||
|
<label>
|
||||||
|
<input type="checkbox" is="emby-checkbox" id="chkRewatchingNextUp" />
|
||||||
|
<span>${EnableRewatchingNextUp}</span>
|
||||||
|
</label>
|
||||||
|
<div class="fieldDescription checkboxFieldDescription">${EnableRewatchingNextUpHelp}</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="checkboxContainer checkboxContainer-withDescription">
|
<div class="checkboxContainer checkboxContainer-withDescription">
|
||||||
<label>
|
<label>
|
||||||
<input type="checkbox" is="emby-checkbox" id="chkFadein" />
|
<input type="checkbox" is="emby-checkbox" id="chkFadein" />
|
||||||
|
|
|
@ -27,7 +27,6 @@
|
||||||
<option value="resumebook">${HeaderContinueReading}</option>
|
<option value="resumebook">${HeaderContinueReading}</option>
|
||||||
<option value="latestmedia">${HeaderLatestMedia}</option>
|
<option value="latestmedia">${HeaderLatestMedia}</option>
|
||||||
<option value="nextup">${NextUp}</option>
|
<option value="nextup">${NextUp}</option>
|
||||||
<option value="rewatching">${NextUpRewatching}</option>
|
|
||||||
<option value="livetv">${LiveTV}</option>
|
<option value="livetv">${LiveTV}</option>
|
||||||
<option value="none">${None}</option>
|
<option value="none">${None}</option>
|
||||||
</select>
|
</select>
|
||||||
|
@ -42,7 +41,6 @@
|
||||||
<option value="resumebook">${HeaderContinueReading}</option>
|
<option value="resumebook">${HeaderContinueReading}</option>
|
||||||
<option value="latestmedia">${HeaderLatestMedia}</option>
|
<option value="latestmedia">${HeaderLatestMedia}</option>
|
||||||
<option value="nextup">${NextUp}</option>
|
<option value="nextup">${NextUp}</option>
|
||||||
<option value="rewatching">${NextUpRewatching}</option>
|
|
||||||
<option value="livetv">${LiveTV}</option>
|
<option value="livetv">${LiveTV}</option>
|
||||||
<option value="none">${None}</option>
|
<option value="none">${None}</option>
|
||||||
</select>
|
</select>
|
||||||
|
@ -57,7 +55,6 @@
|
||||||
<option value="resumebook">${HeaderContinueReading}</option>
|
<option value="resumebook">${HeaderContinueReading}</option>
|
||||||
<option value="latestmedia">${HeaderLatestMedia}</option>
|
<option value="latestmedia">${HeaderLatestMedia}</option>
|
||||||
<option value="nextup">${NextUp}</option>
|
<option value="nextup">${NextUp}</option>
|
||||||
<option value="rewatching">${NextUpRewatching}</option>
|
|
||||||
<option value="livetv">${LiveTV}</option>
|
<option value="livetv">${LiveTV}</option>
|
||||||
<option value="none">${None}</option>
|
<option value="none">${None}</option>
|
||||||
</select>
|
</select>
|
||||||
|
@ -72,7 +69,6 @@
|
||||||
<option value="resumebook">${HeaderContinueReading}</option>
|
<option value="resumebook">${HeaderContinueReading}</option>
|
||||||
<option value="latestmedia">${HeaderLatestMedia}</option>
|
<option value="latestmedia">${HeaderLatestMedia}</option>
|
||||||
<option value="nextup">${NextUp}</option>
|
<option value="nextup">${NextUp}</option>
|
||||||
<option value="rewatching">${NextUpRewatching}</option>
|
|
||||||
<option value="livetv">${LiveTV}</option>
|
<option value="livetv">${LiveTV}</option>
|
||||||
<option value="none">${None}</option>
|
<option value="none">${None}</option>
|
||||||
</select>
|
</select>
|
||||||
|
@ -87,7 +83,6 @@
|
||||||
<option value="resumebook">${HeaderContinueReading}</option>
|
<option value="resumebook">${HeaderContinueReading}</option>
|
||||||
<option value="latestmedia">${HeaderLatestMedia}</option>
|
<option value="latestmedia">${HeaderLatestMedia}</option>
|
||||||
<option value="nextup">${NextUp}</option>
|
<option value="nextup">${NextUp}</option>
|
||||||
<option value="rewatching">${NextUpRewatching}</option>
|
|
||||||
<option value="livetv">${LiveTV}</option>
|
<option value="livetv">${LiveTV}</option>
|
||||||
<option value="none">${None}</option>
|
<option value="none">${None}</option>
|
||||||
</select>
|
</select>
|
||||||
|
@ -102,7 +97,6 @@
|
||||||
<option value="resumebook">${HeaderContinueReading}</option>
|
<option value="resumebook">${HeaderContinueReading}</option>
|
||||||
<option value="latestmedia">${HeaderLatestMedia}</option>
|
<option value="latestmedia">${HeaderLatestMedia}</option>
|
||||||
<option value="nextup">${NextUp}</option>
|
<option value="nextup">${NextUp}</option>
|
||||||
<option value="rewatching">${NextUpRewatching}</option>
|
|
||||||
<option value="livetv">${LiveTV}</option>
|
<option value="livetv">${LiveTV}</option>
|
||||||
<option value="none">${None}</option>
|
<option value="none">${None}</option>
|
||||||
</select>
|
</select>
|
||||||
|
@ -117,7 +111,6 @@
|
||||||
<option value="resumebook">${HeaderContinueReading}</option>
|
<option value="resumebook">${HeaderContinueReading}</option>
|
||||||
<option value="latestmedia">${HeaderLatestMedia}</option>
|
<option value="latestmedia">${HeaderLatestMedia}</option>
|
||||||
<option value="nextup">${NextUp}</option>
|
<option value="nextup">${NextUp}</option>
|
||||||
<option value="rewatching">${NextUpRewatching}</option>
|
|
||||||
<option value="livetv">${LiveTV}</option>
|
<option value="livetv">${LiveTV}</option>
|
||||||
<option value="none">${None}</option>
|
<option value="none">${None}</option>
|
||||||
</select>
|
</select>
|
||||||
|
|
|
@ -147,8 +147,6 @@ import ServerConnections from '../ServerConnections';
|
||||||
loadLatestLiveTvRecordings(elem, true, apiClient);
|
loadLatestLiveTvRecordings(elem, true, apiClient);
|
||||||
} else if (section === 'nextup') {
|
} else if (section === 'nextup') {
|
||||||
loadNextUp(elem, apiClient, userSettings);
|
loadNextUp(elem, apiClient, userSettings);
|
||||||
} else if (section === 'rewatching') {
|
|
||||||
loadNextUp(elem, apiClient, userSettings, true);
|
|
||||||
} else if (section === 'onnow' || section === 'livetv') {
|
} else if (section === 'onnow' || section === 'livetv') {
|
||||||
return loadOnNow(elem, apiClient, user);
|
return loadOnNow(elem, apiClient, user);
|
||||||
} else if (section === 'resumebook') {
|
} else if (section === 'resumebook') {
|
||||||
|
@ -598,7 +596,7 @@ import ServerConnections from '../ServerConnections';
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function getNextUpFetchFn(serverId, userSettings, rewatching) {
|
function getNextUpFetchFn(serverId, userSettings) {
|
||||||
return function () {
|
return function () {
|
||||||
const apiClient = ServerConnections.getApiClient(serverId);
|
const apiClient = ServerConnections.getApiClient(serverId);
|
||||||
const oldestDateForNextUp = new Date();
|
const oldestDateForNextUp = new Date();
|
||||||
|
@ -612,7 +610,7 @@ import ServerConnections from '../ServerConnections';
|
||||||
EnableTotalRecordCount: false,
|
EnableTotalRecordCount: false,
|
||||||
DisableFirstEpisode: false,
|
DisableFirstEpisode: false,
|
||||||
NextUpDateCutoff: oldestDateForNextUp.toISOString(),
|
NextUpDateCutoff: oldestDateForNextUp.toISOString(),
|
||||||
Rewatching: rewatching
|
EnableRewatching: userSettings.enableRewatchingInNextUp()
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -638,31 +636,22 @@ import ServerConnections from '../ServerConnections';
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
function loadNextUp(elem, apiClient, userSettings, rewatching = false) {
|
function loadNextUp(elem, apiClient, userSettings) {
|
||||||
let html = '';
|
let html = '';
|
||||||
|
|
||||||
html += '<div class="sectionTitleContainer sectionTitleContainer-cards padded-left">';
|
html += '<div class="sectionTitleContainer sectionTitleContainer-cards padded-left">';
|
||||||
if (!layoutManager.tv) {
|
if (!layoutManager.tv) {
|
||||||
html += '<a is="emby-linkbutton" href="' + appRouter.getRouteUrl('nextup', {
|
html += '<a is="emby-linkbutton" href="' + appRouter.getRouteUrl('nextup', {
|
||||||
serverId: apiClient.serverId(),
|
serverId: apiClient.serverId()
|
||||||
rewatching: rewatching
|
|
||||||
}) + '" class="button-flat button-flat-mini sectionTitleTextButton">';
|
}) + '" class="button-flat button-flat-mini sectionTitleTextButton">';
|
||||||
html += '<h2 class="sectionTitle sectionTitle-cards">';
|
html += '<h2 class="sectionTitle sectionTitle-cards">';
|
||||||
if (rewatching) {
|
html += globalize.translate('NextUp');
|
||||||
html += globalize.translate('NextUpRewatching');
|
|
||||||
} else {
|
|
||||||
html += globalize.translate('NextUp');
|
|
||||||
}
|
|
||||||
html += '</h2>';
|
html += '</h2>';
|
||||||
html += '<span class="material-icons chevron_right" aria-hidden="true"></span>';
|
html += '<span class="material-icons chevron_right" aria-hidden="true"></span>';
|
||||||
html += '</a>';
|
html += '</a>';
|
||||||
} else {
|
} else {
|
||||||
html += '<h2 class="sectionTitle sectionTitle-cards">';
|
html += '<h2 class="sectionTitle sectionTitle-cards">';
|
||||||
if (rewatching) {
|
html += globalize.translate('NextUp');
|
||||||
html += globalize.translate('NextUpRewatching');
|
|
||||||
} else {
|
|
||||||
html += globalize.translate('NextUp');
|
|
||||||
}
|
|
||||||
html += '</h2>';
|
html += '</h2>';
|
||||||
}
|
}
|
||||||
html += '</div>';
|
html += '</div>';
|
||||||
|
@ -683,7 +672,7 @@ import ServerConnections from '../ServerConnections';
|
||||||
elem.innerHTML = html;
|
elem.innerHTML = html;
|
||||||
|
|
||||||
const itemsContainer = elem.querySelector('.itemsContainer');
|
const itemsContainer = elem.querySelector('.itemsContainer');
|
||||||
itemsContainer.fetchData = getNextUpFetchFn(apiClient.serverId(), userSettings, rewatching);
|
itemsContainer.fetchData = getNextUpFetchFn(apiClient.serverId(), userSettings);
|
||||||
itemsContainer.getItemsHtml = getNextUpItemsHtmlFn(userSettings.useEpisodeImagesInNextUpAndResume());
|
itemsContainer.getItemsHtml = getNextUpItemsHtmlFn(userSettings.useEpisodeImagesInNextUpAndResume());
|
||||||
itemsContainer.parentContainer = elem;
|
itemsContainer.parentContainer = elem;
|
||||||
}
|
}
|
||||||
|
|
|
@ -260,7 +260,7 @@ import { appRouter } from '../components/appRouter';
|
||||||
EnableImageTypes: 'Primary,Backdrop,Thumb',
|
EnableImageTypes: 'Primary,Backdrop,Thumb',
|
||||||
EnableTotalRecordCount: false,
|
EnableTotalRecordCount: false,
|
||||||
SortBy: sortBy,
|
SortBy: sortBy,
|
||||||
Rewatching: params.rewatching
|
EnableRewatching: userSettings.enableRewatchingInNextUp()
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -678,9 +678,6 @@ class ItemsView {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (params.type === 'nextup') {
|
if (params.type === 'nextup') {
|
||||||
if (params.rewatching === 'true') {
|
|
||||||
return globalize.translate('NextUpRewatching');
|
|
||||||
}
|
|
||||||
return globalize.translate('NextUp');
|
return globalize.translate('NextUp');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -458,6 +458,19 @@ export class UserSettings {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get or set rewatching in next up.
|
||||||
|
* @param {boolean|undefined} val - If rewatching items should be included in next up.
|
||||||
|
* @returns {boolean} Rewatching in next up state.
|
||||||
|
*/
|
||||||
|
enableRewatchingInNextUp(val) {
|
||||||
|
if (val !== undefined) {
|
||||||
|
return this.set('enableRewatchingInNextUp', val, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
return this.get('enableRewatchingInNextUp', false);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get or set sound effects.
|
* Get or set sound effects.
|
||||||
* @param {string|undefined} val - Sound effects.
|
* @param {string|undefined} val - Sound effects.
|
||||||
|
@ -576,6 +589,7 @@ export const theme = currentSettings.theme.bind(currentSettings);
|
||||||
export const screensaver = currentSettings.screensaver.bind(currentSettings);
|
export const screensaver = currentSettings.screensaver.bind(currentSettings);
|
||||||
export const libraryPageSize = currentSettings.libraryPageSize.bind(currentSettings);
|
export const libraryPageSize = currentSettings.libraryPageSize.bind(currentSettings);
|
||||||
export const maxDaysForNextUp = currentSettings.maxDaysForNextUp.bind(currentSettings);
|
export const maxDaysForNextUp = currentSettings.maxDaysForNextUp.bind(currentSettings);
|
||||||
|
export const enableRewatchingInNextUp = currentSettings.enableRewatchingInNextUp.bind(currentSettings);
|
||||||
export const soundEffects = currentSettings.soundEffects.bind(currentSettings);
|
export const soundEffects = currentSettings.soundEffects.bind(currentSettings);
|
||||||
export const loadQuerySettings = currentSettings.loadQuerySettings.bind(currentSettings);
|
export const loadQuerySettings = currentSettings.loadQuerySettings.bind(currentSettings);
|
||||||
export const saveQuerySettings = currentSettings.saveQuerySettings.bind(currentSettings);
|
export const saveQuerySettings = currentSettings.saveQuerySettings.bind(currentSettings);
|
||||||
|
|
|
@ -235,6 +235,8 @@
|
||||||
"EnableNextVideoInfoOverlayHelp": "At the end of a video, display info about the next video coming up in the current playlist.",
|
"EnableNextVideoInfoOverlayHelp": "At the end of a video, display info about the next video coming up in the current playlist.",
|
||||||
"EnablePhotos": "Display the photos",
|
"EnablePhotos": "Display the photos",
|
||||||
"EnablePhotosHelp": "Images will be detected and displayed alongside other media files.",
|
"EnablePhotosHelp": "Images will be detected and displayed alongside other media files.",
|
||||||
|
"EnableRewatchingNextUp": "Enable Rewatching in Next Up",
|
||||||
|
"EnableRewatchingNextUpHelp": "Enable showing already watched episodes in 'Next Up' sections.",
|
||||||
"EnableQuickConnect": "Enable Quick Connect on this server",
|
"EnableQuickConnect": "Enable Quick Connect on this server",
|
||||||
"EnableStreamLooping": "Auto-loop live streams",
|
"EnableStreamLooping": "Auto-loop live streams",
|
||||||
"EnableStreamLoopingHelp": "Enable this if live streams only contain a few seconds of data and need to be continuously requested. Enabling this when not needed may cause problems.",
|
"EnableStreamLoopingHelp": "Enable this if live streams only contain a few seconds of data and need to be continuously requested. Enabling this when not needed may cause problems.",
|
||||||
|
@ -1135,7 +1137,6 @@
|
||||||
"NextChapter": "Next chapter",
|
"NextChapter": "Next chapter",
|
||||||
"NextTrack": "Skip to next",
|
"NextTrack": "Skip to next",
|
||||||
"NextUp": "Next Up",
|
"NextUp": "Next Up",
|
||||||
"NextUpRewatching": "Rewatching",
|
|
||||||
"No": "No",
|
"No": "No",
|
||||||
"NoCreatedLibraries": "Seems like you haven't created any libraries yet. {0}Would you like to create one now?{1}",
|
"NoCreatedLibraries": "Seems like you haven't created any libraries yet. {0}Would you like to create one now?{1}",
|
||||||
"None": "None",
|
"None": "None",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue