mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-09-10 21:03:13 +02: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
|
||||
|
||||
import eu.kanade.tachiyomi.source.model.SManga
|
||||
import java.lang.Exception
|
||||
|
||||
open class MangaImpl : Manga {
|
||||
|
||||
@ -37,13 +38,16 @@ open class MangaImpl : Manga {
|
||||
override var hide_title: Boolean = false
|
||||
|
||||
override fun copyFrom(other: SManga) {
|
||||
if ((other is MangaImpl && (other as MangaImpl)::title.isInitialized && other.title != title)) {
|
||||
title = if (currentTitle() != originalTitle()) {
|
||||
val customTitle = currentTitle()
|
||||
val trueTitle = other.title
|
||||
"${customTitle}${SManga.splitter}${trueTitle}"
|
||||
} else other.title
|
||||
try {
|
||||
if (other.title != title) {
|
||||
title = if (currentTitle() != originalTitle()) {
|
||||
val customTitle = currentTitle()
|
||||
val trueTitle = other.title
|
||||
"${customTitle}${SManga.splitter}${trueTitle}"
|
||||
} else other.title
|
||||
}
|
||||
}
|
||||
catch(e: Exception) { }
|
||||
super.copyFrom(other)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user