diff --git a/internal/api/routes_scene.go b/internal/api/routes_scene.go index 112d4dbf9..c01c43104 100644 --- a/internal/api/routes_scene.go +++ b/internal/api/routes_scene.go @@ -88,7 +88,14 @@ func (rs sceneRoutes) Routes() chi.Router { // region Handlers func (rs sceneRoutes) StreamDirect(w http.ResponseWriter, r *http.Request) { + scene := r.Context().Value(sceneKey).(*models.Scene) + // #3526 - return 404 if the scene does not have any files + if scene.Path == "" { + w.WriteHeader(http.StatusNotFound) + return + } + sceneHash := scene.GetHash(config.GetInstance().GetVideoFileNamingAlgorithm()) filepath := manager.GetInstance().Paths.Scene.GetStreamPath(scene.Path, sceneHash) diff --git a/ui/v2.5/src/components/Scenes/SceneDetails/SceneFileInfoPanel.tsx b/ui/v2.5/src/components/Scenes/SceneDetails/SceneFileInfoPanel.tsx index 8cccfc425..b2edbfa93 100644 --- a/ui/v2.5/src/components/Scenes/SceneDetails/SceneFileInfoPanel.tsx +++ b/ui/v2.5/src/components/Scenes/SceneDetails/SceneFileInfoPanel.tsx @@ -306,12 +306,14 @@ export const SceneFileInfoPanel: React.FC = ( return ( <>
- + {props.scene.files.length > 0 && ( + + )} {renderFunscript()} {renderInteractiveSpeed()}