Formatting
This commit is contained in:
@@ -186,7 +186,7 @@ class LocalSource(private val context: Context) : CatalogueSource, UnmeteredSour
|
||||
artist = obj["artist"]?.jsonPrimitive?.contentOrNull ?: manga.artist,
|
||||
description = obj["description"]?.jsonPrimitive?.contentOrNull ?: manga.description,
|
||||
genres = obj["genre"]?.jsonArray?.map { it.jsonPrimitive.content } ?: manga.genres,
|
||||
status = obj["status"]?.jsonPrimitive?.intOrNull ?: manga.status
|
||||
status = obj["status"]?.jsonPrimitive?.intOrNull ?: manga.status,
|
||||
)
|
||||
} else {
|
||||
manga
|
||||
@@ -314,7 +314,7 @@ class LocalSource(private val context: Context) : CatalogueSource, UnmeteredSour
|
||||
private class OrderBy(context: Context) : Filter.Sort(
|
||||
context.getString(R.string.local_filter_order_by),
|
||||
arrayOf(context.getString(R.string.title), context.getString(R.string.date)),
|
||||
Selection(0, true)
|
||||
Selection(0, true),
|
||||
)
|
||||
|
||||
sealed class Format {
|
||||
@@ -353,5 +353,5 @@ private val WHITESPACE_CHARS = arrayOf(
|
||||
'\u2029',
|
||||
'\u202F',
|
||||
'\u205F',
|
||||
'\u3000'
|
||||
'\u3000',
|
||||
)
|
||||
|
||||
@@ -42,7 +42,7 @@ interface Source : tachiyomi.source.Source {
|
||||
*/
|
||||
@Deprecated(
|
||||
"Use the 1.x API instead",
|
||||
ReplaceWith("getMangaDetails")
|
||||
ReplaceWith("getMangaDetails"),
|
||||
)
|
||||
fun fetchMangaDetails(manga: SManga): Observable<SManga> = throw IllegalStateException("Not used")
|
||||
|
||||
@@ -53,7 +53,7 @@ interface Source : tachiyomi.source.Source {
|
||||
*/
|
||||
@Deprecated(
|
||||
"Use the 1.x API instead",
|
||||
ReplaceWith("getChapterList")
|
||||
ReplaceWith("getChapterList"),
|
||||
)
|
||||
fun fetchChapterList(manga: SManga): Observable<List<SChapter>> = throw IllegalStateException("Not used")
|
||||
|
||||
@@ -65,7 +65,7 @@ interface Source : tachiyomi.source.Source {
|
||||
*/
|
||||
@Deprecated(
|
||||
"Use the 1.x API instead",
|
||||
ReplaceWith("getPageList")
|
||||
ReplaceWith("getPageList"),
|
||||
)
|
||||
fun fetchPageList(chapter: SChapter): Observable<List<Page>> = Observable.empty()
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ open class SourceManager(private val context: Context) {
|
||||
}
|
||||
|
||||
private fun createInternalSources(): List<Source> = listOf(
|
||||
LocalSource(context)
|
||||
LocalSource(context),
|
||||
)
|
||||
|
||||
inner class StubSource(override val id: Long) : Source {
|
||||
|
||||
@@ -68,13 +68,13 @@ open class Page(
|
||||
|
||||
fun Page.toPageUrl(): PageUrl {
|
||||
return PageUrl(
|
||||
url = this.imageUrl ?: this.url
|
||||
url = this.imageUrl ?: this.url,
|
||||
)
|
||||
}
|
||||
|
||||
fun PageUrl.toPage(index: Int): Page {
|
||||
return Page(
|
||||
index = index,
|
||||
imageUrl = this.url
|
||||
imageUrl = this.url,
|
||||
)
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ fun SChapter.toChapterInfo(): ChapterInfo {
|
||||
key = this.url,
|
||||
name = this.name,
|
||||
number = this.chapter_number,
|
||||
scanlator = this.scanlator ?: ""
|
||||
scanlator = this.scanlator ?: "",
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -75,7 +75,7 @@ fun SManga.toMangaInfo(): MangaInfo {
|
||||
description = this.description ?: "",
|
||||
genres = this.genre?.split(", ") ?: emptyList(),
|
||||
status = this.status,
|
||||
cover = this.thumbnail_url ?: ""
|
||||
cover = this.thumbnail_url ?: "",
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user