[create-pull-request] automated change

This commit is contained in:
acvigue 2021-08-01 16:28:02 +00:00 committed by GitHub
parent e6bd488ee1
commit 7476a11a36
10 changed files with 27 additions and 27 deletions

View File

@ -78,7 +78,7 @@ struct SettingsView: View {
}
Button {
DispatchQueue.main.asyncAfter(deadline: .now() + 0.1) {
SessionManager.current.logout();
SessionManager.current.logout()
let nc = NotificationCenter.default
nc.post(name: Notification.Name("didSignOut"), object: nil)
}

View File

@ -582,8 +582,8 @@ class VideoPlayerViewController: UIViewController, VideoPlayerSettingsDelegate,
updateNowPlayingCenter(time: nil, playing: mediaPlayer.state == .playing)
if (eventName == "timeupdate" && mediaPlayer.state == .playing) || eventName != "timeupdate" {
var ticks: Int64 = Int64(mediaPlayer.position * Float(manifest.runTimeTicks!));
if(ticks == 0) {
var ticks: Int64 = Int64(mediaPlayer.position * Float(manifest.runTimeTicks!))
if ticks == 0 {
ticks = manifest.userData?.playbackPositionTicks ?? 0
}

View File

@ -192,7 +192,7 @@ class EmailHelper: NSObject, MFMailComposeViewControllerDelegate {
let data = fileManager.contents(atPath: logURL.path)
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.addAttachmentData(data!, mimeType: "text/plain", fileName: logURL.lastPathComponent)
picker.mailComposeDelegate = self

View File

@ -77,8 +77,8 @@ struct SettingsView: View {
Text("Signed in as \(username)").foregroundColor(.primary)
Spacer()
Button {
print("logging out");
close = false;
print("logging out")
close = false
DispatchQueue.main.asyncAfter(deadline: .now() + 0.1) {
let nc = NotificationCenter.default
nc.post(name: Notification.Name("didSignOut"), object: nil)
@ -88,9 +88,9 @@ struct SettingsView: View {
}
}
Button {
close = false;
close = false
DispatchQueue.main.asyncAfter(deadline: .now() + 0.1) {
SessionManager.current.logout();
SessionManager.current.logout()
let nc = NotificationCenter.default
nc.post(name: Notification.Name("didSignOut"), object: nil)
}

View File

@ -1041,8 +1041,8 @@ struct VLCPlayerWithControls: UIViewControllerRepresentable {
extension PlayerViewController {
func sendProgressReport(eventName: String) {
if (eventName == "timeupdate" && mediaPlayer.state == .playing) || eventName != "timeupdate" {
var ticks: Int64 = Int64(mediaPlayer.position * Float(manifest.runTimeTicks!));
if(ticks == 0) {
var ticks: Int64 = Int64(mediaPlayer.position * Float(manifest.runTimeTicks!))
if ticks == 0 {
ticks = manifest.userData?.playbackPositionTicks ?? 0
}

View File

@ -41,10 +41,10 @@ final class SessionManager {
}
}
#else
if(lastUsedUserID != nil) {
if lastUsedUserID != nil {
savedUsers?.forEach { savedUser in
if(savedUser.user_id ?? "" == lastUsedUserID!) {
user = savedUser;
if savedUser.user_id ?? "" == lastUsedUserID! {
user = savedUser
}
}
} else {
@ -146,7 +146,7 @@ final class SessionManager {
#if os(tvOS)
let descriptor: TVAppProfileDescriptor = TVAppProfileDescriptor(name: user.username!)
self.tvUserManager.shouldStorePreferenceForCurrentUser(to: descriptor) { should in
if(should) {
if should {
user.appletv_id = self.tvUserManager.currentUserIdentifier ?? ""
}
}
@ -178,7 +178,7 @@ final class SessionManager {
keychain.accessGroup = "9R8RREG67J.me.vigue.jellyfin.sharedKeychain"
keychain.delete("AccessToken_\(user?.user_id ?? "")")
generateAuthHeader(with: nil, deviceID: nil)
if(user != nil) {
if user != nil {
let deleteRequest = NSBatchDeleteRequest(objectIDs: [user.objectID])
user = nil
_ = try? PersistenceController.shared.container.viewContext.execute(deleteRequest)

View File

@ -54,8 +54,8 @@ final class LibraryFilterViewModel: ViewModel {
init(filters: LibraryFilters? = nil,
enabledFilterType: [FilterType] = [.tag, .genre, .sortBy, .sortOrder, .filter], parentId: String) {
self.enabledFilterType = enabledFilterType
self.selectedSortBy = filters?.sortBy.first ?? .name;
self.selectedSortOrder = filters?.sortOrder.first ?? .descending;
self.selectedSortBy = filters?.sortBy.first ?? .name
self.selectedSortOrder = filters?.sortOrder.first ?? .descending
self.parentId = parentId
super.init()