feat(web): every Collection queue can remove the file and keep the track
release / web (push) Failing after 1m28s
release / go (push) Successful in 1m53s
release / govulncheck (push) Successful in 18s
release / integration (push) Successful in 4m16s
release / Attach APK to the Release (tag releases only) (push) Canceled after 0s
release / Build + push container image (push) Canceled after 0s
release / Verify release artifacts (tag releases only) (push) Canceled after 0s
release / Build signed APK (push) Canceled after 2m13s
release / android (push) Canceled after 2m59s
release / web (push) Failing after 1m28s
release / go (push) Successful in 1m53s
release / govulncheck (push) Successful in 18s
release / integration (push) Successful in 4m16s
release / Attach APK to the Release (tag releases only) (push) Canceled after 0s
release / Build + push container image (push) Canceled after 0s
release / Verify release artifacts (tag releases only) (push) Canceled after 0s
release / Build signed APK (push) Canceled after 2m13s
release / android (push) Canceled after 2m59s
Reports offers "Remove the file" ahead of "Remove from library": the bad file goes and the track waits in Needs a file, with its likes and plays, for a good copy. Suspect sources gets "Remove this file", and the Duplicates wrong-slot action and its route are named for what they do (remove-files). Their toasts and copy name Needs a file. Missing files becomes Needs a file in the rail, the Collection header and the Overview counts. Each track says why it waits and who removed it, and can be forgotten one at a time or by folder; the list exports as a CSV or copies to the clipboard. The empty state says how a track gets there and how it leaves. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -9,7 +9,7 @@ import type {
|
||||
AdminDuplicatesResponse,
|
||||
DuplicatesView,
|
||||
MergeDuplicateResult,
|
||||
RefetchDuplicateResult,
|
||||
WrongSlotRemoval,
|
||||
ResolvedDuplicatesResponse,
|
||||
AdminPlaybackError,
|
||||
AdminQuarantineRow,
|
||||
@@ -61,6 +61,13 @@ export async function resolveQuarantine(trackID: string): Promise<ActionResult>
|
||||
return api.post<ActionResult>(`/api/admin/quarantine/${trackID}/resolve`, {});
|
||||
}
|
||||
|
||||
// Removes the reported file and keeps the track, which waits in Needs a file
|
||||
// for a good copy. Its reports and playback errors are settled with it.
|
||||
export async function removeQuarantineFile(trackID: string): Promise<ActionResult> {
|
||||
return api.post<ActionResult>(`/api/admin/quarantine/${trackID}/remove-file`, {});
|
||||
}
|
||||
|
||||
// Removes the track from the library with its file, history and all.
|
||||
export async function deleteQuarantineFile(trackID: string): Promise<ActionResult> {
|
||||
return api.post<ActionResult>(`/api/admin/quarantine/${trackID}/delete-file`, {});
|
||||
}
|
||||
@@ -834,14 +841,15 @@ export async function mergeDuplicateGroup(
|
||||
);
|
||||
}
|
||||
|
||||
// One recording in several of an album's slots: keep the copy whose
|
||||
// title it is, or none (empty keep_track_id), and fetch the album again.
|
||||
export async function refetchDuplicateGroup(
|
||||
// One recording in several of an album's slots: keep the copy whose title it
|
||||
// is, or none (empty keep_track_id). The other copies' files go and their
|
||||
// tracks wait in Needs a file for a good copy.
|
||||
export async function removeWrongSlotFiles(
|
||||
id: string,
|
||||
body: { keep_track_id: string }
|
||||
): Promise<RefetchDuplicateResult> {
|
||||
return api.post<RefetchDuplicateResult>(
|
||||
`/api/admin/library/duplicates/${encodeURIComponent(id)}/refetch`,
|
||||
): Promise<WrongSlotRemoval> {
|
||||
return api.post<WrongSlotRemoval>(
|
||||
`/api/admin/library/duplicates/${encodeURIComponent(id)}/remove-files`,
|
||||
body
|
||||
);
|
||||
}
|
||||
@@ -850,7 +858,7 @@ export async function dismissDuplicateGroup(id: string): Promise<void> {
|
||||
await api.post(`/api/admin/library/duplicates/${encodeURIComponent(id)}/dismiss`, {});
|
||||
}
|
||||
|
||||
// Missing files -----------------------------------------------------
|
||||
// Needs a file ------------------------------------------------------
|
||||
|
||||
export async function listMissingFiles(
|
||||
offset: number = 0,
|
||||
@@ -876,6 +884,16 @@ export function createMissingFilesQuery(offset: number = 0, limit: number = 50)
|
||||
});
|
||||
}
|
||||
|
||||
// Forgets tracks waiting for a file, for good: each goes with its likes, plays
|
||||
// and playlist places. All or nothing; a track whose file is back is refused.
|
||||
export async function forgetMissingTracks(trackIds: string[]): Promise<{ forgotten: number }> {
|
||||
return api.post<{ forgotten: number }>('/api/admin/library/missing/forget', { track_ids: trackIds });
|
||||
}
|
||||
|
||||
// The whole list as a CSV, to hand to whatever finds music. A plain link
|
||||
// downloads it: the session cookie goes with it.
|
||||
export const MISSING_FILES_CSV_URL = '/api/admin/library/missing.csv';
|
||||
|
||||
// Suspect sources --------------------------------------------------
|
||||
|
||||
export const SUSPECT_SOURCES_PAGE_SIZE = 50;
|
||||
@@ -910,6 +928,12 @@ export async function setSuspectVerdict(trackId: string, verdict: SuspectVerdict
|
||||
await api.put(`/api/admin/library/suspect-sources/${encodeURIComponent(trackId)}`, { verdict });
|
||||
}
|
||||
|
||||
// Removes a suspect source's file and keeps its track, which waits in Needs a
|
||||
// file for a clean copy.
|
||||
export async function removeSuspectFile(trackId: string): Promise<void> {
|
||||
await api.post(`/api/admin/library/suspect-sources/${encodeURIComponent(trackId)}/remove`, {});
|
||||
}
|
||||
|
||||
// Notification emails: when the grouped emails go out.
|
||||
export type NotificationEmailSettings = {
|
||||
summary_hour: number;
|
||||
|
||||
Reference in New Issue
Block a user