SongsModel.status is not set as MediaStatus.Ready if rowCount is zero
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ubuntu Music App |
Fix Released
|
High
|
Andrew Hayzen | ||
mediascanner2 |
Invalid
|
High
|
Unassigned |
Bug Description
Currently the Music app is attempting to integrate Content Hub support with the help of the streaming models provided by Mediascanner [1]. One of the changes we making is to properly detect when the models are loading vs there being no music on the device. Right now we are catching the onFilled signal to set the model to a 'populated' state. However, this also means that when new media is found (either by the user copying songs over, or because a song is imported via content hub) the rowCount is reset and we briefly detect that there is no music.
We are trying to make this check detect the empty state 1) allSongsModel.
[1] https:/
Related branches
- Ubuntu Phone Apps Jenkins Bot: Approve (continuous-integration)
- Victor Thompson: Approve
-
Diff: 55 lines (+15/-17)1 file modifiedmusic-app.qml (+15/-17)
summary: |
- SongsModel.status never seems to be set as MediaStatus.Ready + SongsModel.status is not set as MediaStatus.Ready if rowCount is zero |
description: | updated |
Changed in mediascanner2: | |
importance: | Undecided → High |
Changed in music-app: | |
importance: | Undecided → High |
tags: | added: rtm14 |
Changed in mediascanner2: | |
status: | Incomplete → Invalid |
Changed in music-app: | |
status: | Fix Committed → Fix Released |
Can you provide some code that demonstrates the bug?
I put together this simple program to try and reproduce the problem, but came up blank. When I run it, I get the following output:
qml: Status changed to 1, count = 0
qml: Status changed to 0, count = 5784
So the status property's notify signal is correctly firing for the Loading and Ready state changes. When I press enter, which updates the model to filter for artist "no such artist", I get some more output:
qml: Status changed to 1, count = 0
qml: Status changed to 0, count = 0
Since both the row count and status properties have notify signals, the bottom text component in the UI also updates to say "empty" at this point.