Play count and last played are not updated after playing when queuing with API

App version

Production

Issue description

The play count and last played are not updated after playing songs. It happens only when I queue the songs with external apps through the API.

Device type

Phone

Media provider

Navidrome

Steps to reproduce

  1. Have at least two songs in the library
  2. Use an external app to send broadcast to Symfonium using MEDIA_START with
  • { "MEDIA_TYPE": "song", "FILE": "<file1>" } and wait for 100ms, then
  • { "MEDIA_TYPE": "song", "FILE": "<file2>", "QUEUE": 2 }
  1. Wait for the songs to finish playing

The play count and last played are not updated for either of the songs.

It doesn’t seem to happen when only one song is queued, and it doesn’t seem to happen if the interval between queuing is larger (e.g. 1s), indicating there may be some race conditions involve.

I searched existing issues first

on

I understand that logs are mandatory

on

Log upload name / description

queue-play-count

Also, it seems that normally the play queue would be discarded after finish playing, but when this bug happens, the queue stays there until manual clean.