forked from Ninjalama/streamyfin_mirror
fix: download path on android
This commit is contained in:
@@ -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",
|
||||
|
||||
@@ -77,6 +77,8 @@ function useDownloadProvider() {
|
||||
const router = useRouter();
|
||||
const [api] = useAtom(apiAtom);
|
||||
|
||||
const [processes, setProcesses] = useState<JobStatus[]>([]);
|
||||
|
||||
const authHeader = useMemo(() => {
|
||||
return api?.accessToken;
|
||||
}, [api]);
|
||||
@@ -87,8 +89,6 @@ function useDownloadProvider() {
|
||||
staleTime: 0,
|
||||
});
|
||||
|
||||
const [processes, setProcesses] = useState<JobStatus[]>([]);
|
||||
|
||||
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}`);
|
||||
|
||||
Reference in New Issue
Block a user