musikr: tweak api
This commit is contained in:
parent
9166580703
commit
710e279d8f
2 changed files with 8 additions and 8 deletions
|
@ -30,6 +30,12 @@ interface MutableCovers : Covers {
|
||||||
suspend fun cleanup(excluding: Collection<Cover>)
|
suspend fun cleanup(excluding: Collection<Cover>)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sealed interface ObtainResult<T : Cover> {
|
||||||
|
data class Hit<T : Cover>(val cover: T) : ObtainResult<T>
|
||||||
|
|
||||||
|
class Miss<T : Cover> : ObtainResult<T>
|
||||||
|
}
|
||||||
|
|
||||||
interface Cover {
|
interface Cover {
|
||||||
val id: String
|
val id: String
|
||||||
|
|
||||||
|
@ -47,10 +53,4 @@ class CoverCollection private constructor(val covers: List<Cover>) {
|
||||||
.sortedByDescending { it.value.size }
|
.sortedByDescending { it.value.size }
|
||||||
.map { it.value.first() })
|
.map { it.value.first() })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
sealed interface ObtainResult<T : Cover> {
|
|
||||||
data class Hit<T : Cover>(val cover: T) : ObtainResult<T>
|
|
||||||
|
|
||||||
class Miss<T : Cover> : ObtainResult<T>
|
|
||||||
}
|
|
|
@ -20,7 +20,7 @@ package org.oxycblt.musikr.metadata
|
||||||
|
|
||||||
import org.oxycblt.musikr.util.correctWhitespace
|
import org.oxycblt.musikr.util.correctWhitespace
|
||||||
|
|
||||||
class NativeTagMap {
|
internal class NativeTagMap {
|
||||||
private val map = mutableMapOf<String, List<String>>()
|
private val map = mutableMapOf<String, List<String>>()
|
||||||
|
|
||||||
fun addID(id: String, value: String) {
|
fun addID(id: String, value: String) {
|
||||||
|
|
Loading…
Reference in a new issue