jel/Jel/Views/Item/ItemInfoView.swift

42 lines
771 B
Swift
Raw Normal View History

2023-12-25 01:01:52 +00:00
//
// ItemInfoView.swift
// Jel
//
// Created by zerocool on 12/24/23.
//
import SwiftUI
import JellyfinKit
struct ItemInfoView: View {
2024-01-08 00:20:56 +00:00
var item: BaseItemDto
2023-12-25 01:01:52 +00:00
var body: some View {
VStack(alignment: .leading) {
HStack {
2024-02-21 03:18:15 +00:00
if let productionYear = item.productionYear {
Text(String(productionYear))
}
if let genres = item.genres {
Text("")
Text(genres.first ?? "---")
}
2023-12-25 01:01:52 +00:00
}
2024-01-08 17:57:25 +00:00
HStack {
if item.type == .movie {
Text(item.getRuntime() ?? "-:--")
}
if let officialRating = item.officialRating {
2024-01-09 17:32:06 +00:00
TextRatingView(officialRating, fillStyle: .stroke)
2024-01-08 17:57:25 +00:00
}
}
2023-12-25 01:01:52 +00:00
}
.font(.caption)
}
}
//#Preview {
// ItemInfoView()
//}