47 lines
1.3 KiB
Diff
47 lines
1.3 KiB
Diff
|
diff -Nur taglib-1.5/taglib/ogg/xiphcomment.cpp taglib/taglib/ogg/xiphcomment.cpp
|
||
|
--- taglib-1.5/taglib/ogg/xiphcomment.cpp 2008-02-04 16:14:46.000000000 +0100
|
||
|
+++ taglib/taglib/ogg/xiphcomment.cpp 2009-07-11 15:17:06.000000000 +0200
|
||
|
@@ -103,16 +103,20 @@
|
||
|
|
||
|
TagLib::uint Ogg::XiphComment::year() const
|
||
|
{
|
||
|
- if(d->fieldListMap["DATE"].isEmpty())
|
||
|
- return 0;
|
||
|
- return d->fieldListMap["DATE"].front().toInt();
|
||
|
+ if(!d->fieldListMap["DATE"].isEmpty())
|
||
|
+ return d->fieldListMap["DATE"].front().toInt();
|
||
|
+ if(!d->fieldListMap["YEAR"].isEmpty())
|
||
|
+ return d->fieldListMap["YEAR"].front().toInt();
|
||
|
+ return 0;
|
||
|
}
|
||
|
|
||
|
TagLib::uint Ogg::XiphComment::track() const
|
||
|
{
|
||
|
- if(d->fieldListMap["TRACKNUMBER"].isEmpty())
|
||
|
- return 0;
|
||
|
- return d->fieldListMap["TRACKNUMBER"].front().toInt();
|
||
|
+ if(!d->fieldListMap["TRACKNUMBER"].isEmpty())
|
||
|
+ return d->fieldListMap["TRACKNUMBER"].front().toInt();
|
||
|
+ if(!d->fieldListMap["TRACKNUM"].isEmpty())
|
||
|
+ return d->fieldListMap["TRACKNUM"].front().toInt();
|
||
|
+ return 0;
|
||
|
}
|
||
|
|
||
|
void Ogg::XiphComment::setTitle(const String &s)
|
||
|
@@ -142,6 +146,7 @@
|
||
|
|
||
|
void Ogg::XiphComment::setYear(uint i)
|
||
|
{
|
||
|
+ removeField("YEAR");
|
||
|
if(i == 0)
|
||
|
removeField("DATE");
|
||
|
else
|
||
|
@@ -150,6 +155,7 @@
|
||
|
|
||
|
void Ogg::XiphComment::setTrack(uint i)
|
||
|
{
|
||
|
+ removeField("TRACKNUM");
|
||
|
if(i == 0)
|
||
|
removeField("TRACKNUMBER");
|
||
|
else
|