feat(search): Add Episode to search
This commit is contained in:
4 files changed
+50
-16
No files matched your search
@@ -120,11 +120,7 @@ export const Card = ({
|
||||
overrideIcon === "User"
|
||||
? `${api.basePath}/Users/${item.Id}/Images/Primary`
|
||||
: api.getItemImageUrl(
|
||||
seriesId
|
||||
? item.SeriesId
|
||||
: item.AlbumId
|
||||
? item.AlbumId
|
||||
: item.Id,
|
||||
seriesId ? item.SeriesId : item.AlbumId ?? item.Id,
|
||||
imageType,
|
||||
{
|
||||
quality: 90,
|
||||
|
||||
@@ -24,6 +24,7 @@ import PlayButton from "../buttons/playButton";
|
||||
* @property {string} imageBlurhash
|
||||
* @property {Array} queryKey
|
||||
* @property {string} userId
|
||||
* @property {boolean} disableRunTime
|
||||
* @property {() => {}} onClick
|
||||
*/
|
||||
|
||||
@@ -40,6 +41,7 @@ export const EpisodeCard = ({
|
||||
imageBlurhash,
|
||||
queryKey,
|
||||
userId,
|
||||
disableRunTime = false,
|
||||
onClick,
|
||||
}) => {
|
||||
const [api] = useApi((state) => [state.api]);
|
||||
@@ -126,7 +128,7 @@ export const EpisodeCard = ({
|
||||
<MarkPlayedButton
|
||||
itemId={item.Id}
|
||||
itemName={item.Name}
|
||||
isPlayed={item.UserData.Played}
|
||||
isPlayed={item.UserData?.Played}
|
||||
queryKey={queryKey}
|
||||
userId={userId}
|
||||
/>
|
||||
@@ -172,15 +174,17 @@ export const EpisodeCard = ({
|
||||
>
|
||||
{cardTitle}
|
||||
</Typography>
|
||||
<Typography
|
||||
variant="subtitle1"
|
||||
fontWeight={500}
|
||||
noWrap
|
||||
textAlign="start"
|
||||
style={{ opacity: 0.8, flexShrink: 0 }}
|
||||
>
|
||||
{getRuntimeCompact(item.RunTimeTicks)}
|
||||
</Typography>
|
||||
{!disableRunTime && (
|
||||
<Typography
|
||||
variant="subtitle1"
|
||||
fontWeight={500}
|
||||
noWrap
|
||||
textAlign="start"
|
||||
style={{ opacity: 0.8, flexShrink: 0 }}
|
||||
>
|
||||
{getRuntimeCompact(item.RunTimeTicks)}
|
||||
</Typography>
|
||||
)}
|
||||
</div>
|
||||
|
||||
<Typography
|
||||
|
||||
Reference in new issue
Block a user