Hide music, collections and playlists
This commit is contained in:
parent
a91a8ba72f
commit
c1305abbe8
2 changed files with 11 additions and 2 deletions
|
@ -57,7 +57,10 @@ constructor(
|
||||||
val userViews = jellyfinRepository.getUserViews()
|
val userViews = jellyfinRepository.getUserViews()
|
||||||
for (view in userViews) {
|
for (view in userViews) {
|
||||||
Timber.d("Collection type: ${view.collectionType}")
|
Timber.d("Collection type: ${view.collectionType}")
|
||||||
if (view.collectionType == "homevideos") continue
|
if (view.collectionType == "homevideos" ||
|
||||||
|
view.collectionType == "music" ||
|
||||||
|
view.collectionType == "playlists"
|
||||||
|
) continue
|
||||||
val latestItems = jellyfinRepository.getLatestMedia(view.id)
|
val latestItems = jellyfinRepository.getLatestMedia(view.id)
|
||||||
if (latestItems.isEmpty()) continue
|
if (latestItems.isEmpty()) continue
|
||||||
val v = view.toView()
|
val v = view.toView()
|
||||||
|
|
|
@ -23,7 +23,13 @@ constructor(
|
||||||
init {
|
init {
|
||||||
viewModelScope.launch {
|
viewModelScope.launch {
|
||||||
val items = jellyfinRepository.getItems()
|
val items = jellyfinRepository.getItems()
|
||||||
_collections.value = items.filter { it.collectionType != "homevideos" }
|
_collections.value =
|
||||||
|
items.filter {
|
||||||
|
it.collectionType != "homevideos" &&
|
||||||
|
it.collectionType != "music" &&
|
||||||
|
it.collectionType != "playlists" &&
|
||||||
|
it.collectionType != "boxsets"
|
||||||
|
}
|
||||||
_finishedLoading.value = true
|
_finishedLoading.value = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue