Skip to content

Commit a17197a

Browse files
committed
Clean up a few warnings
1 parent ed0e8a5 commit a17197a

File tree

5 files changed

+5
-6
lines changed

5 files changed

+5
-6
lines changed

src/main/kotlin/org/abimon/eternalJukebox/FuelExtensions.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ val Request.progressCallback: ((Long, Long) -> Unit)?
4343
return progressCallbackProperty.call(task)
4444
}
4545

46-
@Suppress("UNCHECKED_CAST")
46+
@Suppress("UNCHECKED_CAST", "UNUSED_PARAMETER")
4747
operator fun <C: Any, T> KClass<C>.get(property: String, returnClass: Class<T>): KProperty<T> {
4848
val field = this.declaredMemberProperties.firstOrNull { field -> field.name == property } ?: throw NoSuchFieldException(property)
4949
field.isAccessible = true

src/main/kotlin/org/abimon/eternalJukebox/data/storage/LocalStorage.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ object LocalStorage : IStorage {
1414

1515
override fun shouldStore(type: EnumStorageType): Boolean = true
1616

17-
override fun store(name: String, type: EnumStorageType, data: DataSource, mime: String, clientInfo: ClientInfo?): Boolean {
17+
override fun store(name: String, type: EnumStorageType, data: DataSource, mimeType: String, clientInfo: ClientInfo?): Boolean {
1818
FileOutputStream(File(storageLocations[type]!!, name)).use { fos -> data.use { inputStream -> inputStream.copyTo(fos) } }
1919
return true
2020
}

src/main/kotlin/org/abimon/eternalJukebox/handlers/api/AudioAPI.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,6 @@ object AudioAPI : IAPI {
218218
}
219219
} else {
220220
val file = context.fileUploads().first()
221-
val newName = UUID.randomUUID().toString()
222221

223222
val ffmpegLog = File("${file.fileName()}-$uuid.log")
224223
val starting = File(file.uploadedFileName())

src/main/kotlin/org/abimon/eternalJukebox/handlers/api/ProfileAPI.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,8 +189,8 @@ object ProfileAPI : IAPI {
189189

190190
if(responseA.statusCode == 401) {
191191
log("Refreshing ${account.eternalID}/${account.googleID}'s account")
192-
193-
val (requestRefresh, responseRefresh) = Fuel.post("https://www.googleapis.com/oauth2/v4/token", listOf(
192+
193+
val (_, responseRefresh) = Fuel.post("https://www.googleapis.com/oauth2/v4/token", listOf(
194194
"refresh_token" to account.googleRefreshToken,
195195
"client_id" to googleClient,
196196
"client_secret" to googleSecret,

src/main/kotlin/org/abimon/eternalJukebox/objects/EmptyDataAPI.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ object EmptyDataAPI: IAnalyser, IAudioSource, IDatabase, IStorage, IAnalyticsSto
1515
override fun search(query: String, clientInfo: ClientInfo?): Array<JukeboxInfo> = emptyArray()
1616
override fun provide(info: JukeboxInfo, clientInfo: ClientInfo?): DataSource? = null
1717
override fun analyse(id: String, clientInfo: ClientInfo?): JukeboxTrack? = null
18-
override fun store(name: String, type: EnumStorageType, data: DataSource, mime: String, clientInfo: ClientInfo?): Boolean = false
18+
override fun store(name: String, type: EnumStorageType, data: DataSource, mimeType: String, clientInfo: ClientInfo?): Boolean = false
1919
override fun getInfo(id: String, clientInfo: ClientInfo?): JukeboxInfo? = null
2020
override fun provide(name: String, type: EnumStorageType, clientInfo: ClientInfo?): DataSource? = null
2121
override fun provide(name: String, type: EnumStorageType, context: RoutingContext, clientInfo: ClientInfo?): Boolean = false

0 commit comments

Comments
 (0)