Musify icon indicating copy to clipboard operation
Musify copied to clipboard

[Bug] Repeat button isnt doing his job.

Open ErenayDev opened this issue 11 months ago • 33 comments

Acknowledgements

  • [x] I have searched the existing issues and confirmed that this is a new issue, not a duplicate or related to another open issue.
  • [x] I read the FAQ section and there's nothing mentioned about this issue.
  • [x] I have written a short but informative title.
  • [x] I have updated the app to the latest version. You can find the latest version here.
  • [x] I will fill out all the sections in this issue report.

Current Behavior

The "repeat" button doesn't loop the music.

sorry for watermark

https://github.com/user-attachments/assets/5ae35ca0-1077-44f5-bef9-a3c00f5611cb

Expected Behavior

The "repeat" button should have played the music indefinitely.

Steps To Reproduce

  1. Open a playlist and choose a random song.
  2. Select repeat mode.
  3. Wait for music finishes.

This problem applies regardless of whether it's an offline playlist or any other playlist.

Musify Version

9.7.2 (latest)

Device And Operating System

Samsung A16 SMA16F/DSB, OneUI 7

Android Version You Use

Android 15

Additional Information

Logs when repeat mode active:

# offline list

[2025-12-27 21:33:51.046315] [PLAY_FROM_QUEUE] Called with index=9, _currentLoadingIndex=-1:

[2025-12-27 21:34:02.253810] [PLAY_FROM_QUEUE] Called with index=10, _currentLoadingIndex=9:

[2025-12-27 21:34:03.367784] [COMPLETION] Flag already false in finally block (was overridden):

[2025-12-27 21:52:44.570325] [PLAY_FROM_QUEUE] Called with index=12, _currentLoadingIndex=-1:

[2025-12-27 21:52:57.488995] [PLAY_FROM_QUEUE] Called with index=13, _currentLoadingIndex=12:

-----

# my liked songs list

[2025-12-27 21:57:10.662459] [PLAY_FROM_QUEUE] Called with index=7, _currentLoadingIndex=-1:

[2025-12-27 21:57:15.927772] [PLAY_FROM_QUEUE] Called with index=8, _currentLoadingIndex=-1:

[2025-12-27 21:57:32.309490] [PLAY_FROM_QUEUE] Called with index=9, _currentLoadingIndex=-1:

[2025-12-27 21:57:34.205045] [COMPLETION] Flag already false in finally block (was overridden):


Probably this commit occurring this issue: https://github.com/gokadzev/Musify/commit/382fcaf867298e02cd3a65d5a38f38a790c58fe0

Before 9.7.2, works correctly.

Am I missing something?

Sorry for my English.

ErenayDev avatar Dec 27 '25 19:12 ErenayDev

@ErenayDev hm, this custom implementation of queue becomes more and more complex.... would you be able to check test builds?

gokadzev avatar Dec 27 '25 19:12 gokadzev

Can you link to test build APK?

ErenayDev avatar Dec 27 '25 19:12 ErenayDev

Can you link to test build APK?

https://github.com/gokadzev/Musify/releases/download/master/Musify-arm64-v8a.apk

gokadzev avatar Dec 27 '25 19:12 gokadzev

Still same unfortunaly

ErenayDev avatar Dec 27 '25 19:12 ErenayDev

Logs:

[2025-12-27 22:27:58.326647] [PLAY_FROM_QUEUE] Called with index=13, _currentLoadingIndex=-1:

[2025-12-27 22:28:13.222224] [PLAY_FROM_QUEUE] Called with index=14, _currentLoadingIndex=13:

[2025-12-27 22:29:04.454220] [PLAY_FROM_QUEUE] Called with index=13, _currentLoadingIndex=-1:

ErenayDev avatar Dec 27 '25 19:12 ErenayDev

Logs:

[2025-12-27 22:27:58.326647] [PLAY_FROM_QUEUE] Called with index=13, _currentLoadingIndex=-1:

[2025-12-27 22:28:13.222224] [PLAY_FROM_QUEUE] Called with index=14, _currentLoadingIndex=13:

[2025-12-27 22:29:04.454220] [PLAY_FROM_QUEUE] Called with index=13, _currentLoadingIndex=-1:

new build (the same link): https://github.com/gokadzev/Musify/releases/download/master/Musify-arm64-v8a.apk

gokadzev avatar Dec 27 '25 19:12 gokadzev

Now, when the music ends, instead of playing it again, it does nothing. So, skipping to other songs has been resolved.

Image

Logs:

[2025-12-27 22:48:46.073115] [PLAY_FROM_QUEUE] Called with index=1, _currentLoadingIndex=-1:

[2025-12-27 22:48:59.036930] [PLAY_FROM_QUEUE] Called with index=2, _currentLoadingIndex=1:

ErenayDev avatar Dec 27 '25 19:12 ErenayDev

Now, when the music ends, instead of playing it again, it does nothing. So, skipping to other songs has been resolved.

Logs:

[2025-12-27 22:48:46.073115] [PLAY_FROM_QUEUE] Called with index=1, _currentLoadingIndex=-1:

[2025-12-27 22:48:59.036930] [PLAY_FROM_QUEUE] Called with index=2, _currentLoadingIndex=1:

https://github.com/gokadzev/Musify/releases/download/master/Musify-arm64-v8a.apk

