Skip to content

Commit

Permalink
Merge branch 'jellyfin:main' into tvOSLetterPicker
Browse files Browse the repository at this point in the history
  • Loading branch information
JPKribs authored Jan 26, 2025
2 parents 8914395 + 35c39a8 commit 0ec5f9c
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,10 @@ class ItemImagesViewModel: ViewModel, Stateful, Eventful {

try await self.uploadPhoto(image, type: type)
try await self.getAllImages()

await MainActor.run {
self.eventSubject.send(.updated)
}
} catch {
let apiError = JellyfinAPIError(error.localizedDescription)
await MainActor.run {
Expand Down
6 changes: 3 additions & 3 deletions Shared/ViewModels/LibraryViewModel/ItemLibraryViewModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@ final class ItemLibraryViewModel: PagingLibraryViewModel<BaseItemDto> {
var includeItemTypes: [BaseItemKind] = [.movie, .series, .boxSet]
var isRecursive: Bool? = true

// TODO: determine `includeItemTypes` better
// - look at parent collection type if necessary
// - condense supported values
// TODO: this logic should be moved to a `LibraryParent` function
// that transforms a `GetItemsByUserIDParameters` struct, instead
// of having to do this case-by-case.

if let libraryType = parent?.libraryType, let id = parent?.id {
switch libraryType {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ import Foundation
import Get
import JellyfinAPI

// TODO: atow, this is only really used for tvOS tabs
// TODO: filtering on `itemTypes` should be moved to `ItemFilterCollection`,
// but there is additional logic based on the parent type, mainly `.folder`.
final class ItemTypeLibraryViewModel: PagingLibraryViewModel<BaseItemDto> {

let itemTypes: [BaseItemKind]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ protocol LibraryIdentifiable: Identifiable {
// on refresh. Should make bidirectional/offset index start?
// - use startIndex/index ranges instead of pages
// - source of data doesn't guarantee that all items in 0 ..< startIndex exist
// TODO: have `filterViewModel` be private to the parent and the `get_` overrides recieve the
// current filters as a parameter

/*
Note: if `rememberSort == true`, then will override given filters with stored sorts
Expand Down

0 comments on commit 0ec5f9c

Please sign in to comment.