Turns out that, the queue emptying is due to mediascanner2 reporting that tracks have changed, then when the music-app checks that the tracks still exist in the queue, it was giving urls with file:// at the start (urls coming direct from qtubuntu-media playlist) causing mediascanner2 to tell us that they don't exist. Which then meant the music-app removed all the tracks and therefore the playback stopped.
With that fixed in the music-app, there is at least one case where the audio still stops (taking a screenshot) this appears to be due to the screenshot audio using the incorrect audio role (it should be using alert).
Therefore this bug is now invalid, and I'll report the two bugs found (mediascanner2 not accepting file:// and screenshot using the wrong role).
Turns out that, the queue emptying is due to mediascanner2 reporting that tracks have changed, then when the music-app checks that the tracks still exist in the queue, it was giving urls with file:// at the start (urls coming direct from qtubuntu-media playlist) causing mediascanner2 to tell us that they don't exist. Which then meant the music-app removed all the tracks and therefore the playback stopped.
With that fixed in the music-app, there is at least one case where the audio still stops (taking a screenshot) this appears to be due to the screenshot audio using the incorrect audio role (it should be using alert).
Therefore this bug is now invalid, and I'll report the two bugs found (mediascanner2 not accepting file:// and screenshot using the wrong role).