Comments (9)
Sure :)
Update me if you need me to test it again
from tempo.
Hi, it's been a long time. These days I have added the ability to select external storage as the default storage for downloads. It's a new option within the settings, visible only if the app detects an external memory.
I was mainly slowed down by the impossibility of testing the functionality with my own physical device, so I relied on the Android Studio emulator (a love/hate relationship).
Back to functionality:
It seems to work, the download is basically handled by Media3 which uses the default app folder. Due to the increasingly stringent storage access policies adopted by Google, this allows me not to ask the user for permission to write the download.
There are three limitations:
- I can only use one storage at a time. Therefore, I cannot have files downloaded to both storages at the same time (or better, it is possible, but I can only read from one location).
- I can't move downloads from one storage to another, moving from one place to another the user must accept losing all the previously saved downloads.
- The change will take effect the first time the app is restarted, a manual operation that the user have to do.
Bottom line, would you be willing to try this new version and tell me what you think?
I'd be interested to know mainly if it works or there is strange behavior.
I am attaching to this comment a zip containing the new apk for anyone who wants to try it. Let me know!
from tempo.
Hey @CappielloAntonio ๐
Thank you for implementing this!
I just tested and works as you described!
Once I change the setting to external storage the app display this warning modal
and checked the app folder in the sdcard
After that I played the album with the device in offline mode and it worked just fine :)
I changed the download storage back to internal and all downloads were gone as you said ๐
One thing that I noticed is that the downloaded files on sdcard was still there.
Knowing that I have two suggestions:
- when the user change the storage setting you can doce close the app to make sure it was restarted
- as you will loose the reference for the files when changing storage you could delete them when changing the storage
thanks again :)
from tempo.
Hi @karlprieb, thanks a lot for the test.
To respond to your comments:
- I guess there's not much I can do to force restart the app, I could destroy and recreate the single activity, but I'm afraid it wouldn't have the desired effect for the download destination folder switch.
- That the downloads stay in the destination folder should definitely not happen, I'll do some more testing.
from tempo.
Hi @karlprieb, here we go again.
I have a few questions to ask:
- is it possible that when storage is changed and after restarting, what is left in memory are just empty folders?
- would it be possible for you to test this functionality in a clean environment, deleting all your downloads and starting from scratch?
I'm doing several tests locally (on an emulator as I don't yet have a physical device that allows me to test) and when storage is changed or storage is forced to be deleted, all the elements in the db are effectively deleted. What I do is read the db, read the downloads there, and for each download I delete the file in memory.
My doubt is that you somehow have items in memory that aren't saved in the db. This could be caused by some carelessness of mine in one of the updates or I don't know, it seems really strange to me.
from tempo.
I can test it again from a clean state, like I did on my previous test, tomorrow :)
is it possible that when storage is changed and after restarting, what is left in memory are just empty folders?
from what I remember the downloaded files were still there, but Iโll test it again to make sure.
My doubt is that you somehow have items in memory that aren't saved in the db. This could be caused by some carelessness of mine in one of the updates or I don't know, it seems really strange to me.
Maybe ๐ค maybe the download failed somehow and you didnโt inserted it in the db, but some chunks were saved in the file system. I donโt know :)
If I can reproduce it tomorrow Iโll check the code tomorrow to understand how you implemented it and maybe I can catch something.
from tempo.
Hi @karlprieb, could you use the new version of Tempo when you test it?
I released it just yesterday and while it might have some bugs due to the amount of changes made, it's a step in the right direction that the app should take.
from tempo.
Solved the problem upstream by automatically deleting the downloaded items in the db and then manually deleting any other files in the download folder if it matches the extension of the downloaded files with ".exo".
from tempo.
Sorry for not providing feedback :)
I was able to test now with the latest build and it works as expected!
from tempo.
Related Issues (20)
- [Feature Request] - Google Assistant intergration
- Play pause HOT 1
- [Feature Request] Move "clear queue" button
- [Feature Request] Preserve artist scroll location after opening an album.
- [Feature Request] Add "favorite" button to expanded notification
- [BUG] - Cannot play when using an app to dismiss notifications HOT 2
- [Feature Request] - android automotive support
- [Feature Request] - Playlists in Home
- [Feature Request] - Support m3u8 for streaming radio HOT 1
- [Feature Request] - Radio discovery through Radio Browser HOT 1
- [Feature Request] - Show Downloaded Playlists When Offline HOT 1
- [Feature Request] - add OpenHome casting
- Where do bookmarks end up? HOT 1
- [Feature Request] - Autoscroll synced lyrics HOT 3
- [Feature Request] - Allow persistent ignore for offline use HOT 1
- [Feature Request] - Jellyfin support HOT 1
- [Feature Request] - Support disc titles HOT 3
- [BUG] - Podcast not work with Music App in Nextcloud Server (subsonic) HOT 4
- [Feature Request] - Support non-square cover art
- [Feature Request] - Support albums with different release date and original year
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tempo.