mirror of
https://github.com/stashapp/stash.git
synced 2025-12-24 01:03:24 +01:00
Show static image if wall video missing (#849)
This commit is contained in:
parent
482f8cbd92
commit
d0f1ad3c24
2 changed files with 14 additions and 8 deletions
|
|
@ -6,6 +6,7 @@
|
|||
* Add selective scene export.
|
||||
|
||||
### 🎨 Improvements
|
||||
* Show static image on scene wall if preview video is missing.
|
||||
* Add path filter to scene and gallery query.
|
||||
* Add button to hide left panel on scene page.
|
||||
* Add link to parent studio in studio page.
|
||||
|
|
|
|||
|
|
@ -46,14 +46,6 @@ const Preview: React.FC<{
|
|||
|
||||
if (!previews) return <div />;
|
||||
|
||||
if (isMissing) {
|
||||
return (
|
||||
<div className="wall-item-media wall-item-missing">
|
||||
Pending preview generation
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
const image = (
|
||||
<img
|
||||
alt=""
|
||||
|
|
@ -81,6 +73,19 @@ const Preview: React.FC<{
|
|||
/>
|
||||
);
|
||||
|
||||
if (isMissing) {
|
||||
// show the image if the video preview is unavailable
|
||||
if (previews.image) {
|
||||
return image;
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="wall-item-media wall-item-missing">
|
||||
Pending preview generation
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
if (previewType === "video") {
|
||||
return video;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue