diff --git a/Yattee/Services/BackgroundRefresh/BackgroundRefreshManager.swift b/Yattee/Services/BackgroundRefresh/BackgroundRefreshManager.swift index d455fac4..c071df40 100644 --- a/Yattee/Services/BackgroundRefresh/BackgroundRefreshManager.swift +++ b/Yattee/Services/BackgroundRefresh/BackgroundRefreshManager.swift @@ -43,6 +43,7 @@ final class BackgroundRefreshManager { func registerBackgroundTasks() { #if os(iOS) + guard !ProcessInfo.processInfo.isMacCatalystApp else { return } registerIOSBackgroundTask() #elseif os(macOS) registerMacOSBackgroundActivity() @@ -64,6 +65,7 @@ final class BackgroundRefreshManager { } func scheduleIOSBackgroundRefresh() { + guard !ProcessInfo.processInfo.isMacCatalystApp else { return } let request = BGAppRefreshTaskRequest(identifier: Self.backgroundTaskIdentifier) // Request to run in ~15 minutes (system decides actual timing) request.earliestBeginDate = Date(timeIntervalSinceNow: 15 * 60) @@ -77,6 +79,7 @@ final class BackgroundRefreshManager { } func cancelIOSBackgroundRefresh() { + guard !ProcessInfo.processInfo.isMacCatalystApp else { return } BGTaskScheduler.shared.cancel(taskRequestWithIdentifier: Self.backgroundTaskIdentifier) LoggingService.shared.debug("Cancelled iOS background refresh", category: .notifications) } @@ -156,6 +159,7 @@ final class BackgroundRefreshManager { func handleNotificationsEnabledChanged(_ enabled: Bool) { #if os(iOS) + guard !ProcessInfo.processInfo.isMacCatalystApp else { return } if enabled { scheduleIOSBackgroundRefresh() } else { diff --git a/Yattee/Services/Downloads/DownloadManager+Assets.swift b/Yattee/Services/Downloads/DownloadManager+Assets.swift index 767b4ed1..445695dc 100644 --- a/Yattee/Services/Downloads/DownloadManager+Assets.swift +++ b/Yattee/Services/Downloads/DownloadManager+Assets.swift @@ -74,7 +74,7 @@ extension DownloadManager { } // If VTT parsing failed, fall back to direct URLs (may not work if blocked) - if imageURLs.isEmpty { + if imageURLs.isEmpty, storyboard.storyboardCount > 0 { for sheetIndex in 0..