playback: fix queue moves
Fix moving items with the new queue system. This took a bit of thinking, but I think this is the correct way to implement this in a future-proof manner.
This commit is contained in:
@@ -1,3 +1,20 @@
|
||||
/*
|
||||
* Copyright (c) 2023 Auxio Project
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package org.oxycblt.auxio.music.library
|
||||
|
||||
import org.oxycblt.auxio.music.Song
|
||||
@@ -5,10 +22,6 @@ import org.oxycblt.auxio.music.Song
|
||||
class LibraryTest {
|
||||
|
||||
companion object {
|
||||
val LIBRARY = listOf(
|
||||
Song.Raw(
|
||||
|
||||
)
|
||||
)
|
||||
val LIBRARY = listOf(Song.Raw())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,7 +30,8 @@ class ReleaseTypeTest {
|
||||
|
||||
@Test
|
||||
fun releaseType_parse_secondary() {
|
||||
assertEquals(ReleaseType.Compilation(null), ReleaseType.parse(listOf("album", "compilation")))
|
||||
assertEquals(
|
||||
ReleaseType.Compilation(null), ReleaseType.parse(listOf("album", "compilation")))
|
||||
assertEquals(ReleaseType.Soundtrack, ReleaseType.parse(listOf("album", "soundtrack")))
|
||||
assertEquals(ReleaseType.Mix, ReleaseType.parse(listOf("album", "dj-mix")))
|
||||
assertEquals(ReleaseType.Mixtape, ReleaseType.parse(listOf("album", "mixtape/street")))
|
||||
@@ -39,7 +40,8 @@ class ReleaseTypeTest {
|
||||
@Test
|
||||
fun releaseType_parse_modifiers() {
|
||||
assertEquals(
|
||||
ReleaseType.Album(ReleaseType.Refinement.LIVE), ReleaseType.parse(listOf("album", "live")))
|
||||
ReleaseType.Album(ReleaseType.Refinement.LIVE),
|
||||
ReleaseType.parse(listOf("album", "live")))
|
||||
assertEquals(
|
||||
ReleaseType.Album(ReleaseType.Refinement.REMIX),
|
||||
ReleaseType.parse(listOf("album", "remix")))
|
||||
@@ -75,7 +77,8 @@ class ReleaseTypeTest {
|
||||
|
||||
@Test
|
||||
fun releaseType_parse_orphanedModifier() {
|
||||
assertEquals(ReleaseType.Album(ReleaseType.Refinement.LIVE), ReleaseType.parse(listOf("live")))
|
||||
assertEquals(
|
||||
ReleaseType.Album(ReleaseType.Refinement.LIVE), ReleaseType.parse(listOf("live")))
|
||||
assertEquals(
|
||||
ReleaseType.Album(ReleaseType.Refinement.REMIX), ReleaseType.parse(listOf("remix")))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user