1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

Add trickplay functionality

This commit is contained in:
Nick 2024-02-11 20:34:30 -08:00
parent 675a59adc4
commit 8045b95d93
16 changed files with 335 additions and 8 deletions

View file

@ -391,8 +391,10 @@ export function setContentType(parent, contentType) {
}
if (contentType !== 'tvshows' && contentType !== 'movies' && contentType !== 'homevideos' && contentType !== 'musicvideos' && contentType !== 'mixed') {
parent.querySelector('.trickplaySettingsSection').classList.add('hide');
parent.querySelector('.chapterSettingsSection').classList.add('hide');
} else {
parent.querySelector('.trickplaySettingsSection').classList.remove('hide');
parent.querySelector('.chapterSettingsSection').classList.remove('hide');
}
@ -515,6 +517,8 @@ export function getLibraryOptions(parent) {
EnablePhotos: parent.querySelector('.chkEnablePhotos').checked,
EnableRealtimeMonitor: parent.querySelector('.chkEnableRealtimeMonitor').checked,
EnableLUFSScan: parent.querySelector('.chkEnableLUFSScan').checked,
ExtractTrickplayImagesDuringLibraryScan: parent.querySelector('.chkExtractTrickplayDuringLibraryScan').checked,
EnableTrickplayImageExtraction: parent.querySelector('.chkExtractTrickplayImages').checked,
ExtractChapterImagesDuringLibraryScan: parent.querySelector('.chkExtractChaptersDuringLibraryScan').checked,
EnableChapterImageExtraction: parent.querySelector('.chkExtractChapterImages').checked,
EnableInternetProviders: true,
@ -577,6 +581,8 @@ export function setLibraryOptions(parent, options) {
parent.querySelector('.chkEnablePhotos').checked = options.EnablePhotos;
parent.querySelector('.chkEnableRealtimeMonitor').checked = options.EnableRealtimeMonitor;
parent.querySelector('.chkEnableLUFSScan').checked = options.EnableLUFSScan;
parent.querySelector('.chkExtractTrickplayDuringLibraryScan').checked = options.ExtractTrickplayImagesDuringLibraryScan;
parent.querySelector('.chkExtractTrickplayImages').checked = options.EnableTrickplayImageExtraction;
parent.querySelector('.chkExtractChaptersDuringLibraryScan').checked = options.ExtractChapterImagesDuringLibraryScan;
parent.querySelector('.chkExtractChapterImages').checked = options.EnableChapterImageExtraction;
parent.querySelector('#chkSaveLocal').checked = options.SaveLocalMetadata;

View file

@ -104,6 +104,25 @@
<div class="fieldDescription checkboxFieldDescription">${OptionAutomaticallyGroupSeriesHelp}</div>
</div>
<div class="trickplaySettingsSection hide">
<h2>${Trickplay}</h2>
<div class="checkboxContainer checkboxContainer-withDescription fldExtractTrickplayImages">
<label>
<input type="checkbox" is="emby-checkbox" class="chkExtractTrickplayImages" />
<span>${OptionExtractTrickplayImage}</span>
</label>
<div class="fieldDescription checkboxFieldDescription">${ExtractTrickplayImagesHelp}</div>
</div>
<div class="checkboxContainer checkboxContainer-withDescription fldExtractTrickplayDuringLibraryScan advanced">
<label>
<input type="checkbox" is="emby-checkbox" class="chkExtractTrickplayDuringLibraryScan" />
<span>${LabelExtractTrickplayDuringLibraryScan}</span>
</label>
<div class="fieldDescription checkboxFieldDescription">${LabelExtractTrickplayDuringLibraryScanHelp}</div>
</div>
</div>
<div class="chapterSettingsSection hide">
<h2>${HeaderChapterImages}</h2>
<div class="checkboxContainer checkboxContainer-withDescription fldExtractChapterImages">

View file

@ -125,7 +125,7 @@ function getItemsForPlayback(serverId, query) {
} else {
query.Limit = query.Limit || 300;
}
query.Fields = 'Chapters';
query.Fields = ['Chapters', 'Trickplay'];
query.ExcludeLocationTypes = 'Virtual';
query.EnableTotalRecordCount = false;
query.CollapseBoxSetItems = false;
@ -1858,7 +1858,7 @@ class PlaybackManager {
IsVirtualUnaired: false,
IsMissing: false,
UserId: apiClient.getCurrentUserId(),
Fields: 'Chapters'
Fields: ['Chapters', 'Trickplay']
}).then(function (episodesResult) {
const originalResults = episodesResult.Items;
const isSeries = firstItem.Type === 'Series';
@ -1940,7 +1940,7 @@ class PlaybackManager {
IsVirtualUnaired: false,
IsMissing: false,
UserId: apiClient.getCurrentUserId(),
Fields: 'Chapters'
Fields: ['Chapters', 'Trickplay']
}).then(function (episodesResult) {
let foundItem = false;
episodesResult.Items = episodesResult.Items.filter(function (e) {