* few player bug fixes (#104)

* icloud safe checking

* more tests

* removed ffmpeg sorry

* test

* Revert "test"

This reverts commit cbf7412d47.

* custom player stuffs idk if it builds

* fire Seiike moment

* ok my fault this time

* Create banner1.png

* seiike ahh moment

* added light mode banner

* Update EpisodeCell.swift

* seiike ahh moment x2

* ops

* fixed intros skipper buttons

* fixed pan crashes

* added speed indicator for hold speed

* added safecheck

* oh yeah my bad

---------

Co-authored-by: Seiike <122684677+Seeike@users.noreply.github.com>
This commit is contained in:
cranci 2025-04-25 18:10:12 +02:00 committed by GitHub
parent 8c73798195
commit 54f2ec5e2a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -95,20 +95,24 @@ class iCloudSyncManager {
}
}
private func syncToiCloud() {
let iCloud = NSUbiquitousKeyValueStore.default
let defaults = UserDefaults.standard
do {
for key in allKeysToSync() {
if let value = defaults.object(forKey: key) {
if isValidValueType(value) {
iCloud.set(value, forKey: key)
func syncToiCloud() {
syncQueue.async {
do {
let container = NSUbiquitousKeyValueStore.default
let defaults = UserDefaults.standard
for key in self.allKeysToSync() {
if let value = defaults.object(forKey: key), self.isValidValueType(value) {
let data = try JSONSerialization.data(withJSONObject: value)
try JSONSerialization.jsonObject(with: data)
container.set(value, forKey: key)
}
}
container.synchronize()
} catch {
Logger.shared.log("Failed to sync to iCloud: \(error.localizedDescription)", type: "Error")
}
iCloud.synchronize()
}
}