Run linter

This commit is contained in:
arkon
2020-02-26 18:03:34 -05:00
parent 58ab06b4f8
commit 043e3784e8
331 changed files with 876 additions and 1075 deletions

View File

@@ -43,4 +43,4 @@ interface CatalogueSource : Source {
* Returns the list of filters for the source.
*/
fun getFilterList(): FilterList
}
}

View File

@@ -10,10 +10,6 @@ import eu.kanade.tachiyomi.util.lang.compareToCaseInsensitiveNaturalOrder
import eu.kanade.tachiyomi.util.storage.DiskUtil
import eu.kanade.tachiyomi.util.storage.EpubFile
import eu.kanade.tachiyomi.util.system.ImageUtil
import junrar.Archive
import junrar.rarfile.FileHeader
import rx.Observable
import timber.log.Timber
import java.io.File
import java.io.FileInputStream
import java.io.InputStream
@@ -22,6 +18,10 @@ import java.util.Scanner
import java.util.concurrent.TimeUnit
import java.util.zip.ZipEntry
import java.util.zip.ZipFile
import junrar.Archive
import junrar.rarfile.FileHeader
import rx.Observable
import timber.log.Timber
class LocalSource(private val context: Context) : CatalogueSource {
companion object {
@@ -255,5 +255,4 @@ class LocalSource(private val context: Context) : CatalogueSource {
data class Rar(val file: File) : Format()
data class Epub(val file: File) : Format()
}
}

View File

@@ -40,5 +40,4 @@ interface Source {
* @param chapter the chapter.
*/
fun fetchPageList(chapter: SChapter): Observable<List<Page>>
}
}

View File

@@ -20,8 +20,8 @@ sealed class Filter<T>(val name: String, var state: T) {
abstract class Group<V>(name: String, state: List<V>) : Filter<List<V>>(name, state)
abstract class Sort(name: String, val values: Array<String>, state: Selection? = null)
: Filter<Sort.Selection?>(name, state) {
abstract class Sort(name: String, val values: Array<String>, state: Selection? = null) :
Filter<Sort.Selection?>(name, state) {
data class Selection(val index: Int, val ascending: Boolean)
}
@@ -37,5 +37,4 @@ sealed class Filter<T>(val name: String, var state: T) {
result = 31 * result + (state?.hashCode() ?: 0)
return result
}
}

View File

@@ -3,5 +3,4 @@ package eu.kanade.tachiyomi.source.model
data class FilterList(val list: List<Filter<*>>) : List<Filter<*>> by list {
constructor(vararg fs: Filter<*>) : this(if (fs.isNotEmpty()) fs.asList() else emptyList())
}
}

View File

@@ -1,3 +1,3 @@
package eu.kanade.tachiyomi.source.model
data class MangasPage(val mangas: List<SManga>, val hasNextPage: Boolean)
data class MangasPage(val mangas: List<SManga>, val hasNextPage: Boolean)

View File

@@ -5,10 +5,10 @@ import eu.kanade.tachiyomi.network.ProgressListener
import rx.subjects.Subject
open class Page(
val index: Int,
val url: String = "",
var imageUrl: String? = null,
@Transient var uri: Uri? = null // Deprecated but can't be deleted due to extensions
val index: Int,
val url: String = "",
var imageUrl: String? = null,
@Transient var uri: Uri? = null // Deprecated but can't be deleted due to extensions
) : ProgressListener {
val number: Int
@@ -48,5 +48,4 @@ open class Page(
const val READY = 3
const val ERROR = 4
}
}

View File

@@ -27,5 +27,4 @@ interface SChapter : Serializable {
return SChapterImpl()
}
}
}
}

View File

@@ -11,5 +11,4 @@ class SChapterImpl : SChapter {
override var chapter_number: Float = -1f
override var scanlator: String? = null
}

View File

@@ -54,5 +54,4 @@ interface SManga : Serializable {
return SMangaImpl()
}
}
}
}

View File

@@ -19,5 +19,4 @@ class SMangaImpl : SManga {
override var thumbnail_url: String? = null
override var initialized: Boolean = false
}
}

View File

@@ -6,15 +6,15 @@ import eu.kanade.tachiyomi.network.asObservableSuccess
import eu.kanade.tachiyomi.network.newCallWithProgress
import eu.kanade.tachiyomi.source.CatalogueSource
import eu.kanade.tachiyomi.source.model.*
import java.net.URI
import java.net.URISyntaxException
import java.security.MessageDigest
import okhttp3.Headers
import okhttp3.OkHttpClient
import okhttp3.Request
import okhttp3.Response
import rx.Observable
import uy.kohesive.injekt.injectLazy
import java.net.URI
import java.net.URISyntaxException
import java.security.MessageDigest
/**
* A simple implementation for sources from a website.

View File

@@ -11,5 +11,4 @@ interface LoginSource : Source {
fun login(username: String, password: String): Observable<Boolean>
fun isAuthenticationSuccessful(response: Response): Boolean
}
}