-
-
Notifications
You must be signed in to change notification settings - Fork 34
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
Singleton sync and chip loader #63
Singleton sync and chip loader #63
Conversation
e832cac
to
fc1c7ce
Compare
- Make sync of songs, albums, playlists, arits faster (corutines) and only run as "singletons" - Rename some functions
58fe56b
to
78e6ca0
Compare
@mikooomich this one has some big files 😅 if anything has to change, I'm more than happy to oblige |
As in a "this is ready for merge" or suggestions in general? I haven't looked into it too deeply, but looks great so far! A few things I noticed
|
@mikooomich db migration removed and fixed the ytmSync being ignored in the playlist tab |
@mikooomich also, what do you think about adding this? A n/m download count on playlists/artists/albums with any downloaded song. Maybe add an option to toggle this? |
You cannot modify old db schema like that. You still need to increment db version and specify a database auto migration, see here -> c3e2ea7#diff-841cb2099b74da4d913f1cf1d60c554d9e6ae0dc6f8c3a22ad3b95a4b5b39568R107
Yeah, nice touch If the pull request is wip could you mark it as such (with the selector), then mark it ready when its ready to be reviewed/merged |
@mikooomich change done and added N/M songs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello. A few nitpicks, otherwise, looks great.
For commits, mostly for sakes of readability/traceability:
- Please remove merge commit(s). PRs should be rebased on conflict, or left as-is
- Remove any rebase fixup commits (those should be applied within commits themselves)
- Squash any duplicates ex. "fix sort lined song"
- All database schema should be contained within one commit. It's just the one change with SongEntity, right? All the json modifications, adding migration, etc can probably go into one commit
- Tagging. You can leave this PR as is, however in the future, we'd very much prefer commits to be tagged according to functionality/category. ex "ui: ..." "syncutils: ...", etc. It just makes searching/skimming/grouping much easier
NPE crash when clicking on albums
FATAL EXCEPTION: main
Process: com.dd3boh.outertunepr63, PID: 4785
java.lang.NullPointerException: Parameter specified as non-null is null: method androidx.room.RoomSQLiteQuery.bindString, parameter value
at androidx.room.RoomSQLiteQuery.bindString(Unknown Source:2)
at com.dd3boh.outertune.db.DatabaseDao_Impl.__fetchRelationshipartistAscomDd3bohOutertuneDbEntitiesArtistEntity_1(DatabaseDao_Impl.java:12905)
at com.dd3boh.outertune.db.DatabaseDao_Impl.-$$Nest$m__fetchRelationshipartistAscomDd3bohOutertuneDbEntitiesArtistEntity_1(Unknown Source:0)
at com.dd3boh.outertune.db.DatabaseDao_Impl$97.call(DatabaseDao_Impl.java:7750)
at com.dd3boh.outertune.db.DatabaseDao_Impl$97.call(DatabaseDao_Impl.java:7717)
at androidx.room.CoroutinesRoom$Companion$createFlow$1$1$1.invokeSuspend(CoroutinesRoom.kt:129)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)
at java.lang.Thread.run(Thread.java:1012)
Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [StandaloneCoroutine{Cancelling}@b352779, Dispatchers.Main.immediate]
2024-10-20 13:01:55.637 4785-4785 Process com.dd3boh.outertunepr63 I Sending signal. PID: 4785 SIG: 9
app/src/main/java/com/dd3boh/outertune/extensions/ContextExt.kt
Outdated
Show resolved
Hide resolved
a9eb829
to
225dfd7
Compare
|
c6f5a7f
to
45afede
Compare
"migrate get download logic to SQL (+performance) and add isDownload to song table" This also means squash the following since into that commit since that will be handled in the commit you add isdownloaded
"add missing import after rebase" should not be its own commit (unless it's alot of fixing and makes sense to otherwise), instead, add it into the commit that needs it. (if you don't know where it came from, honestly you can just leave it as it) |
b0099a1
to
ba57278
Compare
- Add loading in chips tokens when syncing that token - Add library and download chips in playlists
- only call syncs when ytmSync true
b07fcd7
to
a8c8f98
Compare
… smaller interfaces
- add n/M download count to albums/artists/playlists - move entity and maps queries to separate Daos
a8c8f98
to
be50fd6
Compare
@mikooomich changes done |
Feature / Changes
Sync spinner in chips and liked playlist
New Download chip (show only playlists/arts with any downloaded song)
N/M songs
Fixes