Bug 77926 - wish: part-of-set (multiple disc) support in tags
Summary: wish: part-of-set (multiple disc) support in tags
Status: RESOLVED WORKSFORME
Alias: None
Product: taglib
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: unspecified
Platform: Gentoo Packages Linux
: NOR wishlist
Target Milestone: ---
Assignee: Scott Wheeler
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-03-18 17:11 UTC by philip.falkner
Modified: 2004-03-19 01:05 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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;