jel/Jel/Views/Item/ItemMediaView.swift
Shav Kinderlehrer 33b07566cb Revamp EpisodeIconView + format item.overview properly
Some metadata sources use '<br>' instead of '\n' for newlines.
This fixes that for the most part.
2024-02-22 14:13:53 -05:00

31 lines
595 B
Swift

//
// ItemMediaView.swift
// Jel
//
// Created by zerocool on 12/23/23.
//
import SwiftUI
import JellyfinKit
import ExpandableText
struct ItemMediaView: View {
var item: BaseItemDto
var body: some View {
VStack(alignment: .leading) {
Text(item.taglines?.count ?? 0 > 0 ? item.taglines?[0] ?? "" : "")
.font(.headline)
.frame(maxWidth: .infinity, alignment: .leading)
ExpandableText((item.overviewNL ?? "").replacingOccurrences(of: "<br>", with: ""))
.lineLimit(8)
}
}
}
//#Preview {
// ItemMovieView(item: BaseItemDto())
//}