Add fallback blur hash (causes crashes if blank)
This commit is contained in:
parent
5fbe2a4a3d
commit
25e271fe88
|
@ -112,6 +112,8 @@ class DeviceProfileBuilder {
|
||||||
subtitleProfiles.append(SubtitleProfile(format: "subrip", method: .embed))
|
subtitleProfiles.append(SubtitleProfile(format: "subrip", method: .embed))
|
||||||
subtitleProfiles.append(SubtitleProfile(format: "sub", method: .embed))
|
subtitleProfiles.append(SubtitleProfile(format: "sub", method: .embed))
|
||||||
subtitleProfiles.append(SubtitleProfile(format: "pgssub", method: .embed))
|
subtitleProfiles.append(SubtitleProfile(format: "pgssub", method: .embed))
|
||||||
|
|
||||||
|
//These need to be filtered. Most subrips are embedded. I hate subtitles.
|
||||||
subtitleProfiles.append(SubtitleProfile(format: "subrip", method: .external))
|
subtitleProfiles.append(SubtitleProfile(format: "subrip", method: .external))
|
||||||
subtitleProfiles.append(SubtitleProfile(format: "sub", method: .external))
|
subtitleProfiles.append(SubtitleProfile(format: "sub", method: .external))
|
||||||
subtitleProfiles.append(SubtitleProfile(format: "ass", method: .external))
|
subtitleProfiles.append(SubtitleProfile(format: "ass", method: .external))
|
||||||
|
|
|
@ -26,7 +26,7 @@ struct ImageView: View {
|
||||||
var body: some View {
|
var body: some View {
|
||||||
LazyImage(source: source)
|
LazyImage(source: source)
|
||||||
.placeholder {
|
.placeholder {
|
||||||
Image(uiImage: UIImage(blurHash: blurhash, size: CGSize(width: 8, height: 8))!)
|
Image(uiImage: UIImage(blurHash: blurhash, size: CGSize(width: 8, height: 8)) ?? UIImage(blurHash: "001fC^", size: CGSize(width:8,height:8))!)
|
||||||
.resizable()
|
.resizable()
|
||||||
}
|
}
|
||||||
.failure {
|
.failure {
|
||||||
|
|
Loading…
Reference in New Issue