modify LatestMediaViewModel.requestLatestMedia params
fix build error
This commit is contained in:
parent
fad8f14a21
commit
a46ed45925
|
@ -16,13 +16,11 @@ struct LatestMediaView: View {
|
|||
ScrollView(.horizontal, showsIndicators: false) {
|
||||
LazyHStack {
|
||||
ForEach(viewModel.items, id: \.id) { item in
|
||||
if item.type == "Series" || item.type == "Movie" {
|
||||
Button {
|
||||
homeRouter.route(to: \.item, item)
|
||||
} label: {
|
||||
PortraitItemView(item: item)
|
||||
}
|
||||
}
|
||||
}.padding(.trailing, 16)
|
||||
}.padding(.leading, 20)
|
||||
}.frame(height: 200)
|
||||
|
|
|
@ -26,7 +26,8 @@ final class LatestMediaViewModel: ViewModel {
|
|||
|
||||
func requestLatestMedia() {
|
||||
LogManager.shared.log.debug("Requesting latest media for user id \(SessionManager.current.user.user_id ?? "NIL")")
|
||||
UserLibraryAPI.getLatestMedia(userId: SessionManager.current.user.user_id!, parentId: libraryID,
|
||||
UserLibraryAPI.getLatestMedia(userId: SessionManager.current.user.user_id!,
|
||||
parentId: libraryID,
|
||||
fields: [
|
||||
.primaryImageAspectRatio,
|
||||
.seriesPrimaryImage,
|
||||
|
@ -35,6 +36,7 @@ final class LatestMediaViewModel: ViewModel {
|
|||
.genres,
|
||||
.people
|
||||
],
|
||||
includeItemTypes: ["Series", "Movie"],
|
||||
enableUserData: true, limit: 12)
|
||||
.trackActivity(loading)
|
||||
.sink(receiveCompletion: { [weak self] completion in
|
||||
|
|
Loading…
Reference in New Issue