Opened 14 years ago

Closed 14 years ago

#3981 closed defect (fixed)

MythMusic song rating & playcount update failure

Reported by: otto at kolsi dot fi Owned by: paulh
Priority: minor Milestone: 0.21
Component: mythmusic Version: head
Severity: medium Keywords:
Cc: Ticket locked: no


MythMusic seems to save rating and playcount (possibly other?) info to DB e.g. when plugin is exited and not every time these values change.

Now that MythMusic player re-builds the song tree/info if you update song metadata, if you have entered rating to a song or song playcount has increased, these values are not updated to DB. To reproduce: change rating of a currently playing song -> edit meetadata of another song -> save to file and DB -> go back to currently playing song and open metadata editor -> rating has not been changed (although the player currently shows the updated value).

I guess meta-data saving should update all pending values to DB before re-buiding the music tree. Haven't looked at the code but this is what it looks like.

There's another use case that fails currently that could be addressed if/when above problem is fixed: I use "not rated" smart playlist to listen songs and give ratings. Now if you want to "clear" the current playlist from the entries that you already have rated, you cannot just re-open the "not rated" smart playlist because the rating values have not been saved to DB. Instead you have to exit the player and start again. IMHO this should be fixed e.g. so that pending updates are written to DB when menu is opened or at least when new playlist is opened.

Change History (3)

comment:1 Changed 14 years ago by Roo <roo.watt@…>

When I created #3737 I found that a reread of the metadata before the setString() would update the track displayed info.

At the time though it was unclear why this worked as the data should have been properly updated when exiting the editDialog. I suspect there is a timing related issue at play.

I noticed that the editMeta = all_music->getMetadata( node->getInt() ); would not be needed if I had sufficient debugging "cout" statements before the setString() or it would work the first time after entering mythmusic.

I have been meaning to look into this further as I think it achieves what the tree build is trying to achieve at a lower cost. ie Update the string displayed for the edited track.

Caveat: I am not a programmer so I may be way off base here, if so just ignore this comment. :)

Check #3737 mythmusic-editmeta_v2.diff

comment:2 Changed 14 years ago by paulh

Milestone: unknown0.21
Owner: changed from Isaac Richards to paulh

comment:3 Changed 14 years ago by paulh

Resolution: fixed
Status: newclosed

(In [14750]) Save any pending metadata before re-building the music trees after showing the metadata editor. Previously any pending changes to play counts, ratings or last play times were being lost after showing the metadata editor.

Do the same before showing the smart playlists dialog so that the playlists are built using the up to date metadata from the DB.

Fixes #3981.

Note: See TracTickets for help on using tickets.