fix(api,web): movie delete always removes files
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:
+5
-6
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user