mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-18 19:38:20 -07:00
Add item path to card data to support canPlay check
This commit is contained in:
parent
827a065de0
commit
042c0248a0
@ -1418,6 +1418,7 @@ import ServerConnections from '../ServerConnections';
|
|||||||
const mediaTypeData = item.MediaType ? (' data-mediatype="' + item.MediaType + '"') : '';
|
const mediaTypeData = item.MediaType ? (' data-mediatype="' + item.MediaType + '"') : '';
|
||||||
const collectionTypeData = item.CollectionType ? (' data-collectiontype="' + item.CollectionType + '"') : '';
|
const collectionTypeData = item.CollectionType ? (' data-collectiontype="' + item.CollectionType + '"') : '';
|
||||||
const channelIdData = item.ChannelId ? (' data-channelid="' + item.ChannelId + '"') : '';
|
const channelIdData = item.ChannelId ? (' data-channelid="' + item.ChannelId + '"') : '';
|
||||||
|
const pathData = item.Path ? (' data-path="' + item.Path + '"') : '';
|
||||||
const contextData = options.context ? (' data-context="' + options.context + '"') : '';
|
const contextData = options.context ? (' data-context="' + options.context + '"') : '';
|
||||||
const parentIdData = options.parentId ? (' data-parentid="' + options.parentId + '"') : '';
|
const parentIdData = options.parentId ? (' data-parentid="' + options.parentId + '"') : '';
|
||||||
|
|
||||||
@ -1427,7 +1428,7 @@ import ServerConnections from '../ServerConnections';
|
|||||||
additionalCardContent += getHoverMenuHtml(item, action, options);
|
additionalCardContent += getHoverMenuHtml(item, action, options);
|
||||||
}
|
}
|
||||||
|
|
||||||
return '<' + tagName + ' data-index="' + index + '"' + timerAttributes + actionAttribute + ' data-isfolder="' + (item.IsFolder || false) + '" data-serverid="' + (item.ServerId || options.serverId) + '" data-id="' + (item.Id || item.ItemId) + '" data-type="' + item.Type + '"' + mediaTypeData + collectionTypeData + channelIdData + positionTicksData + collectionIdData + playlistIdData + contextData + parentIdData + ' data-prefix="' + prefix + '" class="' + className + '">' + cardImageContainerOpen + innerCardFooter + cardImageContainerClose + overlayButtons + additionalCardContent + cardScalableClose + outerCardFooter + cardBoxClose + '</' + tagName + '>';
|
return '<' + tagName + ' data-index="' + index + '"' + timerAttributes + actionAttribute + ' data-isfolder="' + (item.IsFolder || false) + '" data-serverid="' + (item.ServerId || options.serverId) + '" data-id="' + (item.Id || item.ItemId) + '" data-type="' + item.Type + '"' + mediaTypeData + collectionTypeData + channelIdData + pathData + positionTicksData + collectionIdData + playlistIdData + contextData + parentIdData + ' data-prefix="' + prefix + '" class="' + className + '">' + cardImageContainerOpen + innerCardFooter + cardImageContainerClose + overlayButtons + additionalCardContent + cardScalableClose + outerCardFooter + cardBoxClose + '</' + tagName + '>';
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -145,6 +145,7 @@ import toast from './toast/toast';
|
|||||||
SeriesId: card.getAttribute('data-seriesid'),
|
SeriesId: card.getAttribute('data-seriesid'),
|
||||||
ServerId: card.getAttribute('data-serverid'),
|
ServerId: card.getAttribute('data-serverid'),
|
||||||
MediaType: card.getAttribute('data-mediatype'),
|
MediaType: card.getAttribute('data-mediatype'),
|
||||||
|
Path: card.getAttribute('data-path'),
|
||||||
IsFolder: card.getAttribute('data-isfolder') === 'true',
|
IsFolder: card.getAttribute('data-isfolder') === 'true',
|
||||||
UserData: {
|
UserData: {
|
||||||
PlaybackPositionTicks: parseInt(card.getAttribute('data-positionticks') || '0')
|
PlaybackPositionTicks: parseInt(card.getAttribute('data-positionticks') || '0')
|
||||||
|
Loading…
Reference in New Issue
Block a user