-
-
Notifications
You must be signed in to change notification settings - Fork 119
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
Automatic rescanning #72
Comments
After doing some research, this feature is going to be more complicated than I thought it would be. The issue is that there is no broadcast used for detecting if the filesystem has changed. Instead, I have to deliberately attach a I have a few options for implementing this as a result:
I'm gravitating towards 2 honestly, however I may go with 1 if push comes to shove. |
Another update. I've settled on the second option for automatic rescanning. This is for a few reasons:
It's still going to be gated behind a setting, but I know what I can do now. |
Add a dedicated service towards the loading of the music library. This new service was created for two reasons: 1. Music loading is slow and resource-intensive, so putting it on the ViewModel layer just didn't seem right and made it vulnerable to the OS simply stopping the loading process. 2. For automatic rescanning [#72], there must be something watching the music library and waiting for a change in the background. This would require a service as that is probably the least insane way to do that kind of background work. I have no garuntees how viable the service might be. If anything, it might be halted by some insane android restriction or issue that makes it more or less impossible to use for most apps, and I will have to largely drop truly automatic rescanning.
Another update, there are only two blockers behind this now:
Nearly 100 issues and 4 months later, I'm still struggling with this. Shared Mutable State and Concurrency is hard. |
Issue 2 has been resolved, so now we are rapidly approaching the MVP for this system. True automatic rescanning (i.e Auxio automatically responds to a deleted file) might not come for a bit later, as I want to deliver this first and then clear out a ton of blocked issues. |
Finally enable runtime rescanning, opening the door for a ton of new features and automatic rescanning later on. More work needs to be done on making the shared mutable state in-app safer to use.
Auxio now rescans music at runtime! It still does not respond to new files, but I want to push that to later (mostly out of laziness). |
Automatic rescanning has arrived in 2.5.0. It does not work like other apps, as the feature requires a persistent notification to ensure music updates always occur. Because of this, the feature is gated behind a setting called "Automatic reloading", as it does not seem like a good default behavior the way it currently is (and I personally don't care for it). |
It is just so stupid(IMO) that the refresh option is hidden inside the settings as "refresh music" button whereas the about section is displayed in the "more options" menu. I respect the dev's wish to not add a refresh toggle which makes no sense to me btw and his reasons seem to be lame. But there is no reason to not add it in the "more options" menu atleast. I respect what you are doing but please reconsider about hiding the scan option which is essential to the app's functionality. |
The issue is that "scanning" has two different meanings depending on whether you want to use the cache or not @satisfiedsingle. I'm still trying to figure out how to properly indicate the difference while still making the option more accessible. |
Currently, Auxio loads music once and then never responds to updates. This was a technical decision I made really early on and now regret. Currently, the only way to rescan the app is either by force-stopping Auxio or using the "Reload music" option, both of which simply hard-restart the app so that it begins loading music again.
This issue is about replacing that system with a new one that automatically rescans the music library and delivers updates to the app in a graceful way. This is a major technical rework, and so the addition will take some time to get right. This is currently meant to act as an issue to avoid duplicate "Auxio does not show new songs" issues.
This feature is my top priority right now, and is more or less what's holding up all other features. Such a addition probably means a total rework of the playback system [Not a rewrite, those are bad], and so this migration will likely take a long time and render the in-dev builds unusable for some time.
The text was updated successfully, but these errors were encountered: