Commit 45f4de81 authored by Scott Wheeler's avatar Scott Wheeler

Finished the reading of Ogg tags. Next up writing Ogg tags; thereafter

moving on to writing Ogg tags, then moving the AudioData class under the
scope of the Tag class (despite it not actually being tag information) so
that the AudioData can use the same abstraction mechanism that is currently
being employed by Tag and its subclasses.

svn path=/trunk/kdemultimedia/juk/; revision=182669
parent 22ba13ca
......@@ -17,6 +17,8 @@
#include <kdebug.h>
#include <qdatetime.h>
#include "oggtag.h"
#include "genrelistlist.h"
......@@ -42,7 +44,7 @@ void OggTag::save()
QString OggTag::track() const
{
return readCommentString("Album");
return readCommentString("Title");
}
QString OggTag::artist() const
......@@ -74,17 +76,26 @@ QString OggTag::trackNumberString() const
int OggTag::year() const
{
return readCommentInt("Year");
QDateTime d = QDateTime::fromString(readCommentString("Date"), Qt::ISODate);
if(d.isValid())
return(d.date().year());
else
return(0);
}
QString OggTag::yearString() const
{
return readCommentString("Year");
QDateTime d = QDate::fromString(readCommentString("Date"), Qt::ISODate);
if(d.isValid())
return(QString::number(d.date().year()));
else
return(QString::null);
}
QString OggTag::comment() const
{
return(QString::null);
return readCommentString("Description");
}
bool OggTag::hasTag() const
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment