Consume and extend 1.x Source API

TODO: make the rest of the app actually call the 1.x functions
This commit is contained in:
arkon
2020-10-26 10:52:28 -04:00
parent 9493577de2
commit 2ab6af6471
8 changed files with 349 additions and 4 deletions

View File

@@ -1,6 +1,7 @@
package eu.kanade.tachiyomi.data.database.models
import eu.kanade.tachiyomi.source.model.SManga
import tachiyomi.source.model.MangaInfo
interface Manga : SManga {
@@ -98,3 +99,16 @@ interface Manga : SManga {
}
}
}
fun Manga.toMangaInfo(): MangaInfo {
return MangaInfo(
artist = this.artist ?: "",
author = this.author ?: "",
cover = this.thumbnail_url ?: "",
description = this.description ?: "",
genres = this.getGenres() ?: emptyList(),
key = this.url,
status = this.status,
title = this.title
)
}