This repository was archived by the owner on Jul 30, 2025. It is now read-only.
forked from vfsfitvnm/ViMusic
-
Notifications
You must be signed in to change notification settings - Fork 217
Fixed problems with Album sync #5549
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- added an improved check for if the device is connected to the network (internet) - maybe can replace `isNetworkAvailable` (and similar method)
- not a perfect fix, but it (can) ensures that the prefix is added to the title if it is missing
Summary: - fix "should not sync": if no network connection (breaks because it cannot fetch the album) or it should not sync (invalid syncing) - fix "album disappears": related to above problem - added (helper) data class `AlbumSongsState`: used to restore state related to song - code improvements: formatting, performance (idea by me, code by @aneesh1122) Performance optimisation: - was running the "album insertion code" for each song (only required once) - now code is only run once per album-update
Why added new func isNetworkConnected, if just present isNetworkAvailable fun ? |
|
Ok good answer, thanks |
So should I fix the other method or let it like this? |
There is still some other small change I need to add. Edit: Done. |
- now the (possibly duplicate) song is only inserted into the db if it was used somewhere - change by @aneesh1122
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Also:
isNetworkAvailable
(and similar method)This was created in cooperation with @aneesh1122.