mirror of
https://gitlab.com/ultrasonic/ultrasonic.git
synced 2025-04-16 17:22:23 +03:00
Make parentId nullable in TrackCollectionModel
This commit is contained in:
parent
e21ae1299b
commit
ee9c478bfe
@ -281,12 +281,12 @@ class TrackCollectionFragment : Fragment() {
|
||||
setTitle(name)
|
||||
if (!isOffline() && Util.getShouldUseId3Tags()) {
|
||||
if (isAlbum) {
|
||||
model.getAlbum(refresh, id!!, name, parentId!!)
|
||||
model.getAlbum(refresh, id!!, name, parentId)
|
||||
} else {
|
||||
model.getArtist(refresh, id!!, name)
|
||||
}
|
||||
} else {
|
||||
model.getMusicDirectory(refresh, id!!, name, parentId!!)
|
||||
model.getMusicDirectory(refresh, id!!, name, parentId)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -45,7 +45,7 @@ class TrackCollectionModel(application: Application) : GenericListModel(applicat
|
||||
refresh: Boolean,
|
||||
id: String,
|
||||
name: String?,
|
||||
parentId: String
|
||||
parentId: String?
|
||||
) {
|
||||
withContext(Dispatchers.IO) {
|
||||
|
||||
@ -53,7 +53,7 @@ class TrackCollectionModel(application: Application) : GenericListModel(applicat
|
||||
|
||||
var root = MusicDirectory()
|
||||
|
||||
if (allSongsId == id) {
|
||||
if (allSongsId == id && parentId != null) {
|
||||
val musicDirectory = service.getMusicDirectory(
|
||||
parentId, name, refresh
|
||||
)
|
||||
@ -152,7 +152,7 @@ class TrackCollectionModel(application: Application) : GenericListModel(applicat
|
||||
}
|
||||
}
|
||||
|
||||
suspend fun getAlbum(refresh: Boolean, id: String, name: String?, parentId: String) {
|
||||
suspend fun getAlbum(refresh: Boolean, id: String, name: String?, parentId: String?) {
|
||||
|
||||
withContext(Dispatchers.IO) {
|
||||
|
||||
@ -160,7 +160,7 @@ class TrackCollectionModel(application: Application) : GenericListModel(applicat
|
||||
|
||||
val musicDirectory: MusicDirectory
|
||||
|
||||
if (allSongsId == id) {
|
||||
if (allSongsId == id && parentId != null) {
|
||||
val root = MusicDirectory()
|
||||
|
||||
val songs: MutableCollection<MusicDirectory.Entry> = LinkedList()
|
||||
|
Loading…
x
Reference in New Issue
Block a user