mirror of
https://github.com/stashapp/stash.git
synced 2025-12-18 04:44:37 +03:00
Show static image if wall video missing (#849)
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user