20 lines
485 B
Swift
20 lines
485 B
Swift
import LuminateCore
|
|
|
|
class AppState: ObservableObject {
|
|
@Published var activePlayerItem: Components.Schemas.BaseItemDto?
|
|
@Published var client: JellyfinClient
|
|
@Published var userId: String
|
|
|
|
init(client: JellyfinClient, userId: String) {
|
|
self.client = client
|
|
self.userId = userId
|
|
}
|
|
|
|
func startPlayback(item: Components.Schemas.BaseItemDto) {
|
|
activePlayerItem = item
|
|
}
|
|
|
|
func stopPlayback() {
|
|
activePlayerItem = nil
|
|
}
|
|
}
|