Shav Kinderlehrer
33b07566cb
Some metadata sources use '<br>' instead of '\n' for newlines. This fixes that for the most part.
31 lines
595 B
Swift
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())
|
|
//}
|