mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Display MediaSourceCount for all media Types
All items support alternate local versions, even if it's not documented. Tested with episode and musicVideo types. Added MSC to list items as well.
This commit is contained in:
parent
16b777bfd1
commit
17f44e3fac
5 changed files with 11 additions and 5 deletions
|
@ -607,7 +607,7 @@ import ServerConnections from '../ServerConnections';
|
|||
oldestDateForNextUp.setDate(oldestDateForNextUp.getDate() - userSettings.maxDaysForNextUp());
|
||||
return apiClient.getNextUpEpisodes({
|
||||
Limit: enableScrollX() ? 24 : 15,
|
||||
Fields: 'PrimaryImageAspectRatio,DateCreated,BasicSyncInfo,Path',
|
||||
Fields: 'PrimaryImageAspectRatio,DateCreated,BasicSyncInfo,Path,MediaSourceCount',
|
||||
UserId: apiClient.getCurrentUserId(),
|
||||
ImageTypeLimit: 1,
|
||||
EnableImageTypes: 'Primary,Backdrop,Banner,Thumb',
|
||||
|
|
|
@ -282,6 +282,11 @@ import ServerConnections from '../ServerConnections';
|
|||
html += '<div class="' + imageClass + ' cardImageContainer ' + cardBuilder.getDefaultBackgroundClass(item.Name) + '">' + cardBuilder.getDefaultText(item, options);
|
||||
}
|
||||
|
||||
const mediaSourceCount = item.MediaSourceCount || 1;
|
||||
if (mediaSourceCount > 1 && options.disableIndicators !== true) {
|
||||
html += '<div class="mediaSourceIndicator">' + mediaSourceCount + '</div>';
|
||||
}
|
||||
|
||||
let indicatorsHtml = '';
|
||||
indicatorsHtml += indicators.getPlayedIndicatorHtml(item);
|
||||
|
||||
|
|
|
@ -864,7 +864,8 @@ function renderNextUp(page, item, user) {
|
|||
|
||||
ServerConnections.getApiClient(item.ServerId).getNextUpEpisodes({
|
||||
SeriesId: item.Id,
|
||||
UserId: user.Id
|
||||
UserId: user.Id,
|
||||
Fields: 'MediaSourceCount',
|
||||
}).then(function (result) {
|
||||
if (result.Items.length) {
|
||||
section.classList.remove('hide');
|
||||
|
|
|
@ -251,7 +251,7 @@ import { appRouter } from '../components/appRouter';
|
|||
if (params.type === 'nextup') {
|
||||
return apiClient.getNextUpEpisodes(modifyQueryWithFilters(instance, {
|
||||
Limit: limit,
|
||||
Fields: 'PrimaryImageAspectRatio,DateCreated,BasicSyncInfo',
|
||||
Fields: 'PrimaryImageAspectRatio,DateCreated,BasicSyncInfo,MediaSourceCount',
|
||||
UserId: apiClient.getCurrentUserId(),
|
||||
ImageTypeLimit: 1,
|
||||
EnableImageTypes: 'Primary,Backdrop,Thumb',
|
||||
|
@ -320,7 +320,7 @@ import { appRouter } from '../components/appRouter';
|
|||
return apiClient.getItems(apiClient.getCurrentUserId(), modifyQueryWithFilters(instance, {
|
||||
StartIndex: startIndex,
|
||||
Limit: limit,
|
||||
Fields: 'PrimaryImageAspectRatio,SortName,Path,SongCount,ChildCount',
|
||||
Fields: 'PrimaryImageAspectRatio,SortName,Path,SongCount,ChildCount,MediaSourceCount',
|
||||
ImageTypeLimit: 1,
|
||||
ParentId: item.Id,
|
||||
SortBy: sortBy
|
||||
|
|
|
@ -178,7 +178,7 @@ import autoFocuser from '../../components/autoFocuser';
|
|||
const query = {
|
||||
userId: userId,
|
||||
Limit: 24,
|
||||
Fields: 'PrimaryImageAspectRatio,DateCreated,BasicSyncInfo',
|
||||
Fields: 'PrimaryImageAspectRatio,DateCreated,BasicSyncInfo,MediaSourceCount',
|
||||
ParentId: parentId,
|
||||
ImageTypeLimit: 1,
|
||||
EnableImageTypes: 'Primary,Backdrop,Thumb',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue