-
Notifications
You must be signed in to change notification settings - Fork 8
[Feature] Custom storage location for downloaded music #160
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hello, I’m considering solutions for this, but again, it’s a low priority for now since I'm focused on other features. |
Hi, Thanks for the reply. I appreciate your focus. I haven't done much Android, and certainly haven't used Kotlin, but I went looking; but I might be wrong, so feel free to correct me. Your code for saving the files seems to boil down to According to this document in the App-specific files section, So you could possibly get away with a toggle button of "Use External Storage", and just use an I've had a bit of hassle trying to build it locally, had errors about gradle versions. I did manage to finally get it to build, but I'm not sure what the consequences are if I committed those even if I got the changes done myself? Cheers |
hi, The downloaded songs are fully synced with the internal database, which is also synchronized with the server database. This setup ensures data consistency and supports statistics tracking, scrobble, likes, ratings, adding to playlist. Allowing users to manage the files manually would require a resource-intensive scan at startup to check for consistency, which would slow down the app, since I cannot rely on users and trust them not to modify the saved files. If you want to do it yourself you're welcome to try, the code is fully open source and fairly documented, but the changes are complex and affect data, domain and presentation layers, so there's going to be a good amount of code to write, and changes to the sqlite database schema to perform (taking also good care of the db schema migration, to maintain backwards compatibility and not break the app for users). Thank you for trying the code! |
Maybe there is a misunderstanding, because how I understand I didn't think it would require that much to change, as the only references to the path is within the StorageManagementImpl.kt file, and obviously add some setting. But considering I couldn't work out how to add another setting visually to the setting page (unless it was just the designer in AndroidStudio that was failing to update properly?), I'm not sure if I'll get very far. Regards |
yes, keeping the files internal to the app would reduce the work (but that's not the way I'm planning on doing it, I would want to allow full control for the user). As for settings management, these are stored in an internal SQLite database. Adding a new option means we’ll need to add a column to the table, necessitating a database migration to the new schema. The database operates in the data layer and communicates updates to the rest of the app through Flows. We’ll need to implement a method in the settings interface and then integrate it into the data layer. Additionally, the presentation layer will need adjustments to include the new option, which will also require collaboration with my designer. While I do plan to implement support for external storage in the future, I must prioritize more urgent tasks at the moment. Given that modern phones typically come with 512GB of storage by default, the need for custom storage locations has diminished over time, and it's not a priority anymore. When I decide to implement this feature, I plan to use non-internal custom directories, giving users full control over their music files. Opting for a different approach at this stage would lead to writing a lot of throw-away code and would slow down the development of the features I’m currently focused on. |
That's fair enough. Thanks for considering it. My phone has 8GB (with about 5GB of that used by Android), so basically nothing before you even install any apps... I obviously understand this wouldn't be suitable for the official app though. Regards |
I asked around and to be honest with you, I didn't realize phones with such a small storage were still around. |
Well, to be fair, they're probably owned by people like me who doesn't see a point in buying a new phone just because somebody brought a new one out :) Honestly, don't just push it up your list because I'm running a 6 year old phone if you've got more important stuff to fix. I can continue to use multiple media players, it's not the end of the world. As an aside, I'm afraid I use neither Telegram nor Mastodon Regards |
of course, I was just referring to statistical data. If people don't see the point of buying a new phone, that's a totally legitimate choice. Anyway, I'm not trying to convince anyone here, but you brought up a cool topic that I enjoy chatting about, I want to give you my thoughts on this, those are the PERSONAL reasons I buy new hardware: DEPRECATIONS - TECHNOLOGICAL ADVANCEMENTS PRIVACY/SECURITY CREATIVITY - EXTENDED POSSIBILITIES At some point, the critical questions to consider are: Is this old hardware affecting my creativity? Is relying on outdated SDKs in compatibility mode worth it? Is the frustration from using outdated devices worth the cost of a new phone? Is the risk of falling behind in technology justified? And ultimately, how much is my time worth? I had my current phone for 5 years now, still great, the simple fact that I don't have any google installed extended the battery life to almost a week, and performance is still fine. But I think as soon as one of my favourite roms starts supporting the AI chip in a private way, I'll get the new device. |
I don't want to totally derail the issue, but as there's not much to add, and you're happy to have a conversation about tech, I'll participate. When it comes to tech advancements. I'm afraid I'm kind of on the opposite side. In my workplace, we have to develop software for some hardware which only runs Android 5... There's no choices, it's just Android 5. Then when certain updates came out that removed the Android 5 SDK off our development machines and told us it wasn't "supported" was very much an issue. The devices aren't "public" facing, so the app doesn't need the "latest and greatest", it just needs to work; and the forced update to systems and development is problematic. Privacy-wise, I'm in agreement. I bought a PinePhone in the hopes to escape a number of big tech. Unfortunately, most of my family and friends use WhatsApp, and there's the banking apps, so I failed to escape. I thought the Motorola phones would be pretty well supported with some of the alternative OSes, but the particularly one I got didn't seem to be. Need to check better when I come to upgrade it next. I find it interesting you talking about old hardware affecting your creativity, where-as I look more to the old vintage computers/consoles for development (Gameboy Advance, Commodore 64, Commodore Amiga). They are technically more restricted, but still interestingly capable. |
@pmprog I added the option to download the music to the SD card in the newest version of the app. |
Great, thank you. My server fell over the other week, so I'm just in the process of rebuilding, but I'll give it a try as soon as I can. |
Hi, Gave this a test, and even with it ticked, it saved to the local device, rather than the SD card. I'm on version 1.00-70-fdroid (Added 09/12/2024), which is the latest at time of writing Regards |
hi, thanks for testing. |
Hi, I'm afraid I don't know what you're talking about. |
@pmprog on android devices, when you insert a new card, the system asks if you want the card to be mounted as internal/system storage or as a regular sd card. For now downloads on sd card only work if it's mounted as internal storage. Here's a quick guide on how to mount the card as system storage (be careful if you try, you'll lose your SDcard data, since the card will be formatted again). |
Hi,
Great app, thanks.
Would it be possible to allow the user to select where to store downloaded files. At the minute it seems to be putting on device, which my phone has very little, but I have an SD card that's got plenty of space
Regards
The text was updated successfully, but these errors were encountered: