mirror of
https://github.com/jellyfin/Swiftfin.git
synced 2024-11-24 06:29:47 +00:00
37 lines
868 B
Swift
37 lines
868 B
Swift
//
|
|
// ItemView.swift
|
|
// JellyfinPlayer
|
|
//
|
|
// Created by Aiden Vigue on 5/10/21.
|
|
//
|
|
|
|
import SwiftUI
|
|
import SwiftyRequest
|
|
import SwiftyJSON
|
|
import Introspect
|
|
import SDWebImageSwiftUI
|
|
|
|
struct ItemView: View {
|
|
@EnvironmentObject var globalData: GlobalData
|
|
@State private var isLoading: Bool = false;
|
|
var item: ResumeItem;
|
|
|
|
init(item: ResumeItem) {
|
|
self.item = item;
|
|
}
|
|
|
|
var body: some View {
|
|
if(item.Type == "Movie") {
|
|
MovieItemView(item: self.item)
|
|
} else if(item.Type == "Season") {
|
|
SeasonItemView(item: self.item)
|
|
} else if(item.Type == "Series") {
|
|
SeriesItemView(item: self.item)
|
|
} else if(item.Type == "Episode") {
|
|
EpisodeItemView(item: self.item)
|
|
} else {
|
|
Text("Type: \(item.Type) not implemented yet :(")
|
|
}
|
|
}
|
|
}
|