fix: Unread badge wont show up for some sources

Always happened on Komga apparently, but not as frequent on other sources

Fixes GH-95
This commit is contained in:
Ahmad Ansori Palembani 2024-08-12 18:07:54 +07:00
parent 65260e8bd7
commit 6c8bd82d41
Signed by: null2264
GPG key ID: BA64F8B60AF3EFB6
3 changed files with 16 additions and 1 deletions

View file

@ -41,6 +41,7 @@
- Fixed splash screen state only getting updates if library is empty (Should slightly reduce splash screen duration)
- Fixed kitsu tracker issue due to domain change
- Fixed entry custom cover won't load if entry doesn't have cover from source
- Fixed unread badge doesn't work properly for some sources (notably Komga)
## Translation
- Update Japanese translation (akir45)

View file

@ -0,0 +1,14 @@
DROP VIEW IF EXISTS scanlators_view;
CREATE VIEW scanlators_view AS
SELECT S.* FROM (
WITH RECURSIVE split(seq, _id, name, str) AS (
SELECT 0, mangas._id, NULL, mangas.filtered_scanlators||' [.] ' FROM mangas WHERE mangas._id
UNION ALL SELECT
seq+1,
_id,
substr(str, 0, instr(str, ' [.] ')),
substr(str, instr(str, ' [.] ')+5)
FROM split WHERE str != ''
)
SELECT _id AS manga_id, name FROM split WHERE split.seq != 0 ORDER BY split.seq ASC
) AS S;

View file

@ -2,7 +2,7 @@
CREATE VIEW scanlators_view AS
SELECT S.* FROM (
WITH RECURSIVE split(seq, _id, name, str) AS (
SELECT 0, mangas._id, NULL, ifnull(mangas.filtered_scanlators, '')||' [.] ' FROM mangas WHERE mangas._id
SELECT 0, mangas._id, NULL, mangas.filtered_scanlators||' [.] ' FROM mangas WHERE mangas._id
UNION ALL SELECT
seq+1,
_id,