all: misc cleanup
This commit is contained in:
parent
993dbbf8c1
commit
93a602b592
2 changed files with 3 additions and 6 deletions
|
@ -26,7 +26,6 @@ import kotlinx.coroutines.Dispatchers
|
||||||
import kotlinx.coroutines.sync.Mutex
|
import kotlinx.coroutines.sync.Mutex
|
||||||
import kotlinx.coroutines.sync.withLock
|
import kotlinx.coroutines.sync.withLock
|
||||||
import kotlinx.coroutines.withContext
|
import kotlinx.coroutines.withContext
|
||||||
import timber.log.Timber as L
|
|
||||||
|
|
||||||
internal interface CoverFiles {
|
internal interface CoverFiles {
|
||||||
suspend fun read(id: String): InputStream?
|
suspend fun read(id: String): InputStream?
|
||||||
|
@ -39,10 +38,8 @@ internal interface CoverFiles {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private class CoverFilesImpl(
|
private class CoverFilesImpl(private val dir: File, private val coverFormat: CoverFormat) :
|
||||||
private val dir: File,
|
CoverFiles {
|
||||||
private val coverFormat: CoverFormat
|
|
||||||
) : CoverFiles {
|
|
||||||
private val fileMutexes = mutableMapOf<String, Mutex>()
|
private val fileMutexes = mutableMapOf<String, Mutex>()
|
||||||
private val mapMutex = Mutex()
|
private val mapMutex = Mutex()
|
||||||
|
|
||||||
|
|
|
@ -68,7 +68,7 @@ void JVMMetadataBuilder::setMp4(const TagLib::MP4::Tag &tag) {
|
||||||
if (type == TagLib::MP4::Item::Type::IntPair) {
|
if (type == TagLib::MP4::Item::Type::IntPair) {
|
||||||
// It's inefficient going from the integer representation back into
|
// It's inefficient going from the integer representation back into
|
||||||
// a string, but I fully expect taggers to just write "NN/TT" strings
|
// a string, but I fully expect taggers to just write "NN/TT" strings
|
||||||
// anyway.
|
// anyway, and musikr doesn't have to do as much fiddly variant handling.
|
||||||
auto value = std::to_string(itemValue.toIntPair().first) + "/" +
|
auto value = std::to_string(itemValue.toIntPair().first) + "/" +
|
||||||
std::to_string(itemValue.toIntPair().second);
|
std::to_string(itemValue.toIntPair().second);
|
||||||
id3v2.add(itemName, value);
|
id3v2.add(itemName, value);
|
||||||
|
|
Loading…
Reference in a new issue