From 23efb02636b7f77840fc76237cc92d67512e8c85 Mon Sep 17 00:00:00 2001 From: Darkmadda Date: Fri, 29 May 2026 23:20:54 -0600 Subject: [PATCH] fix(browse): keep show in browse after deleting its downloads The browse grid listens for DeletionEvents and decrements each show's leafCount, evicting the show when the count hits zero. Download-only deletions (isDownloadOnly: true) fired one event per episode, so deleting every downloaded episode of a show drove its leafCount to zero and removed it from browse - even though the content still exists on the server. Browse is online-only (the Libraries tab is hidden when offline) and always reflects server-side content, so it must ignore download-only deletions. Add a guard at the top of onDeletionEvent, matching the existing isDownloadOnly contract already honored by media_detail_screen. Co-authored-by: Claude Opus 4.8 (1M context) --- lib/screens/libraries/tabs/library_browse_tab.dart | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/screens/libraries/tabs/library_browse_tab.dart b/lib/screens/libraries/tabs/library_browse_tab.dart index f99753db..bd46b71d 100644 --- a/lib/screens/libraries/tabs/library_browse_tab.dart +++ b/lib/screens/libraries/tabs/library_browse_tab.dart @@ -153,6 +153,13 @@ class _LibraryBrowseTabState extends BaseLibraryTabState