Playcount not updated for last song when casting to upmpdcli

Issue description:

When casting to upmpdcli from symfonium, the playcount of the last song is not incremented.

Logs:

Upload description: 655321 last song playcount not updated, lms + upmpdcli

Additional information:

 
It happens consistently (4 times today while I was reading) and I did create logs for the last album. The last title always plays successfully (and is scrobbled through panoscrobbler) so at least for me it’s only a cosmetic issue. I just thought I’d report it anyways.
 

Reproduction steps:

 

  1. Start casting to pi running upmpdcli.
  2. Start playback of an entire album, provider is LMS.
  3. It completes playing but the playcount of the last title is not increased.

 

Media provider:

Subsonic

Screenshots:

     

I have the same setup, could test in thext days.

I have one new album I played yesterday (casting from LMS to Kodi though) that still has play count 0 at LMS, but 1 in Symfonium. Could this be a LMS issue?

But you meant song play count, not album play count, right? Interestingly, the song play count for said album seems to be 1 for all tracks on LMS…

Yeah, song play count. All tracks get a 1, except for the last track of each album. The tracks also don’t show up in the “last played” list. However they were played since panoscrobbler picked them up and scrobbled them.
Looks like this in Symfonium:


And like this in PanoScrobbler:

Playcount of these tracks is also 0 in LMS:

OK, just tried it with a short 2-track album, but both album and the two songs got their play count properly increased both on Symfonium and LMS side.

Does the issue occur every time on or only occasionally?

I’ve only actively used LMS as provider for a couple days, but today it happened for 5 out of 5 albums. I just checked all of them. Did you start your test album by pressing the ▷ Play button on the album page? That’s what I did.

Yes, that is what I did as well. Also my phone was active all the time.

From the logs your devices does something fancy with Symfonium and seems to reduce the cpu allocated or pauses it.
Leading to the app not being able to have the proper states from the renderer. And the last media is set with a resume point instead of being seen as played since Symfonium was not able to get the status for a very long time.

Seems to start happening nearly after 30 minutes so pretty sure if you play an album that have a 10 minute duration it will work properly.

See https://dontkillmyapp.com/ and ensure there’s no battery restriction active.

You can check the logs and see the request for renderer position. It works nicely nearly all the time then start to behave abnormaly:

 Verbose  <AbsTime>0:01:30</AbsTime>
 Verbose  <AbsTime>0:01:31</AbsTime>
 Verbose  <AbsTime>0:01:32</AbsTime>
 Verbose  <AbsTime>0:01:33</AbsTime>
 Verbose  <AbsTime>0:02:14</AbsTime>
 Verbose  <AbsTime>0:02:15</AbsTime>
 Verbose  <AbsTime>0:02:19</AbsTime>
 Verbose  <AbsTime>0:02:20</AbsTime>
 Verbose  <AbsTime>0:02:21</AbsTime>
 Verbose  <AbsTime>0:02:26</AbsTime>
 Verbose  <AbsTime>0:03:00</AbsTime>
 Verbose  <AbsTime>0:03:11</AbsTime>
 Verbose  <AbsTime>0:00:00</AbsTime>
1 Like

Damn OnePlus and their battery optimization.

Probably a bit sooner since it also happened with 2 EPs around 24 minutes each.

Already went through the steps described there to get PanoScrobbler working and allowed Symfonium to run in the background while I was at it (thinking that would be enough). Now I’ve also locked it and explicitly forbade energy optimazitation for it (they do love to hide these settings in different places).

Just tested a 33min album and the last track also got a playcount of 1, so this is resolved.