Skip to content
Browse files

ensure we serialize all members of CMusicInfoTag. fixes issues with a…

…rt vanishing on large lists from the music library after it's loaded off the filesystem.
  • Loading branch information...
1 parent c5e8881 commit 2908a127413f1ba4486b6a440e043718345f086e Jonathan Marshall committed
Showing with 11 additions and 1 deletion.
  1. +11 −1 xbmc/music/tags/MusicInfoTag.cpp
View
12 xbmc/music/tags/MusicInfoTag.cpp
@@ -628,6 +628,11 @@ void CMusicInfoTag::Archive(CArchive& ar)
ar << m_rating;
ar << m_iTimesPlayed;
ar << m_iAlbumId;
+ ar << m_iDbId;
+ ar << m_type;
+ ar << m_strLyrics;
+ ar << m_bCompilation;
+ ar << m_listeners;
@jmarshallnz Team Kodi member

@Montellese you might want to take a look to see if you want any of these in JSON-RPC. id and type seem reasonable. Lyrics is only there at playback time, compilation should be there always, but not sure. Listeners only applies to some add-on stuff (lastfm).

@Montellese Team Kodi member

JSON-RPC has its own handling of IDs and types but they rely on m_iDbId and m_type, just not through the Serialize() method (because depending on the JSON-RPC method we either return "id" and "type" or we just return "albumid" or "songid" etc). Compilation would probably be the only real interesting member but I'll just add it post-Frodo because there are also requests for a "compilationonly" parameter in AudioLibrary.GetAlbums so better do it all together. Adding lyricas and listeners might just confuse devs because they are rarely available and only in certain circumstances.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
}
else
{
@@ -651,7 +656,12 @@ void CMusicInfoTag::Archive(CArchive& ar)
ar >> m_rating;
ar >> m_iTimesPlayed;
ar >> m_iAlbumId;
- }
+ ar >> m_iDbId;
+ ar >> m_type;
+ ar >> m_strLyrics;
+ ar >> m_bCompilation;
+ ar >> m_listeners;
+ }
}
void CMusicInfoTag::Clear()

0 comments on commit 2908a12

Please sign in to comment.
Something went wrong with that request. Please try again.