mirror of
https://github.com/Suwayomi/Suwayomi-Server.git
synced 2026-07-10 22:34:33 -05:00
fix compile warnings
This commit is contained in:
@@ -47,7 +47,7 @@ object Category {
|
||||
/**
|
||||
* Move the category from position `from` to `to`
|
||||
*/
|
||||
fun reorderCategory(categoryId: Int, from: Int, to: Int) {
|
||||
fun reorderCategory(from: Int, to: Int) {
|
||||
transaction {
|
||||
val categories = CategoryTable.selectAll().orderBy(CategoryTable.order to SortOrder.ASC).toMutableList()
|
||||
categories.add(to - 1, categories.removeAt(from - 1))
|
||||
|
||||
@@ -20,15 +20,18 @@ object Search {
|
||||
}
|
||||
|
||||
// TODO
|
||||
@Suppress("UNUSED_PARAMETER", "UNUSED_VARIABLE")
|
||||
fun sourceFilters(sourceId: Long) {
|
||||
val source = getHttpSource(sourceId)
|
||||
// source.getFilterList().toItems()
|
||||
}
|
||||
|
||||
@Suppress("UNUSED_PARAMETER")
|
||||
fun sourceGlobalSearch(searchTerm: String) {
|
||||
// TODO
|
||||
}
|
||||
|
||||
@Suppress("unused")
|
||||
data class FilterWrapper(
|
||||
val type: String,
|
||||
val filter: Any
|
||||
|
||||
@@ -141,6 +141,7 @@ object LegacyBackupImport : LegacyBackupBase() {
|
||||
* @param history history data from json
|
||||
* @param tracks tracking data from json
|
||||
*/
|
||||
@Suppress("UNUSED_PARAMETER")
|
||||
private suspend fun restoreMangaData(
|
||||
manga: Manga,
|
||||
source: Source,
|
||||
@@ -204,6 +205,7 @@ object LegacyBackupImport : LegacyBackupBase() {
|
||||
return fetchedManga
|
||||
}
|
||||
|
||||
@Suppress("UNUSED_PARAMETER") // TODO: remove this suppress when update Chapters is written
|
||||
private fun updateChapters(source: Source, fetchedManga: SManga, chapters: List<Chapter>) {
|
||||
// TODO("Not yet implemented")
|
||||
}
|
||||
|
||||
@@ -42,11 +42,11 @@ object LegacyBackupValidator {
|
||||
.sorted()
|
||||
}
|
||||
|
||||
val trackers = mangas
|
||||
.filter { it.asJsonObject.has("track") }
|
||||
.flatMap { it.asJsonObject["track"].asJsonArray }
|
||||
.map { it.asJsonObject["s"].asInt }
|
||||
.distinct()
|
||||
// val trackers = mangas
|
||||
// .filter { it.asJsonObject.has("track") }
|
||||
// .flatMap { it.asJsonObject["track"].asJsonArray }
|
||||
// .map { it.asJsonObject["s"].asInt }
|
||||
// .distinct()
|
||||
|
||||
val missingTrackers = listOf("")
|
||||
// val missingTrackers = trackers
|
||||
|
||||
@@ -85,7 +85,7 @@ object BytecodeEditor {
|
||||
bytes[2],
|
||||
bytes[3]
|
||||
)
|
||||
if (cafebabe.toLowerCase() != "cafebabe") {
|
||||
if (cafebabe.lowercase() != "cafebabe") {
|
||||
// Corrupted class
|
||||
return@use null
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user