diff --git a/internal/api/routes_scene.go b/internal/api/routes_scene.go index b2ec83269..8a5c4f023 100644 --- a/internal/api/routes_scene.go +++ b/internal/api/routes_scene.go @@ -5,13 +5,10 @@ import ( "context" "errors" "net/http" + "os" "strconv" "strings" - // Added by Philip - "os" - // Added ends. - "github.com/go-chi/chi/v5" "github.com/stashapp/stash/internal/manager" @@ -72,8 +69,7 @@ func (rs sceneRoutes) Routes() chi.Router { r.Get("/stream.mpd", rs.StreamDASH) r.Get("/stream.mpd/{segment}_v.webm", rs.StreamDASHVideoSegment) r.Get("/stream.mpd/{segment}_a.webm", rs.StreamDASHAudioSegment) - - r.Get("/stream/org/{streamOrgFile}", rs.StreamOrgDirect) // Added by Philip + r.Get("/stream/org/{streamOrgFile}", rs.StreamOrgDirect) r.Get("/screenshot", rs.Screenshot) r.Get("/preview", rs.Preview) @@ -105,7 +101,6 @@ func (rs sceneRoutes) StreamDirect(w http.ResponseWriter, r *http.Request) { ss.StreamSceneDirect(scene, w, r) } -// Added by Philip func (rs sceneRoutes) StreamOrgDirect(w http.ResponseWriter, r *http.Request) { scene := r.Context().Value(sceneKey).(*models.Scene) // check if it's funscript @@ -134,8 +129,6 @@ func (rs sceneRoutes) StreamOrgDirect(w http.ResponseWriter, r *http.Request) { http.ServeFile(w, r, f.Path) } -// Added ends. - func (rs sceneRoutes) StreamMp4(w http.ResponseWriter, r *http.Request) { rs.streamTranscode(w, r, ffmpeg.StreamTypeMP4) } diff --git a/ui/v2.5/src/components/Scenes/SceneDetails/ExternalPlayerButton.tsx b/ui/v2.5/src/components/Scenes/SceneDetails/ExternalPlayerButton.tsx index 766c683d3..c5cca5f81 100644 --- a/ui/v2.5/src/components/Scenes/SceneDetails/ExternalPlayerButton.tsx +++ b/ui/v2.5/src/components/Scenes/SceneDetails/ExternalPlayerButton.tsx @@ -18,8 +18,7 @@ export const ExternalPlayerButton: React.FC = ({ const isAppleDevice = /(ipod|iphone|ipad)/i.test(navigator.userAgent); const intl = useIntl(); const { configuration } = useConfigurationContext(); - const uiConfig = configuration?.ui; - const showOpenExternal = uiConfig?.showOpenExternal ?? true; + const showOpenExternal = configuration?.ui?.showOpenExternal ?? true; const { paths } = scene; const { files } = scene;