ocarina/libsaria/track.cpp
Bryan Schumaker 6d7828b946 libsaria: Store library path as a linked list of track tags
Lookup by id will be slighly slower, but now I will have one list for
each path that can be merged together and sorted to represent the
library.  This sounds like a good tradeoff to me, especially since I can
store an iterator to the current track when deciding what to play next.
This will give me much faster access to song for the current track.
2011-11-06 11:16:46 -05:00

67 lines
742 B
C++

#include <libsaria/track.h>
#include <libsaria/tags.h>
Track::Track()
{
tags = NULL;
}
Track::Track(TrackTag *tag)
{
tags = tag;
}
Track::~Track()
{
}
ino_t Track::get_inode()
{
if (tags)
return tags->get_inode();
return 0;
}
unsigned int Track::get_track()
{
if (tags)
return tags->get_track();
return 0;
}
string Track::get_title()
{
if (tags)
return tags->get_title();
return "";
}
string Track::get_lenstr()
{
if (tags)
return tags->get_lenstr();
return "";
}
string Track::get_artist()
{
if (tags)
return tags->get_artist();
return "";
}
string Track::get_album()
{
if (tags)
return tags->get_album();
return "";
}
unsigned int Track::get_year()
{
if (tags)
return tags->get_year();
return 0;
}