diff --git a/bun.lockb b/bun.lockb index 0438c6be..be0777f2 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/package.json b/package.json index 3d1a93f9..64755bbe 100644 --- a/package.json +++ b/package.json @@ -30,7 +30,7 @@ "@types/lodash": "^4.17.9", "@types/uuid": "^10.0.0", "axios": "^1.7.7", - "expo": "~51.0.34", + "expo": "~51.0.35", "expo-background-fetch": "~12.0.1", "expo-blur": "~13.0.2", "expo-build-properties": "~0.12.5", @@ -77,7 +77,7 @@ "react-native-svg": "15.2.0", "react-native-url-polyfill": "^2.0.0", "react-native-uuid": "^2.0.2", - "react-native-video": "^6.6.2", + "react-native-video": "^6.6.3", "react-native-web": "~0.19.10", "sonner-native": "^0.14.2", "tailwindcss": "3.3.2", diff --git a/providers/DownloadProvider.tsx b/providers/DownloadProvider.tsx index ba5fc807..7e59fcab 100644 --- a/providers/DownloadProvider.tsx +++ b/providers/DownloadProvider.tsx @@ -77,6 +77,8 @@ function useDownloadProvider() { const router = useRouter(); const [api] = useAtom(apiAtom); + const [processes, setProcesses] = useState([]); + const authHeader = useMemo(() => { return api?.accessToken; }, [api]); @@ -87,8 +89,6 @@ function useDownloadProvider() { staleTime: 0, }); - const [processes, setProcesses] = useState([]); - useQuery({ queryKey: ["jobs"], queryFn: async () => { @@ -216,10 +216,12 @@ function useDownloadProvider() { }, }); + const baseDirectory = FileSystem.documentDirectory; + download({ id: process.id, url: settings?.optimizedVersionsServerUrl + "download/" + process.id, - destination: `${directories.documents}/${process.item.Id}.mp4`, + destination: `${baseDirectory}/${process.item.Id}.mp4`, }) .begin(() => { toast.info(`Download started for ${process.item.Name}`);