Bug 77926

Summary: wish: part-of-set (multiple disc) support in tags
Product: [Unmaintained] taglib Reporter: philip.falkner
Component: generalAssignee: Scott Wheeler <wheeler>
Status: RESOLVED WORKSFORME    
Severity: wishlist    
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Gentoo Packages   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description philip.falkner 2004-03-18 17:11:52 UTC
Version:            (using KDE KDE 3.2.1)
Installed from:    Gentoo Packages
Compiler:          gcc 3.3.2 
OS:          Linux

With id3v2.2+ and Xiph.org-style comments, there's support for explicitly storing the disc number, separate from the track number.  It's stored the same way as track numbers, either a single number or current/total.
If taglib supported this, then taglib-using programs could sort by disc and track, instead of just by track, so that disc 2 track 1 shows up after all of disc 1, instead of between disc 1 track 1  and disc 1 track 2 where it shows up now.

The frames are
id3v2.2: TPA
id3v2.3: TPOS
id3v2.4: TPOS
Xiph.org: DISCNUMBER=
Comment 1 Scott Wheeler 2004-03-19 01:05:58 UTC
TagLib does support this -- just not in the "generic" API.

You can do i.e.:

TagLib::MPEG::File f("foo.mp3");
if(f.ID3v2Tag() && !f.ID3v2Tag()->frameListMap()["TPOS"].isEmpty())
  std::cout << f.ID3v2Tag()->frameListMap()["TPOS"].front() << std::endl;

...or...

TagLib::Vorbis::File f("foo.ogg");
if(!f.tag()->fieldListMap()["DISCNUMBER"].isEmpty())
  std::cout << f.tag()->fieldListMap()["DISCNUMBER"].front() << std::endl;