mirror of
https://github.com/ultrasonic/ultrasonic
synced 2025-04-12 17:42:31 +02:00
Make Entry always have an id
This commit is contained in:
parent
3257fb9153
commit
b30584f99c
@ -73,12 +73,11 @@ class TrackCollectionModel(application: Application) : GenericListModel(applicat
|
|||||||
musicDirectory.findChild(allSongsId) == null &&
|
musicDirectory.findChild(allSongsId) == null &&
|
||||||
hasOnlyFolders(musicDirectory)
|
hasOnlyFolders(musicDirectory)
|
||||||
) {
|
) {
|
||||||
val allSongs = MusicDirectory.Entry()
|
val allSongs = MusicDirectory.Entry(allSongsId)
|
||||||
|
|
||||||
allSongs.isDirectory = true
|
allSongs.isDirectory = true
|
||||||
allSongs.artist = name
|
allSongs.artist = name
|
||||||
allSongs.parent = id
|
allSongs.parent = id
|
||||||
allSongs.id = allSongsId
|
|
||||||
allSongs.title = String.format(
|
allSongs.title = String.format(
|
||||||
context.resources.getString(R.string.select_album_all_songs), name
|
context.resources.getString(R.string.select_album_all_songs), name
|
||||||
)
|
)
|
||||||
@ -135,12 +134,11 @@ class TrackCollectionModel(application: Application) : GenericListModel(applicat
|
|||||||
musicDirectory.findChild(allSongsId) == null &&
|
musicDirectory.findChild(allSongsId) == null &&
|
||||||
hasOnlyFolders(musicDirectory)
|
hasOnlyFolders(musicDirectory)
|
||||||
) {
|
) {
|
||||||
val allSongs = MusicDirectory.Entry()
|
val allSongs = MusicDirectory.Entry(allSongsId)
|
||||||
|
|
||||||
allSongs.isDirectory = true
|
allSongs.isDirectory = true
|
||||||
allSongs.artist = name
|
allSongs.artist = name
|
||||||
allSongs.parent = id
|
allSongs.parent = id
|
||||||
allSongs.id = allSongsId
|
|
||||||
allSongs.title = String.format(
|
allSongs.title = String.format(
|
||||||
context.resources.getString(R.string.select_album_all_songs), name
|
context.resources.getString(R.string.select_album_all_songs), name
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user