ok just some fixes i guess

This commit is contained in:
cranci1 2025-06-18 10:52:14 +02:00
parent a9e1328cec
commit baa42e643c
8 changed files with 15 additions and 10 deletions

View file

@ -1592,6 +1592,7 @@ class CustomMediaPlayerViewController: UIViewController, UIGestureRecognizerDele
self.updateSkipButtonsVisibility()
Logger.shared.log(fullUrl, type: "Stream")
UserDefaults.standard.set(self.currentTimeVal, forKey: "lastPlayedTime_\(self.fullUrl)")
UserDefaults.standard.set(self.duration, forKey: "totalTime_\(self.fullUrl)")

View file

@ -90,6 +90,7 @@ class VideoPlayerViewController: UIViewController {
}
addPeriodicTimeObserver(fullURL: fullUrl)
Logger.shared.log(fullUrl, type: "Stream")
let lastPlayedTime = UserDefaults.standard.double(forKey: "lastPlayedTime_\(fullUrl)")
if lastPlayedTime > 0 {
let seekTime = CMTime(seconds: lastPlayedTime, preferredTimescale: 1)
@ -208,7 +209,6 @@ class VideoPlayerViewController: UIViewController {
override func viewDidAppear(_ animated: Bool) {
super.viewDidAppear(animated)
// Only start normal playback if not launched from SharePlay
if !isLaunchedFromSharePlay {
player?.play()
setInitialPlayerRate()
@ -217,7 +217,6 @@ class VideoPlayerViewController: UIViewController {
await checkForFaceTimeAndPromptSharePlay()
}
} else {
// For SharePlay launches, the playback will be coordinated
setInitialPlayerRate()
}
}

View file

@ -5,8 +5,8 @@
// Created by Francesco on 05/01/25.
//
import Foundation
import Network
import Foundation
class FetchDelegate: NSObject, URLSessionTaskDelegate {
private let allowRedirects: Bool

View file

@ -87,7 +87,7 @@ struct ModuleAdditionSettingsView: View {
.fill(Color(.systemGray5))
}
}
.frame(width: 32, height: 32)
.frame(width: 40, height: 40)
.clipShape(Circle())
.shadow(
color: colorScheme == .dark

View file

@ -125,7 +125,6 @@ struct AllBookmarks: View {
}
Button(action: {
if isSelecting {
// If trash icon tapped
if !selectedBookmarks.isEmpty {
for id in selectedBookmarks {
if let item = libraryManager.bookmarks.first(where: { $0.id == id }) {

View file

@ -266,12 +266,17 @@ struct AllWatchingView: View {
UserDefaults.standard.set(99999999.0, forKey: key)
UserDefaults.standard.set(99999999.0, forKey: totalKey)
ContinueWatchingManager.shared.remove(item: item)
loadContinueWatchingItems()
DispatchQueue.main.async {
loadContinueWatchingItems()
}
}
private func removeItem(item: ContinueWatchingItem) {
ContinueWatchingManager.shared.remove(item: item)
loadContinueWatchingItems()
DispatchQueue.main.async {
loadContinueWatchingItems()
}
}
}

View file

@ -1508,7 +1508,7 @@ struct MediaInfoView: View {
alert.addAction(UIAlertAction(title: title, style: .default) { _ in
guard self.activeFetchID == fetchID else { return }
self.playStream(url: streamUrl, fullURL: href, subtitles: subtitles, headers: headers, fetchID: fetchID)
self.playStream(url: streamUrl, fullURL: fullURL, subtitles: subtitles, headers: headers, fetchID: fetchID)
})
streamIndex += 1
@ -1528,6 +1528,7 @@ struct MediaInfoView: View {
DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) {
guard self.activeFetchID == fetchID else { return }
Logger.shared.log(fullURL, type: "Stream")
let externalPlayer = UserDefaults.standard.string(forKey: "externalPlayer") ?? "Sora"
var scheme: String?

View file

@ -378,7 +378,7 @@ struct SubtitleSettingsSection: View {
icon: "captions.bubble",
title: NSLocalizedString("Enable Subtitles", comment: ""),
isOn: $subtitlesEnabled,
showDivider: false
showDivider: true
)
.onChange(of: subtitlesEnabled) { newValue in
SubtitleSettingsManager.shared.update { settings in
@ -454,4 +454,4 @@ struct SubtitleSettingsSection: View {
}
}
}
}
}