mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-11-04 09:15:07 +01:00
update title on metadata refresh
putting this in a try block since sources have late inits for titles, just not as mangaimpl
This commit is contained in:
parent
ff5169d7b9
commit
c7356a977d
@ -1,6 +1,7 @@
|
|||||||
package eu.kanade.tachiyomi.data.database.models
|
package eu.kanade.tachiyomi.data.database.models
|
||||||
|
|
||||||
import eu.kanade.tachiyomi.source.model.SManga
|
import eu.kanade.tachiyomi.source.model.SManga
|
||||||
|
import java.lang.Exception
|
||||||
|
|
||||||
open class MangaImpl : Manga {
|
open class MangaImpl : Manga {
|
||||||
|
|
||||||
@ -37,13 +38,16 @@ open class MangaImpl : Manga {
|
|||||||
override var hide_title: Boolean = false
|
override var hide_title: Boolean = false
|
||||||
|
|
||||||
override fun copyFrom(other: SManga) {
|
override fun copyFrom(other: SManga) {
|
||||||
if ((other is MangaImpl && (other as MangaImpl)::title.isInitialized && other.title != title)) {
|
try {
|
||||||
|
if (other.title != title) {
|
||||||
title = if (currentTitle() != originalTitle()) {
|
title = if (currentTitle() != originalTitle()) {
|
||||||
val customTitle = currentTitle()
|
val customTitle = currentTitle()
|
||||||
val trueTitle = other.title
|
val trueTitle = other.title
|
||||||
"${customTitle}${SManga.splitter}${trueTitle}"
|
"${customTitle}${SManga.splitter}${trueTitle}"
|
||||||
} else other.title
|
} else other.title
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
catch(e: Exception) { }
|
||||||
super.copyFrom(other)
|
super.copyFrom(other)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user