Skip to content
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

Stop not clearing playback session in dashboard if playback was already paused #961

Open
ilia-21 opened this issue Nov 20, 2024 · 11 comments
Labels
bug Something isn't working playback reporting Issues related to playback reporting redesign-beta Issues related to the beta/redsigned version of Finamp

Comments

@ilia-21
Copy link

ilia-21 commented Nov 20, 2024

Hello! Thank you for making this amazing app!
I'm using it with jellyfin-rpc to show my activity on discord. I noticed that when I pause the song and stop playback it still shows up in my profile. jellyfin-rpc takes data from the dashboard so I checked it, and there still was my session. I tried closing the app, even killing it, session was still there. Important that it doesn't happen if I stop the playback (swipe down) while song is still playing.

Repro steps:

  1. Go to settings > Audio service > Report current queue to server?: ON
  2. Play a song
  3. Pause it
  4. Swipe down to stop playback
  5. Open jellyfin dashboard to see that the song is still reported
@Chaphasilor Chaphasilor changed the title [9.9 Beta] "Report current queue to server" keeps reporting playback after stopping if the song is paused Stop not clearing playback session in dashboard if playback was already paused Nov 21, 2024
@Chaphasilor Chaphasilor added bug Something isn't working playback reporting Issues related to playback reporting redesign-beta Issues related to the beta/redsigned version of Finamp labels Nov 21, 2024
@Chaphasilor
Copy link
Collaborator

For me on Android stopping actually never clears the session. Stopping without pausing resets the position to 0 seconds, and stopping after pausing first won't change the position at all.
In neither caseis the session cleared, which is definitely a bug.

Which platform are you on?

@ilia-21
Copy link
Author

ilia-21 commented Nov 21, 2024

Hello, thank you for reply.
Im on Android 14, (Galaxy A15 with One UI 6.1 if this is relevant)

Looks like you are right, after I stop playback if the song is playing it will show this:
image
Then after a minute or so as you said it will report as paused on 0 seconds.
I tried changing Audio Service > Playback Session Update Frequency to a smaller number, and looks like it is the exact time between no playback and reporting as paused on 0 seconds. So for example if I set Update Frequency to 100 seconds:

  1. I stop playback
  2. Shows as session ended
  3. 100 seconds later it shows that playback is paused at 0 seconds

Also another thing that maybe important is if I close the app right after stopping playback it won't send my session to the server

@Chaphasilor
Copy link
Collaborator

Interesting, in my case the dashboard never shows the playback as stopped. It just shows as paused and then after "update frequency" seconds resets to 0 seconds.

Getting the update to properly reflect the status should be easy, I'm not sure about the rest of the behavior. I'll take a lool tomorrow, since I want playback reporting to be as solid as possible!

@HamletDuFromage
Copy link

I'm unsure if it's the same issue, if it isn't I'll open a new one. But I paused this song, put Finamp in the background and after 30+ minutes it's still showing in the activity tab. Finamp settings mention that after 5 minutes, jellyfin stops reporting the client but it's obviously not happening. I'm unsure if it's a jellyfin or Finamp issue.
image

@Chaphasilor
Copy link
Collaborator

@HamletDuFromage that is actually by design! As long as Finamp is running and "playing" something (not stopped), it will also keep the session in the server dashboard active.

@HamletDuFromage
Copy link

Ah I see, my bad then :o
Can playback be stopped from the app itself? I guess I always just use the pause button whenever I stop listening to music.

@Chaphasilor
Copy link
Collaborator

No worries!
You can stop by swiping down on the "mini player" bar at the bottom. It might trigger your phone's one-handed mode, but should stop playback (the bar will disappear).
We are aware that it's not ideal and will add a proper button for this in the future :)

@HamletDuFromage
Copy link

Playback did indeed return to 0 after swiping down, and in term I assume will disappear from the dashboard. Thanks :)
I guess I would like a timeout feature, where the client closes the session after n minutes/hours of inactivity but maybe it's just personal nitpick. It certainly doesn't matter much. Awesome piece of software in any case, thank you for your contributions to it.

@ilia-21
Copy link
Author

ilia-21 commented Nov 24, 2024

>We are aware that it's not ideal and will add a proper button for this in the future :)

Off topic, but it felt natural for me when I first used the app. I tried to stop playback by swiping left/right, but it changed song instead, so swiping down was the only option I could think of and it worked

@Chaphasilor
Copy link
Collaborator

@ilia-21 yeah we'll definitely keep that gesture, but it certainly isn't super obvious to find. A properly labeled button in addition to the gesture should fix that.

@Chaphasilor
Copy link
Collaborator

Chaphasilor commented Dec 11, 2024

Okay, so after spending way to long on this issue (around 3h), I think I finally fixed it. I was chasing ghosts for the longest time, the final fix wasn't too complicated. Hopefully this doesn't break anything else...
Edit: Will be released with the next beta update :)

@Chaphasilor Chaphasilor moved this from In Progress to Done in Finamp Redesign Dec 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working playback reporting Issues related to playback reporting redesign-beta Issues related to the beta/redsigned version of Finamp
Projects
Status: Done
Development

No branches or pull requests

3 participants