// Videos (owner review 1, R9; decision 22): every render of the server in one list (GET /api/v1/videos), as cards or // rows, with the filters in the address (#/videos?sequence= is a sequence's "All videos"). The panel manages and never // edits (owner review 2, R6): it plays a render in the browser, downloads it, copies it hash-verified into the server's // videos folder (a video-copy job) and deletes it into the archive's trash after a dry run that names what goes, whose // fingerprint the delete sends back. Restoring goes through Library › Trash. Nothing here renders or changes a project. import { t, applyStrings } from "../i18n.js"; import { escapeHtml, attr, formatBytes, formatNumber, formatDateTime, toast, errorText, confirmDialog, emptyState, routeParams, redraw } from "../ui.js"; import { icons } from "../icons.js"; import { lazyImage, watchImages, Selection, selectableGrid, listed, JOB_ENDED } from "./library/shared.js"; const VIEW_KEY = "chronos.admin.videos.view"; const PAGE = 100; /** The most a refresh reads back in one request (VideoQuery.MaxLimit). */ const MAX_PAGE = 500; const KINDS = ["video", "still", "sequence"]; const SORTS = ["newest", "oldest", "largest", "title"]; const FILTERS = ["q", "kind", "codec", "year", "sequence", "sort"]; /** Permissions bits (Chronos.Core.Model.Permissions): copying needs Edit, deleting Delete. */ const EDIT = 4; const DELETE = 8; /** File types a browser plays in a