From 07233ba9aecae4f3560ba12a3faede77667cbede Mon Sep 17 00:00:00 2001 From: tapframe Date: Wed, 15 Oct 2025 02:24:20 +0530 Subject: [PATCH] update expo sdk to 54 --- android/app/build.gradle | 43 +++++- android/app/src/main/res/values/strings.xml | 2 +- app.json | 8 +- ios/Nuvio.xcodeproj/project.pbxproj | 13 +- ios/Nuvio/Info.plist | 4 +- ios/Nuvio/NuvioRelease.entitlements | 10 ++ ios/Nuvio/Supporting/Expo.plist | 2 +- ios/Podfile.lock | 138 ++++++++++++-------- src/components/metadata/FloatingHeader.tsx | 7 +- src/components/metadata/HeroSection.tsx | 17 +-- src/contexts/DownloadsContext.tsx | 10 +- src/hooks/useMetadata.ts | 20 ++- src/screens/CatalogScreen.tsx | 3 - src/screens/index.ts | 1 - src/services/backupService.ts | 6 +- src/services/memoryMonitorService.ts | 18 +-- src/services/notificationService.ts | 2 + src/services/tmdbService.ts | 7 + src/services/traktService.ts | 1 - src/utils/version.ts | 2 +- 20 files changed, 207 insertions(+), 107 deletions(-) create mode 100644 ios/Nuvio/NuvioRelease.entitlements diff --git a/android/app/build.gradle b/android/app/build.gradle index 9590358c..002dd38a 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -94,11 +94,50 @@ android { applicationId 'com.nuvio.app' minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion - versionCode 19 - versionName "1.2.4" + versionCode 20 + versionName "1.2.5" buildConfigField "String", "REACT_NATIVE_RELEASE_LEVEL", "\"${findProperty('reactNativeReleaseLevel') ?: 'stable'}\"" } + + // Split APKs by architecture and density for smaller downloads + splits { + abi { + enable true + reset() + include "arm64-v8a", "armeabi-v7a", "x86", "x86_64" + universalApk true // Generate universal APK as well + } + density { + enable true + reset() + include "ldpi", "mdpi", "hdpi", "xhdpi", "xxhdpi", "xxxhdpi" + universalApk true // Generate universal APK as well + } + } + + // Generate unique version codes for each split APK + def abiVersionCodes = ['armeabi-v7a': 1, 'arm64-v8a': 2, 'x86': 3, 'x86_64': 4] + def densityVersionCodes = ['ldpi': 1, 'mdpi': 2, 'hdpi': 3, 'xhdpi': 4, 'xxhdpi': 5, 'xxxhdpi': 6] + android.applicationVariants.all { variant -> + variant.outputs.each { output -> + def baseVersionCode = 19 // Current versionCode 20from defaultConfig + def abiName = output.getFilter(com.android.build.OutputFile.ABI) + def densityName = output.getFilter(com.android.build.OutputFile.DENSITY) + + def versionCode 20= baseVersionCode * 100 // Base multiplier + + if (abiName != null) { + versionCode 20+= abiVersionCodes.get(abiName) * 10 + } + + if (densityName != null) { + versionCode 20+= densityVersionCodes.get(densityName) + } + + output.versionCodeOverride = versionCode + } + } signingConfigs { debug { storeFile file('debug.keystore') diff --git a/android/app/src/main/res/values/strings.xml b/android/app/src/main/res/values/strings.xml index 8fdc2ab6..08f0025b 100644 --- a/android/app/src/main/res/values/strings.xml +++ b/android/app/src/main/res/values/strings.xml @@ -3,5 +3,5 @@ contain false dark - 1.2.4 + 1.2.5 \ No newline at end of file diff --git a/app.json b/app.json index a2d22456..32a5c291 100644 --- a/app.json +++ b/app.json @@ -2,7 +2,7 @@ "expo": { "name": "Nuvio", "slug": "nuvio", - "version": "1.2.4", + "version": "1.2.5", "orientation": "default", "backgroundColor": "#020404", "icon": "./assets/ios/AppIcon.appiconset/Icon-App-60x60@3x.png", @@ -17,7 +17,7 @@ "ios": { "supportsTablet": true, "icon": "./assets/ios/AppIcon.appiconset/Icon-App-60x60@3x.png", - "buildNumber": "19", + "buildNumber": "20", "infoPlist": { "NSAppTransportSecurity": { "NSAllowsArbitraryLoads": true @@ -48,7 +48,7 @@ "WAKE_LOCK" ], "package": "com.nuvio.app", - "versionCode": 19, + "versionCode": 20, "architectures": [ "arm64-v8a", "armeabi-v7a", @@ -94,6 +94,6 @@ "fallbackToCacheTimeout": 30000, "url": "https://grim-reyna-tapframe-69970143.koyeb.app/api/manifest" }, - "runtimeVersion": "1.2.4" + "runtimeVersion": "1.2.5" } } diff --git a/ios/Nuvio.xcodeproj/project.pbxproj b/ios/Nuvio.xcodeproj/project.pbxproj index 1c107f7d..b562e963 100644 --- a/ios/Nuvio.xcodeproj/project.pbxproj +++ b/ios/Nuvio.xcodeproj/project.pbxproj @@ -25,9 +25,10 @@ 13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = Nuvio/Images.xcassets; sourceTree = ""; }; 13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = Nuvio/Info.plist; sourceTree = ""; }; 2DDA95A7458A78E817D9496D /* libPods-Nuvio.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Nuvio.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - 49055D6E250FAFA21141FE49 /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; includeInIndex = 1; name = PrivacyInfo.xcprivacy; path = Nuvio/PrivacyInfo.xcprivacy; sourceTree = ""; }; + 49055D6E250FAFA21141FE49 /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xml; name = PrivacyInfo.xcprivacy; path = Nuvio/PrivacyInfo.xcprivacy; sourceTree = ""; }; 6E0017E5203955A430ABF21B /* Pods-Nuvio.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Nuvio.release.xcconfig"; path = "Target Support Files/Pods-Nuvio/Pods-Nuvio.release.xcconfig"; sourceTree = ""; }; 6E007C0BAC8C453623E81663 /* ExpoModulesProvider.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ExpoModulesProvider.swift; path = "Pods/Target Support Files/Pods-Nuvio/ExpoModulesProvider.swift"; sourceTree = ""; }; + 73BB213C2E9EEAC700EC03F8 /* NuvioRelease.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; name = NuvioRelease.entitlements; path = Nuvio/NuvioRelease.entitlements; sourceTree = ""; }; 9FBA88F02E86ECD700892850 /* KSPlayerManager.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = KSPlayerManager.m; sourceTree = ""; }; 9FBA88F12E86ECD700892850 /* KSPlayerModule.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KSPlayerModule.swift; sourceTree = ""; }; 9FBA88F22E86ECD700892850 /* KSPlayerView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KSPlayerView.swift; sourceTree = ""; }; @@ -55,6 +56,7 @@ 13B07FAE1A68108700A75B9A /* Nuvio */ = { isa = PBXGroup; children = ( + 73BB213C2E9EEAC700EC03F8 /* NuvioRelease.entitlements */, F11748412D0307B40044C1D9 /* AppDelegate.swift */, F11748442D0722820044C1D9 /* Nuvio-Bridging-Header.h */, 9FBA88F02E86ECD700892850 /* KSPlayerManager.m */, @@ -132,7 +134,6 @@ BD6015E69A4861CCBD3C1D39 /* Pods-Nuvio.debug.xcconfig */, 6E0017E5203955A430ABF21B /* Pods-Nuvio.release.xcconfig */, ); - name = Pods; path = Pods; sourceTree = ""; }; @@ -440,6 +441,7 @@ CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = Nuvio/Nuvio.entitlements; CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = NLXTHANK2N; ENABLE_BITCODE = NO; GCC_PREPROCESSOR_DEFINITIONS = ( "$(inherited)", @@ -458,7 +460,7 @@ "-lc++", ); OTHER_SWIFT_FLAGS = "$(inherited) -D EXPO_CONFIGURATION_DEBUG"; - PRODUCT_BUNDLE_IDENTIFIER = com.nuvio.app; + PRODUCT_BUNDLE_IDENTIFIER = "com.nuvio.app"; PRODUCT_NAME = "Nuvio"; SWIFT_OBJC_BRIDGING_HEADER = "Nuvio/Nuvio-Bridging-Header.h"; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; @@ -474,8 +476,9 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; - CODE_SIGN_ENTITLEMENTS = Nuvio/Nuvio.entitlements; + CODE_SIGN_ENTITLEMENTS = Nuvio/NuvioRelease.entitlements; CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = NLXTHANK2N; INFOPLIST_FILE = Nuvio/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 15.1; LD_RUNPATH_SEARCH_PATHS = ( @@ -489,7 +492,7 @@ "-lc++", ); OTHER_SWIFT_FLAGS = "$(inherited) -D EXPO_CONFIGURATION_RELEASE"; - PRODUCT_BUNDLE_IDENTIFIER = com.nuvio.app; + PRODUCT_BUNDLE_IDENTIFIER = "com.nuvio.app"; PRODUCT_NAME = "Nuvio"; SWIFT_OBJC_BRIDGING_HEADER = "Nuvio/Nuvio-Bridging-Header.h"; SWIFT_VERSION = 5.0; diff --git a/ios/Nuvio/Info.plist b/ios/Nuvio/Info.plist index ffd3ebb3..d701baa9 100644 --- a/ios/Nuvio/Info.plist +++ b/ios/Nuvio/Info.plist @@ -19,7 +19,7 @@ CFBundlePackageType $(PRODUCT_BUNDLE_PACKAGE_TYPE) CFBundleShortVersionString - 1.2.4 + 1.2.5 CFBundleSignature ???? CFBundleURLTypes @@ -39,7 +39,7 @@ CFBundleVersion - 19 + 20 LSMinimumSystemVersion 12.0 LSRequiresIPhoneOS diff --git a/ios/Nuvio/NuvioRelease.entitlements b/ios/Nuvio/NuvioRelease.entitlements new file mode 100644 index 00000000..a0bc443f --- /dev/null +++ b/ios/Nuvio/NuvioRelease.entitlements @@ -0,0 +1,10 @@ + + + + + aps-environment + development + com.apple.developer.associated-domains + + + \ No newline at end of file diff --git a/ios/Nuvio/Supporting/Expo.plist b/ios/Nuvio/Supporting/Expo.plist index cff0afd5..f325c178 100644 --- a/ios/Nuvio/Supporting/Expo.plist +++ b/ios/Nuvio/Supporting/Expo.plist @@ -9,7 +9,7 @@ EXUpdatesLaunchWaitMs 30000 EXUpdatesRuntimeVersion - 1.2.4 + 1.2.5 EXUpdatesURL https://grim-reyna-tapframe-69970143.koyeb.app/api/manifest diff --git a/ios/Podfile.lock b/ios/Podfile.lock index f855bc88..4e82b521 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -2336,7 +2336,7 @@ PODS: - ReactCommon/turbomodule/core - ReactNativeDependencies - Yoga - - RNReanimated (3.19.3): + - RNReanimated (4.1.3): - hermes-engine - RCTRequired - RCTTypeSafety @@ -2358,10 +2358,10 @@ PODS: - ReactCommon/turbomodule/bridging - ReactCommon/turbomodule/core - ReactNativeDependencies - - RNReanimated/reanimated (= 3.19.3) - - RNReanimated/worklets (= 3.19.3) + - RNReanimated/reanimated (= 4.1.3) + - RNWorklets - Yoga - - RNReanimated/reanimated (3.19.3): + - RNReanimated/reanimated (4.1.3): - hermes-engine - RCTRequired - RCTTypeSafety @@ -2383,56 +2383,10 @@ PODS: - ReactCommon/turbomodule/bridging - ReactCommon/turbomodule/core - ReactNativeDependencies - - RNReanimated/reanimated/apple (= 3.19.3) + - RNReanimated/reanimated/apple (= 4.1.3) + - RNWorklets - Yoga - - RNReanimated/reanimated/apple (3.19.3): - - hermes-engine - - RCTRequired - - RCTTypeSafety - - React-Core - - React-Core-prebuilt - - React-debug - - React-Fabric - - React-featureflags - - React-graphics - - React-hermes - - React-ImageManager - - React-jsi - - React-NativeModulesApple - - React-RCTFabric - - React-renderercss - - React-rendererdebug - - React-utils - - ReactCodegen - - ReactCommon/turbomodule/bridging - - ReactCommon/turbomodule/core - - ReactNativeDependencies - - Yoga - - RNReanimated/worklets (3.19.3): - - hermes-engine - - RCTRequired - - RCTTypeSafety - - React-Core - - React-Core-prebuilt - - React-debug - - React-Fabric - - React-featureflags - - React-graphics - - React-hermes - - React-ImageManager - - React-jsi - - React-NativeModulesApple - - React-RCTFabric - - React-renderercss - - React-rendererdebug - - React-utils - - ReactCodegen - - ReactCommon/turbomodule/bridging - - ReactCommon/turbomodule/core - - ReactNativeDependencies - - RNReanimated/worklets/apple (= 3.19.3) - - Yoga - - RNReanimated/worklets/apple (3.19.3): + - RNReanimated/reanimated/apple (4.1.3): - hermes-engine - RCTRequired - RCTTypeSafety @@ -2454,6 +2408,7 @@ PODS: - ReactCommon/turbomodule/bridging - ReactCommon/turbomodule/core - ReactNativeDependencies + - RNWorklets - Yoga - RNScreens (4.16.0): - hermes-engine @@ -2593,6 +2548,77 @@ PODS: - ReactCommon/turbomodule/core - ReactNativeDependencies - Yoga + - RNWorklets (0.6.1): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-debug + - React-Fabric + - React-featureflags + - React-graphics + - React-hermes + - React-ImageManager + - React-jsi + - React-NativeModulesApple + - React-RCTFabric + - React-renderercss + - React-rendererdebug + - React-utils + - ReactCodegen + - ReactCommon/turbomodule/bridging + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - RNWorklets/worklets (= 0.6.1) + - Yoga + - RNWorklets/worklets (0.6.1): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-debug + - React-Fabric + - React-featureflags + - React-graphics + - React-hermes + - React-ImageManager + - React-jsi + - React-NativeModulesApple + - React-RCTFabric + - React-renderercss + - React-rendererdebug + - React-utils + - ReactCodegen + - ReactCommon/turbomodule/bridging + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - RNWorklets/worklets/apple (= 0.6.1) + - Yoga + - RNWorklets/worklets/apple (0.6.1): + - hermes-engine + - RCTRequired + - RCTTypeSafety + - React-Core + - React-Core-prebuilt + - React-debug + - React-Fabric + - React-featureflags + - React-graphics + - React-hermes + - React-ImageManager + - React-jsi + - React-NativeModulesApple + - React-RCTFabric + - React-renderercss + - React-rendererdebug + - React-utils + - ReactCodegen + - ReactCommon/turbomodule/bridging + - ReactCommon/turbomodule/core + - ReactNativeDependencies + - Yoga - SDWebImage (5.21.3): - SDWebImage/Core (= 5.21.3) - SDWebImage/Core (5.21.3) @@ -2729,6 +2755,7 @@ DEPENDENCIES: - "RNSentry (from `../node_modules/@sentry/react-native`)" - RNSVG (from `../node_modules/react-native-svg`) - RNVectorIcons (from `../node_modules/react-native-vector-icons`) + - RNWorklets (from `../node_modules/react-native-worklets`) - Yoga (from `../node_modules/react-native/ReactCommon/yoga`) SPEC REPOS: @@ -2994,6 +3021,8 @@ EXTERNAL SOURCES: :path: "../node_modules/react-native-svg" RNVectorIcons: :path: "../node_modules/react-native-vector-icons" + RNWorklets: + :path: "../node_modules/react-native-worklets" Yoga: :path: "../node_modules/react-native/ReactCommon/yoga" @@ -3135,11 +3164,12 @@ SPEC CHECKSUMS: RNCPicker: a7170edbcbf8288de8edb2502e08e7fc757fa755 RNFastImage: 42a769cd260a7686b1db32a9f7d754333bad4e77 RNGestureHandler: 2914750df066d89bf9d8f48a10ad5f0051108ac3 - RNReanimated: 112c0628c3c11b56c261bafb8df9ae72eb525aec + RNReanimated: 3895a29fdf77bbe2a627e1ed599a5e5d1df76c29 RNScreens: d8d6f1792f6e7ac12b0190d33d8d390efc0c1845 RNSentry: 41979b419908128847ef662cc130a400b7576fa9 RNSVG: 31d6639663c249b7d5abc9728dde2041eb2a3c34 RNVectorIcons: 4351544f100d4f12cac156a7c13399e60bab3e26 + RNWorklets: 54d8dffb7f645873a58484658ddfd4bd1a9a0bc1 SDWebImage: 16309af6d214ba3f77a7c6f6fdda888cb313a50a SDWebImageAVIFCoder: afe194a084e851f70228e4be35ef651df0fc5c57 SDWebImageWebPCoder: e38c0a70396191361d60c092933e22c20d5b1380 diff --git a/src/components/metadata/FloatingHeader.tsx b/src/components/metadata/FloatingHeader.tsx index 73f1d364..5e3a6edf 100644 --- a/src/components/metadata/FloatingHeader.tsx +++ b/src/components/metadata/FloatingHeader.tsx @@ -16,6 +16,7 @@ import Animated, { Extrapolate, useAnimatedReaction, runOnJS, + SharedValue, } from 'react-native-reanimated'; import { useTheme } from '../../contexts/ThemeContext'; import { logger } from '../../utils/logger'; @@ -28,9 +29,9 @@ interface FloatingHeaderProps { handleBack: () => void; handleToggleLibrary: () => void; inLibrary: boolean; - headerOpacity: Animated.SharedValue; - headerElementsY: Animated.SharedValue; - headerElementsOpacity: Animated.SharedValue; + headerOpacity: SharedValue; + headerElementsY: SharedValue; + headerElementsOpacity: SharedValue; safeAreaTop: number; setLogoLoadError: (error: boolean) => void; } diff --git a/src/components/metadata/HeroSection.tsx b/src/components/metadata/HeroSection.tsx index da0ff84b..ddff74d4 100644 --- a/src/components/metadata/HeroSection.tsx +++ b/src/components/metadata/HeroSection.tsx @@ -29,6 +29,7 @@ import Animated, { FadeIn, runOnUI, useDerivedValue, + SharedValue, } from 'react-native-reanimated'; import { useTheme } from '../../contexts/ThemeContext'; import { useTraktContext } from '../../contexts/TraktContext'; @@ -52,14 +53,14 @@ interface HeroSectionProps { bannerImage: string | null; loadingBanner: boolean; logoLoadError: boolean; - scrollY: Animated.SharedValue; - heroHeight: Animated.SharedValue; - heroOpacity: Animated.SharedValue; - logoOpacity: Animated.SharedValue; - buttonsOpacity: Animated.SharedValue; - buttonsTranslateY: Animated.SharedValue; - watchProgressOpacity: Animated.SharedValue; - watchProgressWidth: Animated.SharedValue; + scrollY: SharedValue; + heroHeight: SharedValue; + heroOpacity: SharedValue; + logoOpacity: SharedValue; + buttonsOpacity: SharedValue; + buttonsTranslateY: SharedValue; + watchProgressOpacity: SharedValue; + watchProgressWidth: SharedValue; watchProgress: { currentTime: number; duration: number; diff --git a/src/contexts/DownloadsContext.tsx b/src/contexts/DownloadsContext.tsx index 66a6a3d1..2b7ad52e 100644 --- a/src/contexts/DownloadsContext.tsx +++ b/src/contexts/DownloadsContext.tsx @@ -1,6 +1,6 @@ import React, { createContext, useCallback, useContext, useEffect, useMemo, useRef, useState } from 'react'; import { AppState } from 'react-native'; -import * as FileSystem from 'expo-file-system'; +import * as FileSystem from 'expo-file-system/legacy'; import AsyncStorage from '@react-native-async-storage/async-storage'; import { notificationService } from '../services/notificationService'; @@ -135,7 +135,7 @@ export const DownloadsProvider: React.FC<{ children: React.ReactNode }> = ({ chi downloadsRef.current = downloads; }, [downloads]); // Keep active resumables in memory (not persisted) - const resumablesRef = useRef>(new Map()); + const resumablesRef = useRef>(new Map()); const lastBytesRef = useRef>(new Map()); // Persist and restore @@ -245,7 +245,7 @@ export const DownloadsProvider: React.FC<{ children: React.ReactNode }> = ({ chi console.log(`[DownloadsContext] Creating new resumable for download: ${id}`); // Only create new resumable if none exists (should be rare for resume operations) - const progressCallback: FileSystem.DownloadProgressCallback = (data) => { + const progressCallback = (data: any) => { const { totalBytesWritten, totalBytesExpectedToWrite } = data; const now = Date.now(); const last = lastBytesRef.current.get(id); @@ -385,7 +385,7 @@ export const DownloadsProvider: React.FC<{ children: React.ReactNode }> = ({ chi } // Create file path - use a simple unique identifier with extension from HEAD request - const baseDir = FileSystem.documentDirectory || FileSystem.cacheDirectory || FileSystem.documentDirectory; + const baseDir = (FileSystem as any).documentDirectory || (FileSystem as any).cacheDirectory || '/tmp/'; const uniqueId = `${Date.now()}_${Math.random().toString(36).substring(7)}`; const extension = await getExtensionFromHeaders(input.url, input.headers); const fileUri = extension ? `${baseDir}downloads/${uniqueId}.${extension}` : `${baseDir}downloads/${uniqueId}`; @@ -424,7 +424,7 @@ export const DownloadsProvider: React.FC<{ children: React.ReactNode }> = ({ chi setDownloads(prev => [newItem, ...prev]); - const progressCallback: FileSystem.DownloadProgressCallback = (data) => { + const progressCallback = (data: any) => { const { totalBytesWritten, totalBytesExpectedToWrite } = data; const now = Date.now(); const last = lastBytesRef.current.get(compoundId); diff --git a/src/hooks/useMetadata.ts b/src/hooks/useMetadata.ts index 86d7697b..fb66db71 100644 --- a/src/hooks/useMetadata.ts +++ b/src/hooks/useMetadata.ts @@ -834,11 +834,19 @@ export const useMetadata = ({ id, type, addonId }: UseMetadataProps): UseMetadat type: localized.type, originCountry: localized.origin_country, originalLanguage: localized.original_language, - createdBy: localized.created_by, + createdBy: localized.created_by?.map(creator => ({ + id: creator.id, + name: creator.name, + profile_path: creator.profile_path || undefined + })), }; const productionInfo = Array.isArray(localized.networks) ? localized.networks - .map((n: any) => ({ id: n?.id, name: n?.name, logo: tmdbSvc.getImageUrl(n?.logo_path, 'w185') })) + .map((n: any) => ({ + id: n?.id, + name: n?.name, + logo: tmdbSvc.getImageUrl(n?.logo_path, 'w185') || undefined + })) .filter((n: any) => n && (n.logo || n.name)) : []; @@ -1844,7 +1852,7 @@ export const useMetadata = ({ id, type, addonId }: UseMetadataProps): UseMetadat .map((n: any) => ({ id: n?.id, name: n?.name, - logo: tmdbService.getImageUrl(n?.logo_path, 'w185'), + logo: tmdbService.getImageUrl(n?.logo_path, 'w185') || undefined, })) .filter((n: any) => n && (n.logo || n.name)) : []; @@ -1861,7 +1869,11 @@ export const useMetadata = ({ id, type, addonId }: UseMetadataProps): UseMetadat type: showDetails.type, originCountry: showDetails.origin_country, originalLanguage: showDetails.original_language, - createdBy: showDetails.created_by, + createdBy: showDetails.created_by?.map(creator => ({ + id: creator.id, + name: creator.name, + profile_path: creator.profile_path || undefined + })), }; // Update metadata with TV details diff --git a/src/screens/CatalogScreen.tsx b/src/screens/CatalogScreen.tsx index 6215e6fd..6293bed7 100644 --- a/src/screens/CatalogScreen.tsx +++ b/src/screens/CatalogScreen.tsx @@ -766,9 +766,6 @@ const CatalogScreen: React.FC = ({ route, navigation }) => { contentContainerStyle={styles.list} showsVerticalScrollIndicator={false} removeClippedSubviews={true} - maxToRenderPerBatch={effectiveNumColumns * 3} - windowSize={10} - initialNumToRender={effectiveNumColumns * 4} getItemType={() => 'item'} /> ) : renderEmptyState()} diff --git a/src/screens/index.ts b/src/screens/index.ts index 46e6babf..97a4f997 100644 --- a/src/screens/index.ts +++ b/src/screens/index.ts @@ -5,7 +5,6 @@ export { default as AddonsScreen } from './AddonsScreen'; export { default as SettingsScreen } from './SettingsScreen'; export { default as MetadataScreen } from './MetadataScreen'; export { default as CatalogScreen } from './CatalogScreen'; -export { default as DiscoverScreen } from './DiscoverScreen'; export { default as LibraryScreen } from './LibraryScreen'; export { default as ShowRatingsScreen } from './ShowRatingsScreen'; export { default as CatalogSettingsScreen } from './CatalogSettingsScreen'; diff --git a/src/services/backupService.ts b/src/services/backupService.ts index bb6188cd..770000ca 100644 --- a/src/services/backupService.ts +++ b/src/services/backupService.ts @@ -1,5 +1,5 @@ import AsyncStorage from '@react-native-async-storage/async-storage'; -import * as FileSystem from 'expo-file-system'; +import * as FileSystem from 'expo-file-system/legacy'; import { Platform } from 'react-native'; import { logger } from '../utils/logger'; import { AppSettings, DEFAULT_SETTINGS } from '../hooks/useSettings'; @@ -150,7 +150,7 @@ export class BackupService { scraperCount; // Save to file - const fileUri = `${FileSystem.documentDirectory}${filename}`; + const fileUri = `${(FileSystem as any).documentDirectory || '/tmp/'}${filename}`; await FileSystem.writeAsStringAsync(fileUri, JSON.stringify(backupData, null, 2)); logger.info(`[BackupService] Backup created successfully: ${filename}`); @@ -332,7 +332,7 @@ export class BackupService { */ public async listBackups(): Promise { try { - const files = await FileSystem.readDirectoryAsync(FileSystem.documentDirectory!); + const files = await FileSystem.readDirectoryAsync((FileSystem as any).documentDirectory || '/tmp/'); return files .filter(file => file.startsWith(this.BACKUP_FILENAME_PREFIX) && file.endsWith('.json')) .sort((a, b) => b.localeCompare(a)); // Sort by filename (newest first) diff --git a/src/services/memoryMonitorService.ts b/src/services/memoryMonitorService.ts index 6d65254f..58380da5 100644 --- a/src/services/memoryMonitorService.ts +++ b/src/services/memoryMonitorService.ts @@ -161,16 +161,16 @@ class MemoryMonitorService { private clearGlobalCaches(): void { try { // Clear any global caches your app might have - if (global && global.__APP_CACHE__) { - global.__APP_CACHE__ = {}; + if (global && (global as any).__APP_CACHE__) { + (global as any).__APP_CACHE__ = {}; } - if (global && global.__METADATA_CACHE__) { - global.__METADATA_CACHE__ = {}; + if (global && (global as any).__METADATA_CACHE__) { + (global as any).__METADATA_CACHE__ = {}; } - if (global && global.__EPISODE_CACHE__) { - global.__EPISODE_CACHE__ = {}; + if (global && (global as any).__EPISODE_CACHE__) { + (global as any).__EPISODE_CACHE__ = {}; } } catch (error) { logger.warn('[MemoryMonitor] Could not clear global caches:', error); @@ -180,13 +180,13 @@ class MemoryMonitorService { private clearImageCaches(): void { try { // Clear React Native image caches if available - if (global && global.__IMAGE_CACHE__) { - global.__IMAGE_CACHE__ = {}; + if (global && (global as any).__IMAGE_CACHE__) { + (global as any).__IMAGE_CACHE__ = {}; } // Clear Expo Image cache if available // Note: Expo Image has its own cache management, but we can suggest cleanup - if (global && global.expo && global.expo.ImagePicker) { + if (global && (global as any).expo && (global as any).expo.ImagePicker) { // This is just an example - actual cache clearing would depend on the library } } catch (error) { diff --git a/src/services/notificationService.ts b/src/services/notificationService.ts index a6e09ab4..26b2b1a2 100644 --- a/src/services/notificationService.ts +++ b/src/services/notificationService.ts @@ -81,6 +81,8 @@ class NotificationService { shouldShowAlert: true, shouldPlaySound: true, shouldSetBadge: true, + shouldShowBanner: true, + shouldShowList: true, }), }); diff --git a/src/services/tmdbService.ts b/src/services/tmdbService.ts index 81998c06..a7ecc9a5 100644 --- a/src/services/tmdbService.ts +++ b/src/services/tmdbService.ts @@ -52,6 +52,13 @@ export interface TMDBShow { poster_path: string | null; air_date: string; }[]; + status?: string; + episode_run_time?: number[]; + type?: string; + origin_country?: string[]; + original_language?: string; + created_by?: { id: number; name: string; profile_path?: string | null }[]; + networks?: { id: number; name: string; logo_path: string | null; origin_country: string }[]; } export interface TMDBTrendingResult { diff --git a/src/services/traktService.ts b/src/services/traktService.ts index 748de059..3fdb1b35 100644 --- a/src/services/traktService.ts +++ b/src/services/traktService.ts @@ -1,7 +1,6 @@ import AsyncStorage from '@react-native-async-storage/async-storage'; import { AppState, AppStateStatus } from 'react-native'; import { logger } from '../utils/logger'; -import { imageCacheService } from './imageCacheService'; // Storage keys export const TRAKT_ACCESS_TOKEN_KEY = 'trakt_access_token'; diff --git a/src/utils/version.ts b/src/utils/version.ts index 8072a85e..f29182b7 100644 --- a/src/utils/version.ts +++ b/src/utils/version.ts @@ -1,7 +1,7 @@ // Single source of truth for the app version displayed in Settings // Update this when bumping app version -export const APP_VERSION = '1.2.4'; +export const APP_VERSION = '1.2.5'; export function getDisplayedAppVersion(): string { return APP_VERSION;