fix(api,web): movie delete always removes files
ci / web (push) Successful in 1m5s
ci / rust (push) Successful in 1m30s
e2e / e2e (push) Successful in 1m27s

Drop the delete_files choice: removing a movie now always unlinks
its §7.4 library folder. Removes the query flag from DELETE
/api/movies/{id} and the OpenAPI params, and the toggle from the UI
confirmation panel — the confirmation itself stays. Path-safety and
torrent-untouched behaviour are unchanged.

Closes #110
This commit is contained in:
Miguel Palhas
2026-08-23 10:21:03 +01:00
parent 54b3ea8a4d
commit d6345c5305
5 changed files with 26 additions and 145 deletions
+5 -6
View File
@@ -147,14 +147,13 @@ export function totalSize(files: MovieFile[]): number {
export type ActionOutcome = { kind: "done" } | { kind: "error"; detail: string };
/**
* Remove the title from the library. `deleteFiles` is the operator's second,
* separate decision (§7.4): the row always goes, the folder only on request.
* Either way the torrent keeps seeding — the reaper owns that lifecycle
* (§7.3) and a hardlinked file loses only its library name.
* Remove the title from the library. Both the row and its §7.4 folder go.
* The torrent keeps seeding — the reaper owns that lifecycle (§7.3) and a
* hardlinked file loses only its library name.
*/
export async function removeMovie(movieId: number, deleteFiles: boolean): Promise<ActionOutcome> {
export async function removeMovie(movieId: number): Promise<ActionOutcome> {
try {
const response = await fetch(`/api/movies/${movieId}?delete_files=${String(deleteFiles)}`, {
const response = await fetch(`/api/movies/${movieId}`, {
method: "DELETE",
});
if (!response.ok) {