[create-pull-request] automated change
This commit is contained in:
parent
e6bd488ee1
commit
7476a11a36
|
@ -78,7 +78,7 @@ struct SettingsView: View {
|
||||||
}
|
}
|
||||||
Button {
|
Button {
|
||||||
DispatchQueue.main.asyncAfter(deadline: .now() + 0.1) {
|
DispatchQueue.main.asyncAfter(deadline: .now() + 0.1) {
|
||||||
SessionManager.current.logout();
|
SessionManager.current.logout()
|
||||||
let nc = NotificationCenter.default
|
let nc = NotificationCenter.default
|
||||||
nc.post(name: Notification.Name("didSignOut"), object: nil)
|
nc.post(name: Notification.Name("didSignOut"), object: nil)
|
||||||
}
|
}
|
||||||
|
|
|
@ -582,8 +582,8 @@ class VideoPlayerViewController: UIViewController, VideoPlayerSettingsDelegate,
|
||||||
updateNowPlayingCenter(time: nil, playing: mediaPlayer.state == .playing)
|
updateNowPlayingCenter(time: nil, playing: mediaPlayer.state == .playing)
|
||||||
|
|
||||||
if (eventName == "timeupdate" && mediaPlayer.state == .playing) || eventName != "timeupdate" {
|
if (eventName == "timeupdate" && mediaPlayer.state == .playing) || eventName != "timeupdate" {
|
||||||
var ticks: Int64 = Int64(mediaPlayer.position * Float(manifest.runTimeTicks!));
|
var ticks: Int64 = Int64(mediaPlayer.position * Float(manifest.runTimeTicks!))
|
||||||
if(ticks == 0) {
|
if ticks == 0 {
|
||||||
ticks = manifest.userData?.playbackPositionTicks ?? 0
|
ticks = manifest.userData?.playbackPositionTicks ?? 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -192,7 +192,7 @@ class EmailHelper: NSObject, MFMailComposeViewControllerDelegate {
|
||||||
let data = fileManager.contents(atPath: logURL.path)
|
let data = fileManager.contents(atPath: logURL.path)
|
||||||
|
|
||||||
picker.setSubject("[DEV-BUG] SwiftFin")
|
picker.setSubject("[DEV-BUG] SwiftFin")
|
||||||
picker.setMessageBody("Please don't edit this email.\n Please don't change the subject. \nUDID: \(UIDevice.current.identifierForVendor?.uuidString ?? "NIL")\n", isHTML: false);
|
picker.setMessageBody("Please don't edit this email.\n Please don't change the subject. \nUDID: \(UIDevice.current.identifierForVendor?.uuidString ?? "NIL")\n", isHTML: false)
|
||||||
picker.setToRecipients(["SwiftFin Bug Reports <swiftfin-bugs@jellyfin.org>"])
|
picker.setToRecipients(["SwiftFin Bug Reports <swiftfin-bugs@jellyfin.org>"])
|
||||||
picker.addAttachmentData(data!, mimeType: "text/plain", fileName: logURL.lastPathComponent)
|
picker.addAttachmentData(data!, mimeType: "text/plain", fileName: logURL.lastPathComponent)
|
||||||
picker.mailComposeDelegate = self
|
picker.mailComposeDelegate = self
|
||||||
|
|
|
@ -77,8 +77,8 @@ struct SettingsView: View {
|
||||||
Text("Signed in as \(username)").foregroundColor(.primary)
|
Text("Signed in as \(username)").foregroundColor(.primary)
|
||||||
Spacer()
|
Spacer()
|
||||||
Button {
|
Button {
|
||||||
print("logging out");
|
print("logging out")
|
||||||
close = false;
|
close = false
|
||||||
DispatchQueue.main.asyncAfter(deadline: .now() + 0.1) {
|
DispatchQueue.main.asyncAfter(deadline: .now() + 0.1) {
|
||||||
let nc = NotificationCenter.default
|
let nc = NotificationCenter.default
|
||||||
nc.post(name: Notification.Name("didSignOut"), object: nil)
|
nc.post(name: Notification.Name("didSignOut"), object: nil)
|
||||||
|
@ -88,9 +88,9 @@ struct SettingsView: View {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Button {
|
Button {
|
||||||
close = false;
|
close = false
|
||||||
DispatchQueue.main.asyncAfter(deadline: .now() + 0.1) {
|
DispatchQueue.main.asyncAfter(deadline: .now() + 0.1) {
|
||||||
SessionManager.current.logout();
|
SessionManager.current.logout()
|
||||||
let nc = NotificationCenter.default
|
let nc = NotificationCenter.default
|
||||||
nc.post(name: Notification.Name("didSignOut"), object: nil)
|
nc.post(name: Notification.Name("didSignOut"), object: nil)
|
||||||
}
|
}
|
||||||
|
|
|
@ -1041,8 +1041,8 @@ struct VLCPlayerWithControls: UIViewControllerRepresentable {
|
||||||
extension PlayerViewController {
|
extension PlayerViewController {
|
||||||
func sendProgressReport(eventName: String) {
|
func sendProgressReport(eventName: String) {
|
||||||
if (eventName == "timeupdate" && mediaPlayer.state == .playing) || eventName != "timeupdate" {
|
if (eventName == "timeupdate" && mediaPlayer.state == .playing) || eventName != "timeupdate" {
|
||||||
var ticks: Int64 = Int64(mediaPlayer.position * Float(manifest.runTimeTicks!));
|
var ticks: Int64 = Int64(mediaPlayer.position * Float(manifest.runTimeTicks!))
|
||||||
if(ticks == 0) {
|
if ticks == 0 {
|
||||||
ticks = manifest.userData?.playbackPositionTicks ?? 0
|
ticks = manifest.userData?.playbackPositionTicks ?? 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -41,10 +41,10 @@ final class SessionManager {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
if(lastUsedUserID != nil) {
|
if lastUsedUserID != nil {
|
||||||
savedUsers?.forEach { savedUser in
|
savedUsers?.forEach { savedUser in
|
||||||
if(savedUser.user_id ?? "" == lastUsedUserID!) {
|
if savedUser.user_id ?? "" == lastUsedUserID! {
|
||||||
user = savedUser;
|
user = savedUser
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -146,7 +146,7 @@ final class SessionManager {
|
||||||
#if os(tvOS)
|
#if os(tvOS)
|
||||||
let descriptor: TVAppProfileDescriptor = TVAppProfileDescriptor(name: user.username!)
|
let descriptor: TVAppProfileDescriptor = TVAppProfileDescriptor(name: user.username!)
|
||||||
self.tvUserManager.shouldStorePreferenceForCurrentUser(to: descriptor) { should in
|
self.tvUserManager.shouldStorePreferenceForCurrentUser(to: descriptor) { should in
|
||||||
if(should) {
|
if should {
|
||||||
user.appletv_id = self.tvUserManager.currentUserIdentifier ?? ""
|
user.appletv_id = self.tvUserManager.currentUserIdentifier ?? ""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -178,7 +178,7 @@ final class SessionManager {
|
||||||
keychain.accessGroup = "9R8RREG67J.me.vigue.jellyfin.sharedKeychain"
|
keychain.accessGroup = "9R8RREG67J.me.vigue.jellyfin.sharedKeychain"
|
||||||
keychain.delete("AccessToken_\(user?.user_id ?? "")")
|
keychain.delete("AccessToken_\(user?.user_id ?? "")")
|
||||||
generateAuthHeader(with: nil, deviceID: nil)
|
generateAuthHeader(with: nil, deviceID: nil)
|
||||||
if(user != nil) {
|
if user != nil {
|
||||||
let deleteRequest = NSBatchDeleteRequest(objectIDs: [user.objectID])
|
let deleteRequest = NSBatchDeleteRequest(objectIDs: [user.objectID])
|
||||||
user = nil
|
user = nil
|
||||||
_ = try? PersistenceController.shared.container.viewContext.execute(deleteRequest)
|
_ = try? PersistenceController.shared.container.viewContext.execute(deleteRequest)
|
||||||
|
|
|
@ -54,8 +54,8 @@ final class LibraryFilterViewModel: ViewModel {
|
||||||
init(filters: LibraryFilters? = nil,
|
init(filters: LibraryFilters? = nil,
|
||||||
enabledFilterType: [FilterType] = [.tag, .genre, .sortBy, .sortOrder, .filter], parentId: String) {
|
enabledFilterType: [FilterType] = [.tag, .genre, .sortBy, .sortOrder, .filter], parentId: String) {
|
||||||
self.enabledFilterType = enabledFilterType
|
self.enabledFilterType = enabledFilterType
|
||||||
self.selectedSortBy = filters?.sortBy.first ?? .name;
|
self.selectedSortBy = filters?.sortBy.first ?? .name
|
||||||
self.selectedSortOrder = filters?.sortOrder.first ?? .descending;
|
self.selectedSortOrder = filters?.sortOrder.first ?? .descending
|
||||||
self.parentId = parentId
|
self.parentId = parentId
|
||||||
|
|
||||||
super.init()
|
super.init()
|
||||||
|
|
Loading…
Reference in New Issue