music: fix failing tests
Use generic Collection instead of Set to prevent the new DeviceLibrary tests from failing.
This commit is contained in:
@@ -258,10 +258,10 @@ class DeviceLibraryFactoryImpl @Inject constructor(private val musicSettings: Mu
|
|||||||
// TODO: Avoid redundant data creation
|
// TODO: Avoid redundant data creation
|
||||||
|
|
||||||
class DeviceLibraryImpl(
|
class DeviceLibraryImpl(
|
||||||
override val songs: Set<SongImpl>,
|
override val songs: Collection<SongImpl>,
|
||||||
override val albums: Set<AlbumImpl>,
|
override val albums: Collection<AlbumImpl>,
|
||||||
override val artists: Set<ArtistImpl>,
|
override val artists: Collection<ArtistImpl>,
|
||||||
override val genres: Set<GenreImpl>
|
override val genres: Collection<GenreImpl>
|
||||||
) : DeviceLibrary {
|
) : DeviceLibrary {
|
||||||
// Use a mapping to make finding information based on it's UID much faster.
|
// Use a mapping to make finding information based on it's UID much faster.
|
||||||
private val songUidMap = buildMap { songs.forEach { put(it.uid, it.finalize()) } }
|
private val songUidMap = buildMap { songs.forEach { put(it.uid, it.finalize()) } }
|
||||||
|
|||||||
Reference in New Issue
Block a user