push
This commit is contained in:
parent
c5b2a3ce0c
commit
30e2b9d028
|
@ -1099,7 +1099,7 @@
|
||||||
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
|
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
|
||||||
CODE_SIGN_ENTITLEMENTS = "JellyfinPlayer tvOS/JellyfinPlayer tvOS.entitlements";
|
CODE_SIGN_ENTITLEMENTS = "JellyfinPlayer tvOS/JellyfinPlayer tvOS.entitlements";
|
||||||
CODE_SIGN_STYLE = Automatic;
|
CODE_SIGN_STYLE = Automatic;
|
||||||
CURRENT_PROJECT_VERSION = 54;
|
CURRENT_PROJECT_VERSION = 55;
|
||||||
DEVELOPMENT_ASSET_PATHS = "\"JellyfinPlayer tvOS/Preview Content\"";
|
DEVELOPMENT_ASSET_PATHS = "\"JellyfinPlayer tvOS/Preview Content\"";
|
||||||
DEVELOPMENT_TEAM = 9R8RREG67J;
|
DEVELOPMENT_TEAM = 9R8RREG67J;
|
||||||
ENABLE_PREVIEWS = YES;
|
ENABLE_PREVIEWS = YES;
|
||||||
|
@ -1127,7 +1127,7 @@
|
||||||
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
|
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
|
||||||
CODE_SIGN_ENTITLEMENTS = "JellyfinPlayer tvOS/JellyfinPlayer tvOS.entitlements";
|
CODE_SIGN_ENTITLEMENTS = "JellyfinPlayer tvOS/JellyfinPlayer tvOS.entitlements";
|
||||||
CODE_SIGN_STYLE = Automatic;
|
CODE_SIGN_STYLE = Automatic;
|
||||||
CURRENT_PROJECT_VERSION = 54;
|
CURRENT_PROJECT_VERSION = 55;
|
||||||
DEVELOPMENT_ASSET_PATHS = "\"JellyfinPlayer tvOS/Preview Content\"";
|
DEVELOPMENT_ASSET_PATHS = "\"JellyfinPlayer tvOS/Preview Content\"";
|
||||||
DEVELOPMENT_TEAM = 9R8RREG67J;
|
DEVELOPMENT_TEAM = 9R8RREG67J;
|
||||||
ENABLE_PREVIEWS = YES;
|
ENABLE_PREVIEWS = YES;
|
||||||
|
@ -1276,7 +1276,7 @@
|
||||||
CODE_SIGN_ENTITLEMENTS = JellyfinPlayer/JellyfinPlayer.entitlements;
|
CODE_SIGN_ENTITLEMENTS = JellyfinPlayer/JellyfinPlayer.entitlements;
|
||||||
CODE_SIGN_IDENTITY = "Apple Development";
|
CODE_SIGN_IDENTITY = "Apple Development";
|
||||||
CODE_SIGN_STYLE = Automatic;
|
CODE_SIGN_STYLE = Automatic;
|
||||||
CURRENT_PROJECT_VERSION = 54;
|
CURRENT_PROJECT_VERSION = 55;
|
||||||
DEVELOPMENT_ASSET_PATHS = "";
|
DEVELOPMENT_ASSET_PATHS = "";
|
||||||
DEVELOPMENT_TEAM = 9R8RREG67J;
|
DEVELOPMENT_TEAM = 9R8RREG67J;
|
||||||
ENABLE_BITCODE = NO;
|
ENABLE_BITCODE = NO;
|
||||||
|
@ -1310,7 +1310,7 @@
|
||||||
CODE_SIGN_ENTITLEMENTS = JellyfinPlayer/JellyfinPlayer.entitlements;
|
CODE_SIGN_ENTITLEMENTS = JellyfinPlayer/JellyfinPlayer.entitlements;
|
||||||
CODE_SIGN_IDENTITY = "Apple Development";
|
CODE_SIGN_IDENTITY = "Apple Development";
|
||||||
CODE_SIGN_STYLE = Automatic;
|
CODE_SIGN_STYLE = Automatic;
|
||||||
CURRENT_PROJECT_VERSION = 54;
|
CURRENT_PROJECT_VERSION = 55;
|
||||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||||
DEVELOPMENT_ASSET_PATHS = "";
|
DEVELOPMENT_ASSET_PATHS = "";
|
||||||
DEVELOPMENT_TEAM = 9R8RREG67J;
|
DEVELOPMENT_TEAM = 9R8RREG67J;
|
||||||
|
@ -1342,7 +1342,7 @@
|
||||||
ASSETCATALOG_COMPILER_WIDGET_BACKGROUND_COLOR_NAME = WidgetBackground;
|
ASSETCATALOG_COMPILER_WIDGET_BACKGROUND_COLOR_NAME = WidgetBackground;
|
||||||
CODE_SIGN_ENTITLEMENTS = WidgetExtension/WidgetExtension.entitlements;
|
CODE_SIGN_ENTITLEMENTS = WidgetExtension/WidgetExtension.entitlements;
|
||||||
CODE_SIGN_STYLE = Automatic;
|
CODE_SIGN_STYLE = Automatic;
|
||||||
CURRENT_PROJECT_VERSION = 54;
|
CURRENT_PROJECT_VERSION = 55;
|
||||||
DEVELOPMENT_TEAM = 9R8RREG67J;
|
DEVELOPMENT_TEAM = 9R8RREG67J;
|
||||||
INFOPLIST_FILE = WidgetExtension/Info.plist;
|
INFOPLIST_FILE = WidgetExtension/Info.plist;
|
||||||
IPHONEOS_DEPLOYMENT_TARGET = 14.1;
|
IPHONEOS_DEPLOYMENT_TARGET = 14.1;
|
||||||
|
@ -1367,7 +1367,7 @@
|
||||||
ASSETCATALOG_COMPILER_WIDGET_BACKGROUND_COLOR_NAME = WidgetBackground;
|
ASSETCATALOG_COMPILER_WIDGET_BACKGROUND_COLOR_NAME = WidgetBackground;
|
||||||
CODE_SIGN_ENTITLEMENTS = WidgetExtension/WidgetExtension.entitlements;
|
CODE_SIGN_ENTITLEMENTS = WidgetExtension/WidgetExtension.entitlements;
|
||||||
CODE_SIGN_STYLE = Automatic;
|
CODE_SIGN_STYLE = Automatic;
|
||||||
CURRENT_PROJECT_VERSION = 54;
|
CURRENT_PROJECT_VERSION = 55;
|
||||||
DEVELOPMENT_TEAM = 9R8RREG67J;
|
DEVELOPMENT_TEAM = 9R8RREG67J;
|
||||||
INFOPLIST_FILE = WidgetExtension/Info.plist;
|
INFOPLIST_FILE = WidgetExtension/Info.plist;
|
||||||
IPHONEOS_DEPLOYMENT_TARGET = 14.1;
|
IPHONEOS_DEPLOYMENT_TARGET = 14.1;
|
||||||
|
|
|
@ -0,0 +1,86 @@
|
||||||
|
//
|
||||||
|
/*
|
||||||
|
* SwiftFin is subject to the terms of the Mozilla Public
|
||||||
|
* License, v2.0. If a copy of the MPL was not distributed with this
|
||||||
|
* file, you can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
|
*
|
||||||
|
* Copyright 2021 Aiden Vigue & Jellyfin Contributors
|
||||||
|
*/
|
||||||
|
|
||||||
|
import SwiftUI
|
||||||
|
import JellyfinAPI
|
||||||
|
struct PortraitItemView: View {
|
||||||
|
var item: BaseItemDto
|
||||||
|
|
||||||
|
var body: some View {
|
||||||
|
NavigationLink(destination: LazyView { ItemView(item: item) }) {
|
||||||
|
VStack(alignment: .leading) {
|
||||||
|
ImageView(src: item.type != "Episode" ? item.getPrimaryImage(maxWidth: 100) : item.getSeriesPrimaryImage(maxWidth: 100), bh: item.type != "Episode" ? item.getPrimaryImageBlurHash() : item.getSeriesPrimaryImageBlurHash())
|
||||||
|
.frame(width: 100, height: 150)
|
||||||
|
.cornerRadius(10)
|
||||||
|
.shadow(radius: 4)
|
||||||
|
.overlay(
|
||||||
|
Rectangle()
|
||||||
|
.fill(Color(red: 172/255, green: 92/255, blue: 195/255))
|
||||||
|
.mask(ProgressBar())
|
||||||
|
.frame(width: CGFloat(item.userData?.playedPercentage ?? 0), height: 7)
|
||||||
|
.padding(0), alignment: .bottomLeading
|
||||||
|
)
|
||||||
|
.overlay(
|
||||||
|
ZStack {
|
||||||
|
if item.userData?.isFavorite ?? false {
|
||||||
|
Image(systemName: "circle.fill")
|
||||||
|
.foregroundColor(.white)
|
||||||
|
.opacity(0.6)
|
||||||
|
Image(systemName: "heart.fill")
|
||||||
|
.foregroundColor(Color(.systemRed))
|
||||||
|
.font(.system(size: 10))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.padding(.leading, 2)
|
||||||
|
.padding(.bottom, item.userData?.playedPercentage == nil ? 2 : 9)
|
||||||
|
.opacity(1)
|
||||||
|
, alignment: .bottomLeading)
|
||||||
|
.overlay(
|
||||||
|
ZStack {
|
||||||
|
if item.userData?.played ?? false {
|
||||||
|
Image(systemName: "circle.fill")
|
||||||
|
.foregroundColor(.white)
|
||||||
|
Image(systemName: "checkmark.circle.fill")
|
||||||
|
.foregroundColor(Color(.systemBlue))
|
||||||
|
} else {
|
||||||
|
if(item.userData?.unplayedItemCount != nil) {
|
||||||
|
Image(systemName: "circle.fill")
|
||||||
|
.foregroundColor(Color(.systemBlue))
|
||||||
|
Text(String(item.userData!.unplayedItemCount ?? 0))
|
||||||
|
.foregroundColor(.white)
|
||||||
|
.font(.caption2)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}.padding(2)
|
||||||
|
.opacity(1), alignment: .topTrailing).opacity(1)
|
||||||
|
Text(item.seriesName ?? item.name ?? "")
|
||||||
|
.font(.caption)
|
||||||
|
.fontWeight(.semibold)
|
||||||
|
.foregroundColor(.primary)
|
||||||
|
.lineLimit(1)
|
||||||
|
if(item.type == "Movie" || item.type == "Series") {
|
||||||
|
Text("\(String(item.productionYear ?? 0)) • \(item.officialRating ?? "N/A")")
|
||||||
|
.foregroundColor(.secondary)
|
||||||
|
.font(.caption)
|
||||||
|
.fontWeight(.medium)
|
||||||
|
} else if(item.type == "Season") {
|
||||||
|
Text("\(item.name ?? "") • \(String(item.productionYear ?? 0))")
|
||||||
|
.foregroundColor(.secondary)
|
||||||
|
.font(.caption)
|
||||||
|
.fontWeight(.medium)
|
||||||
|
} else {
|
||||||
|
Text("S\(String(item.parentIndexNumber ?? 0)):E\(String(item.indexNumber ?? 0))")
|
||||||
|
.foregroundColor(.secondary)
|
||||||
|
.font(.caption)
|
||||||
|
.fontWeight(.medium)
|
||||||
|
}
|
||||||
|
}.frame(width: 100)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -67,7 +67,7 @@ struct ConnectToServerView: View {
|
||||||
Text(publicUser.name ?? "").font(.subheadline).fontWeight(.semibold)
|
Text(publicUser.name ?? "").font(.subheadline).fontWeight(.semibold)
|
||||||
Spacer()
|
Spacer()
|
||||||
if publicUser.primaryImageTag != nil {
|
if publicUser.primaryImageTag != nil {
|
||||||
ImageView(src: URL(string: "\(ServerEnvironment.current.server.baseURI ?? "")/Users/\(publicUser.id ?? "")/Images/Primary?width=180&quality=80&tag=\(publicUser.primaryImageTag!)")!)
|
ImageView(src: URL(string: "\(ServerEnvironment.current.server.baseURI ?? "")/Users/\(publicUser.id ?? "")/Images/Primary?width=120&quality=80&tag=\(publicUser.primaryImageTag!)")!)
|
||||||
.frame(width: 60, height: 60)
|
.frame(width: 60, height: 60)
|
||||||
.cornerRadius(30.0)
|
.cornerRadius(30.0)
|
||||||
} else {
|
} else {
|
||||||
|
@ -160,7 +160,7 @@ struct ConnectToServerView: View {
|
||||||
viewModel.passwordSubject.send(password)
|
viewModel.passwordSubject.send(password)
|
||||||
}
|
}
|
||||||
.alert(item: $viewModel.errorMessage) { _ in
|
.alert(item: $viewModel.errorMessage) { _ in
|
||||||
Alert(title: Text("Error"), message: Text("message"), dismissButton: .default(Text("Try again")))
|
Alert(title: Text("Error"), message: Text($viewModel.errorMessage.wrappedValue!), dismissButton: .default(Text("Try again")))
|
||||||
}
|
}
|
||||||
.navigationTitle("Connect to Server")
|
.navigationTitle("Connect to Server")
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,43 +15,10 @@ struct LatestMediaView: View {
|
||||||
LazyHStack {
|
LazyHStack {
|
||||||
ForEach(viewModel.items, id: \.id) { item in
|
ForEach(viewModel.items, id: \.id) { item in
|
||||||
if item.type == "Series" || item.type == "Movie" {
|
if item.type == "Series" || item.type == "Movie" {
|
||||||
NavigationLink(destination: LazyView { ItemView(item: item) }) {
|
PortraitItemView(item: item)
|
||||||
VStack(alignment: .leading) {
|
|
||||||
ImageView(src: item.getPrimaryImage(maxWidth: 100), bh: item.getPrimaryImageBlurHash())
|
|
||||||
.frame(width: 100, height: 150)
|
|
||||||
.cornerRadius(10)
|
|
||||||
.shadow(radius: 4)
|
|
||||||
.overlay(
|
|
||||||
ZStack {
|
|
||||||
if item.userData!.played ?? false {
|
|
||||||
Image(systemName: "circle.fill")
|
|
||||||
.foregroundColor(.white)
|
|
||||||
Image(systemName: "checkmark.circle.fill")
|
|
||||||
.foregroundColor(Color(.systemBlue))
|
|
||||||
}
|
|
||||||
}.padding(2)
|
|
||||||
.opacity(1), alignment: .topTrailing).opacity(1)
|
|
||||||
Text(item.seriesName ?? item.name ?? "")
|
|
||||||
.font(.caption)
|
|
||||||
.fontWeight(.semibold)
|
|
||||||
.foregroundColor(.primary)
|
|
||||||
.lineLimit(1)
|
|
||||||
if item.productionYear != nil {
|
|
||||||
Text(String(item.productionYear ?? 0))
|
|
||||||
.foregroundColor(.secondary)
|
|
||||||
.font(.caption)
|
|
||||||
.fontWeight(.medium)
|
|
||||||
} else {
|
|
||||||
Text(item.type!)
|
|
||||||
.foregroundColor(.secondary)
|
|
||||||
.font(.caption)
|
|
||||||
.fontWeight(.medium)
|
|
||||||
}
|
|
||||||
}.frame(width: 100)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}.padding(.trailing, 16)
|
}.padding(.trailing, 16)
|
||||||
}.padding(.leading, 20)
|
}.padding(.leading, 20)
|
||||||
}.frame(height: 195)
|
}.frame(height: 200)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,16 +15,9 @@ class UpNextViewModel: ObservableObject {
|
||||||
@Published var item: BaseItemDto? = nil
|
@Published var item: BaseItemDto? = nil
|
||||||
var delegate: PlayerViewController?
|
var delegate: PlayerViewController?
|
||||||
|
|
||||||
func episodeAndSeasonNumber() -> String {
|
func getEpisodeLocator() -> String {
|
||||||
if let pID = item?.parentIndexNumber, let id = item?.indexNumber {
|
if let seasonNo = item?.parentIndexNumber, let episodeNo = item?.indexNumber {
|
||||||
return "S\(pID):E\(id)"
|
return "S\(seasonNo):E\(episodeNo)"
|
||||||
}
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
|
|
||||||
func episodeName() -> String {
|
|
||||||
if let name = item?.name {
|
|
||||||
return name
|
|
||||||
}
|
}
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
@ -34,7 +27,6 @@ class UpNextViewModel: ObservableObject {
|
||||||
delegate?.setPlayerToNextUp()
|
delegate?.setPlayerToNextUp()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
struct VideoUpNextView: View {
|
struct VideoUpNextView: View {
|
||||||
|
@ -50,7 +42,7 @@ struct VideoUpNextView: View {
|
||||||
Button(action: viewModel.nextUp, label: {image})
|
Button(action: viewModel.nextUp, label: {image})
|
||||||
|
|
||||||
if viewModel.largeView {
|
if viewModel.largeView {
|
||||||
Text(viewModel.episodeName())
|
Text(viewModel.item!.name ?? "")
|
||||||
.padding(.trailing, 50)
|
.padding(.trailing, 50)
|
||||||
.foregroundColor(.white)
|
.foregroundColor(.white)
|
||||||
.minimumScaleFactor(0.1)
|
.minimumScaleFactor(0.1)
|
||||||
|
@ -76,7 +68,7 @@ struct VideoUpNextView: View {
|
||||||
}
|
}
|
||||||
|
|
||||||
var overlayIndicator : some View {
|
var overlayIndicator : some View {
|
||||||
Text(viewModel.episodeAndSeasonNumber())
|
Text(viewModel.getEpisodeLocator())
|
||||||
.font(viewModel.largeView ? .title3 : .body)
|
.font(viewModel.largeView ? .title3 : .body)
|
||||||
.foregroundColor(.white)
|
.foregroundColor(.white)
|
||||||
.padding(.horizontal, 5)
|
.padding(.horizontal, 5)
|
||||||
|
|
Loading…
Reference in New Issue