diff --git a/android/app/src/main/java/com/fabledsword/minstrel/api/ErrorCopy.kt b/android/app/src/main/java/com/fabledsword/minstrel/api/ErrorCopy.kt index 19cd5771..8376e1ab 100644 --- a/android/app/src/main/java/com/fabledsword/minstrel/api/ErrorCopy.kt +++ b/android/app/src/main/java/com/fabledsword/minstrel/api/ErrorCopy.kt @@ -99,16 +99,11 @@ object ErrorCopy { "bad_kind" to "Invalid request type.", "bad_paging" to "Invalid page size or offset.", "bad_reason" to "Invalid quarantine reason.", - "mbid_required" to "An MBID is required for this lookup.", "system_playlist_readonly" to "System playlists can't be edited directly.", "connection_refused" to "Couldn't reach the server. Check the URL and try again.", "cleartext_public" to "This server is on the internet, so its URL must start with https://. " + "Plain http:// only works on your home network.", - "request_not_pending" to "This request is no longer pending.", - "request_not_found" to "That request no longer exists.", - "not_followable" to "Various Artists and MusicBrainz placeholders can't be followed.", - "profile_not_found" to "That release-type profile no longer exists.", "track_not_found" to "That track no longer exists.", "library_not_writable" to "The music library isn't writable by the server.", "file_delete_failed" to "The file couldn't be deleted.", diff --git a/internal/api/playback_errors.go b/internal/api/playback_errors.go index 99296522..de37b718 100644 --- a/internal/api/playback_errors.go +++ b/internal/api/playback_errors.go @@ -23,14 +23,13 @@ var validPlaybackErrorKinds = map[string]struct{}{ "stalled": {}, } -// Valid `resolution` values. Hidden / deleted / requested are stamped -// automatically when the admin clicks the matching action from the -// inbox; fixed / ignored are operator-driven (no action taken on the -// track itself). Mirrors the CHECK constraint in migration 0032. +// Valid `resolution` values. Hidden / deleted are stamped automatically +// when the admin clicks the matching action from the inbox; fixed / +// ignored are operator-driven (no action taken on the track itself). +// Mirrors the playback_errors_resolution_check constraint. var validPlaybackErrorResolutions = map[string]struct{}{ "hidden": {}, "deleted": {}, - "requested": {}, "fixed": {}, "ignored": {}, } diff --git a/internal/db/migrations/0106_playback_error_resolutions.down.sql b/internal/db/migrations/0106_playback_error_resolutions.down.sql new file mode 100644 index 00000000..80185a5f --- /dev/null +++ b/internal/db/migrations/0106_playback_error_resolutions.down.sql @@ -0,0 +1,4 @@ +ALTER TABLE playback_errors + DROP CONSTRAINT playback_errors_resolution_check, + ADD CONSTRAINT playback_errors_resolution_check + CHECK (resolution IS NULL OR resolution IN ('hidden', 'deleted', 'requested', 'fixed', 'ignored')); diff --git a/internal/db/migrations/0106_playback_error_resolutions.up.sql b/internal/db/migrations/0106_playback_error_resolutions.up.sql new file mode 100644 index 00000000..55ca9f52 --- /dev/null +++ b/internal/db/migrations/0106_playback_error_resolutions.up.sql @@ -0,0 +1,7 @@ +-- A playback error is resolved by hiding or deleting the track, or by marking +-- it fixed or ignored. Nothing re-requests a track any more, so 'requested' +-- is no longer a resolution. +ALTER TABLE playback_errors + DROP CONSTRAINT playback_errors_resolution_check, + ADD CONSTRAINT playback_errors_resolution_check + CHECK (resolution IS NULL OR resolution IN ('hidden', 'deleted', 'fixed', 'ignored')); diff --git a/web/src/lib/admin/reports.ts b/web/src/lib/admin/reports.ts index 81b632bf..a0de0af5 100644 --- a/web/src/lib/admin/reports.ts +++ b/web/src/lib/admin/reports.ts @@ -102,8 +102,7 @@ const RESOLUTION_LABELS: Record = { fixed: 'Playback error marked fixed', ignored: 'Playback error ignored', hidden: 'Hidden after a playback error', - deleted: 'File deleted after a playback error', - requested: 'Re-requested after a playback error' + deleted: 'File deleted after a playback error' }; export function mergeHandled(actions: QuarantineActionRow[], resolved: AdminPlaybackError[]): HandledRow[] { diff --git a/web/src/lib/api/admin.ts b/web/src/lib/api/admin.ts index 8a8edbbb..495d13ff 100644 --- a/web/src/lib/api/admin.ts +++ b/web/src/lib/api/admin.ts @@ -870,7 +870,7 @@ export async function listMissingFiles( } // Takes a plain offset rather than a getter: callers wrap the call in -// $derived (as the playback-errors and requests pages do for their tab +// $derived (as the playback-errors page does for its tab // state), so changing the page re-creates the query with a new key. A // getter would capture the key once and paging would silently not refetch. // diff --git a/web/src/lib/api/types.ts b/web/src/lib/api/types.ts index 161faf91..08d6caed 100644 --- a/web/src/lib/api/types.ts +++ b/web/src/lib/api/types.ts @@ -51,7 +51,7 @@ export type ArtistDetail = ArtistRef & { albums: AlbumRef[]; // Genres across this artist's tracks. Server guarantees an array. genres: string[]; - // MusicBrainz id, which following is keyed by; "" when none. + // MusicBrainz id; "" when none. mbid: string; }; @@ -191,7 +191,6 @@ export type PlaybackErrorKind = 'zero_duration' | 'load_failed' | 'stalled'; export type PlaybackErrorResolution = | 'hidden' | 'deleted' - | 'requested' | 'fixed' | 'ignored'; diff --git a/web/src/lib/components/PageColumn.svelte b/web/src/lib/components/PageColumn.svelte index faab08b3..d02ceb33 100644 --- a/web/src/lib/components/PageColumn.svelte +++ b/web/src/lib/components/PageColumn.svelte @@ -1,6 +1,6 @@