Fix manga chapter flags not working
The new column is appended to the end, so ordering does matter here.
This commit is contained in:
parent
9339ea4196
commit
f459515dd7
@ -4,8 +4,8 @@ import eu.kanade.tachiyomi.source.model.UpdateStrategy
|
|||||||
import tachiyomi.domain.library.model.LibraryManga
|
import tachiyomi.domain.library.model.LibraryManga
|
||||||
import tachiyomi.domain.manga.model.Manga
|
import tachiyomi.domain.manga.model.Manga
|
||||||
|
|
||||||
val mangaMapper: (Long, Long, String, String?, String?, String?, List<String>?, String, Long, String?, Boolean, Long?, Long?, Long, Boolean, Long, Long, Long, Long, UpdateStrategy) -> Manga =
|
val mangaMapper: (Long, Long, String, String?, String?, String?, List<String>?, String, Long, String?, Boolean, Long?, Long?, Boolean, Long, Long, Long, Long, UpdateStrategy, Long) -> Manga =
|
||||||
{ id, source, url, artist, author, description, genre, title, status, thumbnailUrl, favorite, lastUpdate, nextUpdate, calculateInterval, initialized, viewerFlags, chapterFlags, coverLastModified, dateAdded, updateStrategy ->
|
{ id, source, url, artist, author, description, genre, title, status, thumbnailUrl, favorite, lastUpdate, nextUpdate, initialized, viewerFlags, chapterFlags, coverLastModified, dateAdded, updateStrategy, calculateInterval ->
|
||||||
Manga(
|
Manga(
|
||||||
id = id,
|
id = id,
|
||||||
source = source,
|
source = source,
|
||||||
@ -30,8 +30,8 @@ val mangaMapper: (Long, Long, String, String?, String?, String?, List<String>?,
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
val libraryManga: (Long, Long, String, String?, String?, String?, List<String>?, String, Long, String?, Boolean, Long?, Long?, Long, Boolean, Long, Long, Long, Long, UpdateStrategy, Long, Long, Long, Long, Long, Long, Long) -> LibraryManga =
|
val libraryManga: (Long, Long, String, String?, String?, String?, List<String>?, String, Long, String?, Boolean, Long?, Long?, Boolean, Long, Long, Long, Long, UpdateStrategy, Long, Long, Long, Long, Long, Long, Long, Long) -> LibraryManga =
|
||||||
{ id, source, url, artist, author, description, genre, title, status, thumbnailUrl, favorite, lastUpdate, nextUpdate, calculateInterval, initialized, viewerFlags, chapterFlags, coverLastModified, dateAdded, updateStrategy, totalCount, readCount, latestUpload, chapterFetchedAt, lastRead, bookmarkCount, category ->
|
{ id, source, url, artist, author, description, genre, title, status, thumbnailUrl, favorite, lastUpdate, nextUpdate, initialized, viewerFlags, chapterFlags, coverLastModified, dateAdded, updateStrategy, calculateInterval, totalCount, readCount, latestUpload, chapterFetchedAt, lastRead, bookmarkCount, category ->
|
||||||
LibraryManga(
|
LibraryManga(
|
||||||
manga = mangaMapper(
|
manga = mangaMapper(
|
||||||
id,
|
id,
|
||||||
@ -47,13 +47,13 @@ val libraryManga: (Long, Long, String, String?, String?, String?, List<String>?,
|
|||||||
favorite,
|
favorite,
|
||||||
lastUpdate,
|
lastUpdate,
|
||||||
nextUpdate,
|
nextUpdate,
|
||||||
calculateInterval,
|
|
||||||
initialized,
|
initialized,
|
||||||
viewerFlags,
|
viewerFlags,
|
||||||
chapterFlags,
|
chapterFlags,
|
||||||
coverLastModified,
|
coverLastModified,
|
||||||
dateAdded,
|
dateAdded,
|
||||||
updateStrategy,
|
updateStrategy,
|
||||||
|
calculateInterval,
|
||||||
),
|
),
|
||||||
category = category,
|
category = category,
|
||||||
totalChapters = totalCount,
|
totalChapters = totalCount,
|
||||||
|
@ -16,13 +16,13 @@ CREATE TABLE mangas(
|
|||||||
favorite INTEGER AS Boolean NOT NULL,
|
favorite INTEGER AS Boolean NOT NULL,
|
||||||
last_update INTEGER AS Long,
|
last_update INTEGER AS Long,
|
||||||
next_update INTEGER AS Long,
|
next_update INTEGER AS Long,
|
||||||
calculate_interval INTEGER DEFAULT 0 NOT NULL,
|
|
||||||
initialized INTEGER AS Boolean NOT NULL,
|
initialized INTEGER AS Boolean NOT NULL,
|
||||||
viewer INTEGER NOT NULL,
|
viewer INTEGER NOT NULL,
|
||||||
chapter_flags INTEGER NOT NULL,
|
chapter_flags INTEGER NOT NULL,
|
||||||
cover_last_modified INTEGER AS Long NOT NULL,
|
cover_last_modified INTEGER AS Long NOT NULL,
|
||||||
date_added INTEGER AS Long NOT NULL,
|
date_added INTEGER AS Long NOT NULL,
|
||||||
update_strategy INTEGER AS UpdateStrategy NOT NULL DEFAULT 0
|
update_strategy INTEGER AS UpdateStrategy NOT NULL DEFAULT 0,
|
||||||
|
calculate_interval INTEGER DEFAULT 0 NOT NULL
|
||||||
);
|
);
|
||||||
|
|
||||||
CREATE INDEX library_favorite_index ON mangas(favorite) WHERE favorite = 1;
|
CREATE INDEX library_favorite_index ON mangas(favorite) WHERE favorite = 1;
|
||||||
@ -81,8 +81,8 @@ DELETE FROM mangas
|
|||||||
WHERE favorite = 0 AND source IN :sourceIds;
|
WHERE favorite = 0 AND source IN :sourceIds;
|
||||||
|
|
||||||
insert:
|
insert:
|
||||||
INSERT INTO mangas(source,url,artist,author,description,genre,title,status,thumbnail_url,favorite,last_update,next_update,calculate_interval,initialized,viewer,chapter_flags,cover_last_modified,date_added,update_strategy)
|
INSERT INTO mangas(source,url,artist,author,description,genre,title,status,thumbnail_url,favorite,last_update,next_update,initialized,viewer,chapter_flags,cover_last_modified,date_added,update_strategy,calculate_interval)
|
||||||
VALUES (:source,:url,:artist,:author,:description,:genre,:title,:status,:thumbnailUrl,:favorite,:lastUpdate,:nextUpdate,:calculateInterval,:initialized,:viewerFlags,:chapterFlags,:coverLastModified,:dateAdded,:updateStrategy);
|
VALUES (:source,:url,:artist,:author,:description,:genre,:title,:status,:thumbnailUrl,:favorite,:lastUpdate,:nextUpdate,:initialized,:viewerFlags,:chapterFlags,:coverLastModified,:dateAdded,:updateStrategy,:calculateInterval);
|
||||||
|
|
||||||
update:
|
update:
|
||||||
UPDATE mangas SET
|
UPDATE mangas SET
|
||||||
@ -98,13 +98,13 @@ UPDATE mangas SET
|
|||||||
favorite = coalesce(:favorite, favorite),
|
favorite = coalesce(:favorite, favorite),
|
||||||
last_update = coalesce(:lastUpdate, last_update),
|
last_update = coalesce(:lastUpdate, last_update),
|
||||||
next_update = coalesce(:nextUpdate, next_update),
|
next_update = coalesce(:nextUpdate, next_update),
|
||||||
calculate_interval = coalesce(:calculateInterval, calculate_interval),
|
|
||||||
initialized = coalesce(:initialized, initialized),
|
initialized = coalesce(:initialized, initialized),
|
||||||
viewer = coalesce(:viewer, viewer),
|
viewer = coalesce(:viewer, viewer),
|
||||||
chapter_flags = coalesce(:chapterFlags, chapter_flags),
|
chapter_flags = coalesce(:chapterFlags, chapter_flags),
|
||||||
cover_last_modified = coalesce(:coverLastModified, cover_last_modified),
|
cover_last_modified = coalesce(:coverLastModified, cover_last_modified),
|
||||||
date_added = coalesce(:dateAdded, date_added),
|
date_added = coalesce(:dateAdded, date_added),
|
||||||
update_strategy = coalesce(:updateStrategy, update_strategy)
|
update_strategy = coalesce(:updateStrategy, update_strategy),
|
||||||
|
calculate_interval = coalesce(:calculateInterval, calculate_interval)
|
||||||
WHERE _id = :mangaId;
|
WHERE _id = :mangaId;
|
||||||
|
|
||||||
selectLastInsertedRowId:
|
selectLastInsertedRowId:
|
||||||
|
Loading…
Reference in New Issue
Block a user