SimpMusic
SimpMusic copied to clipboard
Wrong songs order in local playlist and wrong song getting deleted
Describe the bug A clear and concise description of what the bug is.
Something wierd is happening with local playlists. My playlist has 349 songs and I can add it as a local playlist successfully. Now, when I add the 350th song, it should appear as the latest added song but it appears as the oldest added song in my local playlist. In my main playlist the latest added song is shown as latest added correctly.
The 2nd problem is when I delete this 350th song, which is the latest added song, this 350th song gets deleted in the local playlist BUT in the main playlist the 350th song is still there but the 1st song(the oldest added song in the original playlist) gets deleted.
To Reproduce Steps to reproduce the behavior:
-
Go to any playlist
-
Click on save to local playlist
-
Add a song to that local playlist
-
Latest added song appear as oldest song in the playlist.
-
Go to any local playlist and delete a song
-
The song gets deleted from the local playlist but some other song gets deleted from the main playlist
Expected behavior
-
The song should appear at the top.
-
the same song should be deleted in both the local playlist and main playlist
The first problem is only with the big playlists. In the small playlist I made to test(10 songs), the latest songs appear as latest in both the local playlist and main playlist
Screenshots If applicable, add screenshots to help explain your problem.
Log (Error Details) Paste the log from the crashing screen, if it is not a crash bug, skip it.
Capture a screen recording for me please
Capture a screen recording for me please
Problem 1
https://github.com/maxrave-dev/SimpMusic/assets/45353488/061d2daa-03dd-4b50-a66c-4a712bd86b9c
The latest song is 'Espresso' and the oldest song is 'love me again'
When I added 'New rules' It should have been above 'Espresso' as the new latest song but It was added as the oldest song
Expected behaviour : 'New rules' as the latest song and 'love me again' as the oldest song
Actual behaviour : 'Espresso' is the last song and 'New rules' is the oldest song.
Capture a screen recording for me please
Problem 2
https://github.com/maxrave-dev/SimpMusic/assets/45353488/14e67f2c-04eb-4abf-bff3-6cae63226f4f
I first added 'I LUV IT' to the local playlist and later deleted that song from there.
The song got deleted from the local playlist as expected but in the main playlist instead of 'I LUV IT' 'Shape of You' got deleted.
So the wrong song is getting deleted in the main playlist but the right song is getting deleted in the local playlist.
Local playlist = 'I LUV IT' got deleted Main playlist = 'Shape of You' got deleted
Capture a screen recording for me please
Problem 1
VID_20240420_185449.mp4 The latest song is 'Espresso' and the oldest song is 'love me again'
When I added 'New rules' It should have been above 'Espresso' as the new latest song but It was added as the oldest song
Expected behaviour : 'New rules' as the latest song and 'love me again' as the oldest song
Actual behaviour : 'Espresso' is the last song and 'New rules' is the oldest song.
Hey, I don't have this bug, did you download a latest version from Github?
Capture a screen recording for me please
Problem 1
VID_20240420_185449.mp4 The latest song is 'Espresso' and the oldest song is 'love me again'
When I added 'New rules' It should have been above 'Espresso' as the new latest song but It was added as the oldest song
Expected behaviour : 'New rules' as the latest song and 'love me again' as the oldest song
Actual behaviour : 'Espresso' is the last song and 'New rules' is the oldest song.
Hey, I don't have this bug, did you download a latest version from Github?
Yeah I'm using the latest version. This problem is not there with small playlists.
This playlist has 350+ songs. Maybe this problem happens with big playlists. Try it yourself by any random big playlist
Can you try the latest debug version and give me feedback about this bug?
-
the wrong 'date added' order of songs is still there.
-
when I delete any song from local playlists it's throwing an error
https://github.com/user-attachments/assets/61cadc98-8beb-44a1-8db7-73197b2f275b
Build version: 0.2.3-dev Current date: 2024-07-29 12:11:55 Device: Xiaomi M2012K11AI OS version: Android 13 (SDK 33)
Stack trace:
java.lang.IndexOutOfBoundsException: Index 382 out of bounds for length 50
at jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:64)
at jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:70)
at jdk.internal.util.Preconditions.checkIndex(Preconditions.java:266)
at java.util.Objects.checkIndex(Objects.java:359)
at java.util.ArrayList.remove(ArrayList.java:511)
at com.maxrave.simpmusic.viewModel.LocalPlaylistViewModel$deleteItem$1.invokeSuspend(LocalPlaylistViewModel.kt:504)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.internal.DispatchedContinuationKt.resumeCancellableWith(DispatchedContinuation.kt:363)
at kotlinx.coroutines.intrinsics.CancellableKt.startCoroutineCancellable(Cancellable.kt:26)
at kotlinx.coroutines.intrinsics.CancellableKt.startCoroutineCancellable$default(Cancellable.kt:21)
at kotlinx.coroutines.CoroutineStart.invoke(CoroutineStart.kt:88)
at kotlinx.coroutines.AbstractCoroutine.start(AbstractCoroutine.kt:123)
at kotlinx.coroutines.BuildersKt__Builders_commonKt.launch(Builders.common.kt:52)
at kotlinx.coroutines.BuildersKt.launch(Unknown Source:1)
at kotlinx.coroutines.BuildersKt__Builders_commonKt.launch$default(Builders.common.kt:43)
at kotlinx.coroutines.BuildersKt.launch$default(Unknown Source:1)
at com.maxrave.simpmusic.viewModel.LocalPlaylistViewModel.deleteItem(LocalPlaylistViewModel.kt:495)
at com.maxrave.simpmusic.ui.screen.library.PlaylistScreenKt.PlaylistScreen$lambda$76(PlaylistScreen.kt:963)
at com.maxrave.simpmusic.ui.screen.library.PlaylistScreenKt.$r8$lambda$o0I3QMWnwn7fwirIdjtuSgXq3fA(Unknown Source:0)
at com.maxrave.simpmusic.ui.screen.library.PlaylistScreenKt$$ExternalSyntheticLambda23.invoke(D8$$SyntheticClass:0)
at com.maxrave.simpmusic.ui.component.ModalBottomSheetKt$NowPlayingBottomSheet$15$1$1$2.invoke$lambda$1$lambda$0(ModalBottomSheet.kt:378)
at com.maxrave.simpmusic.ui.component.ModalBottomSheetKt$NowPlayingBottomSheet$15$1$1$2.$r8$lambda$GcJrrs5osHaRhRKxeyxjc5k5ujM(Unknown Source:0)
at com.maxrave.simpmusic.ui.component.ModalBottomSheetKt$NowPlayingBottomSheet$15$1$1$2$$ExternalSyntheticLambda0.invoke(D8$$SyntheticClass:0)
at com.maxrave.simpmusic.ui.component.ModalBottomSheetKt.ActionButton_Oo4ZOEs$lambda$37$lambda$36(ModalBottomSheet.kt:556)
at com.maxrave.simpmusic.ui.component.ModalBottomSheetKt.$r8$lambda$qtMSx5BnvgU3oWws1lP3pF_Fgu8(Unknown Source:0)
at com.maxrave.simpmusic.ui.component.ModalBottomSheetKt$$ExternalSyntheticLambda18.invoke(D8$$SyntheticClass:0)
at androidx.compose.foundation.ClickablePointerInputNode$pointerInput$3.invoke-k-4lQ0M(Clickable.kt:987)
at androidx.compose.foundation.ClickablePointerInputNode$pointerInput$3.invoke(Clickable.kt:981)
at androidx.compose.foundation.gestures.TapGestureDetectorKt$detectTapAndPress$2$1.invokeSuspend(TapGestureDetector.kt:255)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTaskKt.resume(DispatchedTask.kt:175)
at kotlinx.coroutines.DispatchedTaskKt.dispatch(DispatchedTask.kt:164)
at kotlinx.coroutines.CancellableContinuationImpl.dispatchResume(CancellableContinuationImpl.kt:466)
at kotlinx.coroutines.CancellableContinuationImpl.resumeImpl(CancellableContinuationImpl.kt:500)
at kotlinx.coroutines.CancellableContinuationImpl.resumeImpl$default(CancellableContinuationImpl.kt:489)
at kotlinx.coroutines.CancellableContinuationImpl.resumeWith(CancellableContinuationImpl.kt:364)
at androidx.compose.ui.input.pointer.SuspendingPointerInputModifierNodeImpl$PointerEventHandlerCoroutine.offerPointerEvent(SuspendingPointerInputFilter.kt:665)
at androidx.compose.ui.input.pointer.SuspendingPointerInputModifierNodeImpl.dispatchPointerEvent(SuspendingPointerInputFilter.kt:544)
at androidx.compose.ui.input.pointer.SuspendingPointerInputModifierNodeImpl.onPointerEvent-H0pRuoY(SuspendingPointerInputFilter.kt:566)
at androidx.compose.foundation.AbstractClickablePointerInputNode.onPointerEvent-H0pRuoY(Clickable.kt:947)
at androidx.compose.foundation.AbstractClickableNode.onPointerEvent-H0pRuoY(Clickable.kt:795)
at androidx.compose.ui.input.pointer.Node.dispatchMainEventPass(HitPathTracker.kt:317)
at androidx.compose.ui.input.pointer.Node.dispatchMainEventPass(HitPathTracker.kt:303)
at androidx.compose.ui.input.pointer.Node.dispatchMainEventPass(HitPathTracker.kt:303)
at androidx.compose.ui.input.pointer.Node.dispatchMainEventPass(HitPathTracker.kt:303)
at androidx.compose.ui.input.pointer.Node.dispatchMainEventPass(HitPathTracker.kt:303)
at androidx.compose.ui.input.pointer.NodeParent.dispatchMainEventPass(HitPathTracker.kt:185)
at androidx.compose.ui.input.pointer.HitPathTracker.dispatchChanges(HitPathTracker.kt:104)
at androidx.compose.ui.input.pointer.PointerInputEventProcessor.process-BIzXfog(PointerInputEventProcessor.kt:113)
at androidx.compose.ui.platform.AndroidComposeView.sendMotionEvent-8iAsVTc(AndroidComposeView.android.kt:1576)
at androidx.compose.ui.platform.AndroidComposeView.handleMotionEvent-8iAsVTc(AndroidComposeView.android.kt:1527)
at androidx.compose.ui.platform.AndroidComposeView.dispatchTouchEvent(AndroidComposeView.android.kt:1466)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3152)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2820)
at android.view.View.dispatchPointerEvent(View.java:15435)
at android.view.ViewRootImpl$ViewPostImeInputStage.processPointerEvent(ViewRootImpl.java:7316)
at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:7086)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:6505)
at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:6562)
at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:6528)
at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:6693)
at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:6536)
at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:6750)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:6509)
at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:6562)
at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:6528)
at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:6536)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:6509)
at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:9714)
at android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:9665)
at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:9633)
at android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:9870)
at android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:298)
at android.os.MessageQueue.nativePollOnce(Native Method)
at android.os.MessageQueue.next(MessageQueue.java:341)
at android.os.Looper.loopOnce(Looper.java:169)
at android.os.Looper.loop(Looper.java:300)
at android.app.ActivityThread.main(ActivityThread.java:8503)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:561)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:954)
Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [StandaloneCoroutine{Cancelling}@c58291a, Dispatchers.Main.immediate]
User actions: 2024-07-29 12:10:12: MainActivity created 2024-07-29 12:10:13: MainActivity resumed 2024-07-29 12:10:24: MainActivity paused 2024-07-29 12:11:15: MainActivity resumed
- The local playlist is not getting updated after adding songs. I need to close the app and reopen to see new songs in the local playlist. The songs are added in the original online playlist correctly.
Sync it to YouTube Music and remove this local, then sync this again to fix
Sync it to YouTube Music and remove this local, then sync this again to fix
The local playlist is already synced when imported to SimpMusic. I deleted the local and added the same playlist to local playlists.
The problem is still there
I mean you remove the local playlist and create one new
I mean you remove the local playlist and create one new
https://github.com/user-attachments/assets/0808fb59-b3f3-4a6c-a159-27b786af97e3
- created a new local playlist
- synced it to YTmusic
- added songs to local playlist
Song is missing in synced local playlist but present in YT music
May be latest nightly ver fixed
May be latest nightly ver fixed
The problem is still there. Local playlist is updating only after restarting the app.
I tested in playlist with 559 songs. Delete or add working okay. You need to redo this https://github.com/maxrave-dev/SimpMusic/issues/346#issuecomment-2255069540
I tested in playlist with 559 songs. Delete or add working okay. You need to redo this https://github.com/maxrave-dev/SimpMusic/issues/346#issuecomment-2255069540
Could you please post a video of every step you've done? Maybe I'm not able to understand the steps properly