After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 639809 - MediaExport plugin does not account for disc number when sorting
MediaExport plugin does not account for disc number when sorting
Status: RESOLVED FIXED
Product: rygel
Classification: Applications
Component: MediaExport plugin
git master
Other Linux
: Normal normal
: ---
Assigned To: Jens Georg
rygel-maint
Depends on:
Blocks:
 
 
Reported: 2011-01-18 03:33 UTC by Stephen Moehle
Modified: 2012-08-12 17:54 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Account for disc number when sorting. (992 bytes, patch)
2011-01-18 03:33 UTC, Stephen Moehle
none Details | Review

Description Stephen Moehle 2011-01-18 03:33:43 UTC
Created attachment 178580 [details] [review]
Account for disc number when sorting.

The MediaExport plugin does not take into account the disc number, GST_TAG_ALBUM_VOLUME_NUMBER, when sorting. Class Rygel.MediaExport.SQLFactory looks at the track number when sorting. Indeed, MusicItem does not even have the disc number. As a result, multiple-disc sets are not sorted properly. The tracks from the different discs get grouped together by track number.

I see two ways to fix this. The first is to add disc_number to MusicItem and use it where necessary.

The second is more of a work around than anything. In fill_music_item() in rygel-media-export-item.vala, make track_number do double duty by reflecting both the track number and the disc number with something like:

            uint tmp;
            dlna_info.info.tags.get_uint (TAG_TRACK_NUMBER, out tmp);
            item.track_number = (int) tmp;
            dlna_info.info.tags.get_uint (TAG_ALBUM_VOLUME_NUMBER, out tmp);
            item.track_number += (int)(tmp * 1000);

In fact, I am attaching this second option as a patch against the gnome-2-32 branch since it at least get things sorted properly on my DLNA clients, and I really do not know VALA.
Comment 1 Jens Georg 2011-04-23 09:31:11 UTC
Hi, thanks for your patch. The first way can't be done since UPnP has no (easy) understanding of disc numbers.