Can't download video bigger than internal storage
mprasil opened this issue · comments
Describe the bug
I have Fire tablet with tiny internal storage and SD card used as internal storage. There's about 6GB free in the internal storage, but technically stuff stored to internal storage is actually stored on SD card, which has plenty of space. This also applies to downloaded content in Findroid. Findroid does not seem to be aware of the fact that it is indeed SD card, I do not get any option to choose destination when downloading media.
What I've noticed is that Findroid will fail (refuse?) to download anything bigger that ~6GB even though it will download much more than that in smaller files. (like a 30GB TV show) I suspected that it might be looking at wrong filesystem, so to confirm that I just dd
'd a file onto the internal storage to leave only about 1GB free and indeed Findroid would not download anything bigger - even content that it downloaded successfully before. (and again will download much more than 1GB as long as individual files are under 1GB)
To Reproduce
Steps to reproduce the behavior:
- Have a system with SD card used as internal storage.
- Try to download media that is bigger than the internal storage, but would fit comfortably onto SD card used as internal storage.
Expected behavior
The download works as long as there's enough space in the destination.
Device info (please complete the following information):
- Device: Fire 7 12th gen
- Android version: Fire OS 8.3.2.3 (Android 11 based)
- App version: v0.14.2 (25)
- Jellyfin version: 10.9.6
Additional context
The app is running under child profile if that makes any difference.
I might be reading the code wrong (not a Kotlin developer) but here app seems to download media to storageLocation + "downloads/..."
but later gets stats for the parent rather than downloads
subdir. So perhaps it could do something like stats = StatFs(path.getParent())
instead?
From reading some forums online this seems to be a bug in FireOS when using a child profile.
Could you try it again on a normal profile to see if you get the same storage error?
Changing the code to check the downloads
subdir won't fix it because that's a folder that Findroid creates itself. It's the parent folder of downloads
that needs to be checked because that's where all the files Findroid creates are located.
A possible solution would be to add an option to ignore storage full errors and continue with the download anyway. But that is pretty ugly. But first please test using a normal profile.
Thanks for the response. I tested this and yep, it works fine in normal profile. But TBH I really need to have it working on child profile anyways, so sadly that is not a solution for me. 😅
To be fair, this is quite uncommon issue even on quite low-end devices. So perhaps it would not warrant full-on setting to override the storage space check and instead show a popup in case the file is bigger than storage with "attempt to download anyway" button? Even on regular devices, users can - for example - go and delete some other downloads to make sure the file fits while it is downloaded.
Yeah, in theory you should never be able to download a file bigger than the available storage space. You can't possibly save that file.
The bug in the child profile is something Amazon needs to fix. (But likely never will)
I will close this issue since it's indeed so uncommon and there are solutions like clearing some space by removing other downloads.