gokadzev avatar Dec 27 '25 20:12 gokadzev

Still same. No action after music ends.

Logs:

[2025-12-27 23:04:34.476427] [PLAY_FROM_QUEUE] Called with index=0, _currentLoadingIndex=-1:

[2025-12-27 23:04:48.955878] [PLAY_FROM_QUEUE] Called with index=1, _currentLoadingIndex=0:

The problem isn't with me, is it? So maybe I'm doing something wrong. Could you try checking it too(with your phone)?

ErenayDev avatar Dec 27 '25 20:12 ErenayDev

Still same. No action after music ends.

Logs:

[2025-12-27 23:04:34.476427] [PLAY_FROM_QUEUE] Called with index=0, _currentLoadingIndex=-1:

[2025-12-27 23:04:48.955878] [PLAY_FROM_QUEUE] Called with index=1, _currentLoadingIndex=0: The problem isn't with me, is it? So maybe I'm doing something wrong. Could you try checking it too(with your phone)?

The problem is definitely not you. Because of dynamic link fetching, I had to create a custom queue implementation. Over time, I added more and more features, and now it’s quite messy. I'll continue investigating and testing myself, it will take some time to refactor the implementation.

gokadzev avatar Dec 27 '25 20:12 gokadzev

Thank you. I will use 9.7.1 until the problem is resolved.

ErenayDev avatar Dec 27 '25 20:12 ErenayDev

It's interesting because in 9.7.1, someone else had this problem with the repeat feature (https://github.com/gokadzev/Musify/issues/680). After their testing and mine, I thought it was fixed. But I guess you don't have that problem on 9.7.1.

gokadzev avatar Dec 27 '25 20:12 gokadzev

@ErenayDev new build: https://github.com/gokadzev/Musify/releases/download/master/Musify-arm64-v8a.apk

gokadzev avatar Dec 28 '25 07:12 gokadzev

Everything works as expected! Should I close the issue? or more debug needed? I tried 3 different repeat modes. All of them works.

Logs:

[2025-12-28 11:08:49.180745] [PLAY_FROM_QUEUE] Called with index=1, _currentLoadingIndex=-1:

[2025-12-28 11:09:13.220897] [PLAY_FROM_QUEUE] Called with index=1, _currentLoadingIndex=1:

[2025-12-28 11:09:24.801673] [PLAY_FROM_QUEUE] Called with index=2, _currentLoadingIndex=-1:

[2025-12-28 11:09:39.165782] [PLAY_FROM_QUEUE] Called with index=3, _currentLoadingIndex=-1:

[2025-12-28 11:09:51.634881] [PLAY_FROM_QUEUE] Called with index=11, _currentLoadingIndex=-1:

[2025-12-28 11:09:51.651283] [COMPLETION] Flag already false in finally block (was overridden):

ErenayDev avatar Dec 28 '25 08:12 ErenayDev

Everything works as expected! Should I close the issue? or more debug needed? I tried 3 different repeat modes. All of them works.

Logs:

[2025-12-28 11:08:49.180745] [PLAY_FROM_QUEUE] Called with index=1, _currentLoadingIndex=-1:

[2025-12-28 11:09:13.220897] [PLAY_FROM_QUEUE] Called with index=1, _currentLoadingIndex=1:

[2025-12-28 11:09:24.801673] [PLAY_FROM_QUEUE] Called with index=2, _currentLoadingIndex=-1:

[2025-12-28 11:09:39.165782] [PLAY_FROM_QUEUE] Called with index=3, _currentLoadingIndex=-1:

[2025-12-28 11:09:51.634881] [PLAY_FROM_QUEUE] Called with index=11, _currentLoadingIndex=-1:

[2025-12-28 11:09:51.651283] [COMPLETION] Flag already false in finally block (was overridden):

Nope, If everything works there is no need of more testing, thanks! these logs were for debugging mainly, so they will be removed in the next release.

gokadzev avatar Dec 28 '25 08:12 gokadzev

Hi again, I encountered a problem in a new use case. Actually, this is my fault. In previous tests, I always tried them on a playlist. However, when I play music in the search section and set it to repeat mode, no action occurs when the music ends. I am sorry.

ErenayDev avatar Dec 28 '25 10:12 ErenayDev

Hi again, I encountered a problem in a new use case. Actually, this is my fault. In previous tests, I always tried them on a playlist. However, when I play music in the search section and set it to repeat mode, no action occurs when the music ends. I am sorry.

Are we talking about repeat playlist or repeat single song mode?

gokadzev avatar Dec 28 '25 10:12 gokadzev

Hi again, I encountered a problem in a new use case. Actually, this is my fault. In previous tests, I always tried them on a playlist. However, when I play music in the search section and set it to repeat mode, no action occurs when the music ends. I am sorry.

Are we talking about repeat playlist or repeat single song mode?

nevermind, I fixed the bug. I'll give you new build in several minutes

gokadzev avatar Dec 28 '25 10:12 gokadzev

@ErenayDev After your confirmation, I'll push it as a next hotfix release: https://github.com/gokadzev/Musify/releases/download/master/Musify-arm64-v8a.apk

gokadzev avatar Dec 28 '25 10:12 gokadzev

Now, it's the reverse. The single song mode is fixed, but the playlist mode has the previous issue (no action after music ends).

ErenayDev avatar Dec 28 '25 10:12 ErenayDev