Remove photos collections

This commit is contained in:
Jarne Demeulemeester 2021-07-20 14:53:27 +02:00
parent 6236bc2f91
commit 3d450ef203
No known key found for this signature in database
GPG key ID: 60884A0C1EBA43E5
2 changed files with 3 additions and 1 deletions

View file

@ -56,6 +56,8 @@ constructor(
val views: MutableList<View> = mutableListOf()
val userViews = jellyfinRepository.getUserViews()
for (view in userViews) {
Timber.d("Collection type: ${view.collectionType}")
if (view.collectionType == "homevideos") continue
val latestItems = jellyfinRepository.getLatestMedia(view.id)
if (latestItems.isEmpty()) continue
val v = view.toView()

View file

@ -23,7 +23,7 @@ constructor(
init {
viewModelScope.launch {
val items = jellyfinRepository.getItems()
_collections.value = items
_collections.value = items.filter { it.collectionType != "homevideos" }
_finishedLoading.value = true
}
}