|
@@ -108,11 +108,11 @@ class SourceManager(private val context: Context) {
|
|
|
@Suppress("OverridingDeprecatedMember")
|
|
|
open inner class StubSource(val sourceData: SourceData) : Source {
|
|
|
|
|
|
- override val name: String = sourceData.name
|
|
|
+ override val id: Long = sourceData.id
|
|
|
|
|
|
- override val lang: String = sourceData.lang
|
|
|
+ override val name: String = sourceData.name.ifBlank { id.toString() }
|
|
|
|
|
|
- override val id: Long = sourceData.id
|
|
|
+ override val lang: String = sourceData.lang
|
|
|
|
|
|
override suspend fun getMangaDetails(manga: MangaInfo): MangaInfo {
|
|
|
throw getSourceNotInstalledException()
|
|
@@ -139,10 +139,7 @@ class SourceManager(private val context: Context) {
|
|
|
}
|
|
|
|
|
|
override fun toString(): String {
|
|
|
- if (name.isNotBlank() && lang.isNotBlank()) {
|
|
|
- return "$name (${lang.uppercase()})"
|
|
|
- }
|
|
|
- return id.toString()
|
|
|
+ return if (sourceData.isMissingInfo.not()) "$name (${lang.uppercase()})" else id.toString()
|
|
|
}
|
|
|
|
|
|
fun getSourceNotInstalledException(): SourceNotInstalledException {
|