From c495753315f6f1937d2c7942a9d06775ddb56429 Mon Sep 17 00:00:00 2001 From: Leodyver Semilla <124951048+leodyversemilla07@users.noreply.github.com> Date: Thu, 19 Mar 2026 16:24:58 +0800 Subject: [PATCH] Fix tracker-induced duplicate key crash in duplicate detection (#3040) --- CHANGELOG.md | 3 +++ data/src/main/sqldelight/tachiyomi/data/mangas.sq | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a4850029f..a7cbef97c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,9 @@ The format is a modified version of [Keep a Changelog](https://keepachangelog.co ### Improved - Rework internals for better performance ([@Lolle2000la](https://github.com/Lolle2000la)) ([#2955](https://github.com/mihonapp/mihon/pull/2955)) +### Fixed +- Fix tracker-induced duplicate key crash in duplicate detection ([@leodyversemilla07](https://github.com/leodyversemilla07)) ([#3040](https://github.com/mihonapp/mihon/pull/3040)) + ## [v0.19.4] - 2026-02-25 ### Added - Automatically remove downloads on Suwayomi after reading, configurable via extension settings ([@cpiber](https://github.com/cpiber)) ([#2673](https://github.com/mihonapp/mihon/pull/2673)) diff --git a/data/src/main/sqldelight/tachiyomi/data/mangas.sq b/data/src/main/sqldelight/tachiyomi/data/mangas.sq index 8125360c0..d98835180 100644 --- a/data/src/main/sqldelight/tachiyomi/data/mangas.sq +++ b/data/src/main/sqldelight/tachiyomi/data/mangas.sq @@ -119,7 +119,7 @@ AND source = :sourceId; getDuplicateLibraryManga: WITH track_dupes AS ( - SELECT S2.manga_id + SELECT DISTINCT S2.manga_id FROM manga_sync S1 INNER JOIN manga_sync S2 ON S1.sync_id = S2.sync_id