fix(delete): name the delete target and verify what its files back
"Delete from server" read identically for an episode, a season and a
whole show: same menu label, same dialog title, same red button, and a
body that named nothing. The menu header did not disambiguate either,
because MediaItem.displayTitle collapses an episode to its show name.
A reporter deleted a whole series from the detail hero's ⋮ believing it
acted on the episode he had highlighted, and the confirmation gave him
nothing to catch it with. Every one of those strings now names the kind,
and the body names the exact item — show, season and episode number, and
episode title.
Deleting a single item also destroyed files the confirmation never
mentioned: a Plex multi-episode file (S01E01-E03.mkv) takes its other
episodes with it, and a split item takes every part. The dialog now
reports that up front and, on success, emits deletion events for the
siblings the server destroyed so their rows do not linger.
The scope behind that warning is only asserted when it is established.
MediaItem.allPartFiles drops parts with no path, so a non-empty set
proves nothing about the ones it filtered out; a version is trusted only
when every part reports a file. A browse row that omits paths is missing
evidence rather than proof of a distinct file, so both the target and
each candidate sibling fall back to the detail endpoint before any
conclusion — otherwise a thin row, including the file-less part
PlexMappers fabricates for an empty payload, would look like a server
that withholds paths. When the answer cannot be established the dialog
says so in an error-tinted block and its button reads "Delete anyway",
separating a transient probe failure from a server that never sends
paths. It deliberately does not refuse: Plex withholds paths from
restricted users the server itself authorizes to delete, so failing
closed would take the feature away from them permanently.
Probing a season stays bounded in both directions. Siblings resolve one
at a time, so a season of thin rows cannot fan out a detail request per
episode, and expiry cancels the walk rather than merely abandoning it —
`Future.timeout` completes the future the caller awaits but leaves the
work behind it running, which would resume on the next sibling once the
outstanding request answered. A cooperative flag is checked before each
lookup, so at most the one already in flight outlives the deadline; the
neutral client exposes no abort handle for item lookups, so that one
cannot be recalled.
The spinner covering the probe was only barrierDismissible, which does
not stop system back. Back dismissed it and the cleanup pop then closed
the screen underneath, dropping the user out of the detail page
mid-flow. It now traps back, matching the non-dismissible contract its
own doc claims, which also repairs the log uploader and the file-info
sheet.
Coverage splits by what each layer owns. The dialog, its copy and the
DELETE wiring are backend-neutral and stay in the menu widget tests.
Plex — the backend multi-episode files actually come from — gets the
resolver over a real PlexClient and a mocked transport: a row with no
media at all, scope recovered from /library/metadata/{id}, siblings and
paths from /children, a Part that names no file, a sibling whose path
never resolves, the request count a sixty-episode thin season may cost,
and the rating key the DELETE carries. Those are plain async tests
because the Plex metadata cache is a real database whose I/O the widget
tester's fake clock never drives. Deadline behaviour needs the opposite,
so it is pinned separately under fakeAsync against a gated fake client,
with no wall-clock waiting anywhere.
close #1781
This commit is contained in:
@@ -546,8 +546,6 @@ class _Translations$mediaMenu$ko extends Translations$mediaMenu$en {
|
||||
@override String get shufflePlay => '무작위 재생';
|
||||
@override String get shuffleNotAvailableOffline => '오프라인에서는 무작위 재생을 사용할 수 없습니다';
|
||||
@override String get fileInfo => '파일 정보';
|
||||
@override String get deleteFromServer => '서버에서 삭제';
|
||||
@override String get confirmDelete => '이 미디어와 해당 파일을 서버에서 삭제할까요?';
|
||||
@override String get deleteMultipleWarning => '모든 에피소드와 파일이 포함됩니다.';
|
||||
@override String get mediaDeletedSuccessfully => '미디어 항목이 성공적으로 삭제되었습니다';
|
||||
@override String get mediaFailedToDelete => '미디어 항목 삭제 실패';
|
||||
@@ -2580,8 +2578,6 @@ extension on TranslationsKo {
|
||||
'mediaMenu.shufflePlay' => '무작위 재생',
|
||||
'mediaMenu.shuffleNotAvailableOffline' => '오프라인에서는 무작위 재생을 사용할 수 없습니다',
|
||||
'mediaMenu.fileInfo' => '파일 정보',
|
||||
'mediaMenu.deleteFromServer' => '서버에서 삭제',
|
||||
'mediaMenu.confirmDelete' => '이 미디어와 해당 파일을 서버에서 삭제할까요?',
|
||||
'mediaMenu.deleteMultipleWarning' => '모든 에피소드와 파일이 포함됩니다.',
|
||||
'mediaMenu.mediaDeletedSuccessfully' => '미디어 항목이 성공적으로 삭제되었습니다',
|
||||
'mediaMenu.mediaFailedToDelete' => '미디어 항목 삭제 실패',
|
||||
@@ -2700,10 +2696,10 @@ extension on TranslationsKo {
|
||||
'videoControls.language' => '언어',
|
||||
'videoControls.noSubtitlesFound' => '자막을 찾을 수 없습니다',
|
||||
'videoControls.subtitleDownloaded' => '자막이 다운로드되었습니다',
|
||||
_ => null,
|
||||
} ?? switch (path) {
|
||||
'videoControls.subtitleDownloadedNotApplied' => '자막을 다운로드했지만 선택할 수 없습니다',
|
||||
'videoControls.subtitleDownloadFailed' => '자막 다운로드에 실패했습니다',
|
||||
_ => null,
|
||||
} ?? switch (path) {
|
||||
'videoControls.searchLanguages' => '언어 검색...',
|
||||
'messages.markedAsWatched' => '시청 완료로 표시됨',
|
||||
'messages.markedAsUnwatched' => '미시청으로 표시됨',
|
||||
@@ -3214,10 +3210,10 @@ extension on TranslationsKo {
|
||||
'watchTogether.failedToJoin' => '세션 참여 실패',
|
||||
'watchTogether.sessionCodeCopied' => '세션 코드가 클립보드에 복사되었습니다',
|
||||
'watchTogether.relayUnreachable' => '릴레이 서버에 연결할 수 없습니다. ISP 차단으로 함께 보기를 사용하지 못할 수 있습니다.',
|
||||
_ => null,
|
||||
} ?? switch (path) {
|
||||
'watchTogether.reconnectingToHost' => '호스트에 재연결 중...',
|
||||
'watchTogether.currentPlayback' => '현재 재생',
|
||||
_ => null,
|
||||
} ?? switch (path) {
|
||||
'watchTogether.joinCurrentPlayback' => '현재 재생 참여',
|
||||
'watchTogether.joinCurrentPlaybackDescription' => '호스트가 현재 시청 중인 콘텐츠로 이동합니다',
|
||||
'watchTogether.failedToOpenCurrentPlayback' => '현재 재생을 열 수 없습니다',
|
||||
|
||||
Reference in New Issue
Block a user