mirror of
https://github.com/mihonapp/mihon.git
synced 2025-06-28 20:17:51 +02:00
delegate tsumino
This commit is contained in:
@ -97,6 +97,21 @@ object EXHMigrations {
|
||||
context.jobScheduler.cancelAll()
|
||||
}
|
||||
}
|
||||
if (oldVersion < 8408) {
|
||||
db.inTransaction {
|
||||
// Migrate Tsumino source IDs
|
||||
db.lowLevel().executeSQL(RawQuery.builder()
|
||||
.query("""
|
||||
UPDATE ${MangaTable.TABLE}
|
||||
SET ${MangaTable.COL_SOURCE} = $TSUMINO_SOURCE_ID
|
||||
WHERE ${MangaTable.COL_SOURCE} = 6909
|
||||
""".trimIndent())
|
||||
.affectsTables(MangaTable.TABLE)
|
||||
.build())
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// TODO BE CAREFUL TO NOT FUCK UP MergedSources IF CHANGING URLs
|
||||
|
||||
@ -118,6 +133,11 @@ object EXHMigrations {
|
||||
manga.source = HENTAI_CAFE_SOURCE_ID
|
||||
}
|
||||
|
||||
// Migrate Tsumino source IDs
|
||||
if(manga.source == 6909L) {
|
||||
manga.source = TSUMINO_SOURCE_ID
|
||||
}
|
||||
|
||||
// Migrate nhentai URLs
|
||||
if(manga.source == NHENTAI_SOURCE_ID) {
|
||||
manga.url = getUrlWithoutDomain(manga.url)
|
||||
|
Reference in New Issue
Block a user