build: fix failure
Due to a sudden pivot to starting from repository backwards with playlists, there were some half-baked changesets lying around that I forgot to revert. Do that.
This commit is contained in:
parent
e4339a76bf
commit
c6898aa3cc
4 changed files with 7 additions and 9 deletions
|
@ -20,6 +20,7 @@ rather than on start/stop
|
||||||
- Fixed MP4-AAC files not playing due to an accidental audio extractor
|
- Fixed MP4-AAC files not playing due to an accidental audio extractor
|
||||||
deletion
|
deletion
|
||||||
- Fix "format" not appearing in song properties view
|
- Fix "format" not appearing in song properties view
|
||||||
|
- Fix visual bugs when editing duplicate songs in the queue
|
||||||
|
|
||||||
## 3.0.3
|
## 3.0.3
|
||||||
|
|
||||||
|
|
|
@ -144,11 +144,9 @@ interface Indexer {
|
||||||
*
|
*
|
||||||
* @param result The outcome of the music loading process.
|
* @param result The outcome of the music loading process.
|
||||||
*/
|
*/
|
||||||
data class Complete(val result: Result<Response>) : State()
|
data class Complete(val result: Result<Library>) : State()
|
||||||
}
|
}
|
||||||
|
|
||||||
data class Response(val result: Library, val playlists: List<Playlist>)
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents the current progress of the music loader. Usually encapsulated in a [State].
|
* Represents the current progress of the music loader. Usually encapsulated in a [State].
|
||||||
*
|
*
|
||||||
|
@ -239,7 +237,7 @@ constructor(
|
||||||
private val mediaStoreExtractor: MediaStoreExtractor,
|
private val mediaStoreExtractor: MediaStoreExtractor,
|
||||||
private val tagExtractor: TagExtractor
|
private val tagExtractor: TagExtractor
|
||||||
) : Indexer {
|
) : Indexer {
|
||||||
@Volatile private var lastResponse: Result<Indexer.Response>? = null
|
@Volatile private var lastResponse: Result<Library>? = null
|
||||||
@Volatile private var indexingState: Indexer.Indexing? = null
|
@Volatile private var indexingState: Indexer.Indexing? = null
|
||||||
@Volatile private var controller: Indexer.Controller? = null
|
@Volatile private var controller: Indexer.Controller? = null
|
||||||
@Volatile private var listener: Indexer.Listener? = null
|
@Volatile private var listener: Indexer.Listener? = null
|
||||||
|
@ -339,7 +337,7 @@ constructor(
|
||||||
context: Context,
|
context: Context,
|
||||||
withCache: Boolean,
|
withCache: Boolean,
|
||||||
scope: CoroutineScope
|
scope: CoroutineScope
|
||||||
): Indexer.Response {
|
): Library {
|
||||||
if (ContextCompat.checkSelfPermission(context, Indexer.PERMISSION_READ_AUDIO) ==
|
if (ContextCompat.checkSelfPermission(context, Indexer.PERMISSION_READ_AUDIO) ==
|
||||||
PackageManager.PERMISSION_DENIED) {
|
PackageManager.PERMISSION_DENIED) {
|
||||||
logE("Permission check failed")
|
logE("Permission check failed")
|
||||||
|
@ -397,7 +395,7 @@ constructor(
|
||||||
if (cache == null || cache.invalidated) {
|
if (cache == null || cache.invalidated) {
|
||||||
cacheRepository.writeCache(rawSongs)
|
cacheRepository.writeCache(rawSongs)
|
||||||
}
|
}
|
||||||
return Indexer.Response(libraryJob.await(), listOf())
|
return libraryJob.await()
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -428,7 +426,7 @@ constructor(
|
||||||
* @param result The new [Result] to emit, representing the outcome of the music loading
|
* @param result The new [Result] to emit, representing the outcome of the music loading
|
||||||
* process.
|
* process.
|
||||||
*/
|
*/
|
||||||
private suspend fun emitCompletion(result: Result<Indexer.Response>) {
|
private suspend fun emitCompletion(result: Result<Library>) {
|
||||||
yield()
|
yield()
|
||||||
// Swap to the Main thread so that downstream callbacks don't crash from being on
|
// Swap to the Main thread so that downstream callbacks don't crash from being on
|
||||||
// a background thread. Does not occur in emitIndexing due to efficiency reasons.
|
// a background thread. Does not occur in emitIndexing due to efficiency reasons.
|
||||||
|
|
|
@ -40,7 +40,7 @@ import org.oxycblt.auxio.playback.state.RepeatMode
|
||||||
entities = [PlaybackState::class, QueueHeapItem::class, QueueMappingItem::class],
|
entities = [PlaybackState::class, QueueHeapItem::class, QueueMappingItem::class],
|
||||||
version = 27,
|
version = 27,
|
||||||
exportSchema = false)
|
exportSchema = false)
|
||||||
@TypeConverters(Music.UID.Converter::class)
|
@TypeConverters(PersistenceDatabase.Converters::class)
|
||||||
abstract class PersistenceDatabase : RoomDatabase() {
|
abstract class PersistenceDatabase : RoomDatabase() {
|
||||||
/**
|
/**
|
||||||
* Get the current [PlaybackStateDao].
|
* Get the current [PlaybackStateDao].
|
||||||
|
|
|
@ -26,4 +26,3 @@ interface Playlist {
|
||||||
val name: String
|
val name: String
|
||||||
val songs: List<Song>
|
val songs: List<Song>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue