Fix media-backend/media-webui: re-copy from post-revert MediaCollection

The original MediaEngine extraction (later folded into this repo) had
been done BEFORE the owner's decision to revert the MediaViewer/Forge/
etc. rename, and was never re-extracted afterward like the other 7
service repos were - it silently carried stale renamed-era text
(e.g. 'Porter' instead of 'MediaServant') into Go doc comments, WebUI
prose, project-icons.json, and app-config.ts. Re-copied both directories
fresh from the current (correctly reverted) MediaCollection/backend and
MediaCollection/WebUI, then re-applied the go.mod replace-directive fix
and re-added SECURITY_AUDIT.md (also newly migrated from MediaCollection
root - a real deployment security checklist that would otherwise have
been lost when MediaCollection is deleted).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Gabriel20xxandClaude Sonnet 5 committed 2026-08-31 22:19:58 +02:00
1 parent acde180086
commit 38a349eb52
20 files changed
+74 -55

No files matched your search

+6 -6
View File
@@ -147,7 +147,7 @@ func (s *Server) analyzerStatus(w http.ResponseWriter, r *http.Request) {
running := clear.Running || scan.Running || thumbnail.Running || analysis.Running || processing > 0
// scan/clear have no dedicated status endpoint of their own (thumbnail/analysis do, via
// generate/status and analyze/status) - this is the only place their LastError ever reaches
// the UI, so a discover/metadata/cleanup run that fails fast (e.g. Porter unreachable)
// the UI, so a discover/metadata/cleanup run that fails fast (e.g. MediaServant unreachable)
// is reported here instead of just looking like it silently reverted to idle.
lastError := firstNonEmpty(scan.LastError, clear.LastError)
@@ -1299,16 +1299,16 @@ func (s *Server) scanMediaFiles(selectedTypes map[string]bool) {
files, err := s.servantListFiles(ctx, "", false, 0)
if err != nil {
log.Printf("analyzer: discovery scan: failed to list files: %v", err)
runErr = fmt.Errorf("could not reach Porter to list files: %w", err)
runErr = fmt.Errorf("could not reach MediaServant to list files: %w", err)
return
}
// Porter reachable but reporting an empty library is otherwise indistinguishable from
// MediaServant reachable but reporting an empty library is otherwise indistinguishable from
// a successful no-op run - every existing file re-indexes (and increments FilesIndexed) on
// every scan, so a real library can never legitimately finish at zero. Flag it instead of
// letting "discovery started" silently revert to idle with nothing to show for it.
if len(files) == 0 {
log.Printf("analyzer: discovery scan: Porter reported zero files")
runErr = fmt.Errorf("Porter reported no files under its configured media root(s) - check the Mounts settings in MediaConfig")
log.Printf("analyzer: discovery scan: MediaServant reported zero files")
runErr = fmt.Errorf("MediaServant reported no files under its configured media root(s) - check the Mounts settings in MediaConfig")
return
}
for _, file := range files {
@@ -1501,7 +1501,7 @@ func hasFunscriptSidecar(filePath string) bool {
}
// funscriptSidecarExists is hasFunscriptSidecar for callers without local filesystem access
// (Lookout) - it checks for the sidecar on Servant instead of statting a local path.
// (MediaAnalyzer) - it checks for the sidecar on Servant instead of statting a local path.
func (s *Server) funscriptSidecarExists(ctx context.Context, key string) bool {
base := strings.TrimSuffix(key, filepath.Ext(key))
for _, candidate := range []string{base + ".funscript", base + ".json"} {