music: fix failing tests

Use generic Collection instead of Set to prevent the new DeviceLibrary
tests from failing.
This commit is contained in:
Alexander Capehart 2023-09-03 21:14:53 -06:00
parent a4e8c250a3
commit 23d474278a
No known key found for this signature in database
GPG key ID: 37DBE3621FE9AD47

View file

@ -258,10 +258,10 @@ class DeviceLibraryFactoryImpl @Inject constructor(private val musicSettings: Mu
// TODO: Avoid redundant data creation
class DeviceLibraryImpl(
override val songs: Set<SongImpl>,
override val albums: Set<AlbumImpl>,
override val artists: Set<ArtistImpl>,
override val genres: Set<GenreImpl>
override val songs: Collection<SongImpl>,
override val albums: Collection<AlbumImpl>,
override val artists: Collection<ArtistImpl>,
override val genres: Collection<GenreImpl>
) : DeviceLibrary {
// 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()) } }