libsaria: Remove the list_recent field from tracks

I think it's easier to check if the track has an associated library
path.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
This commit is contained in:
Bryan Schumaker 2012-05-15 10:49:56 -04:00
parent d7166f3cab
commit d0f6996403
2 changed files with 2 additions and 7 deletions

View File

@ -30,7 +30,6 @@ namespace libsaria
int bitrate;
int sample;
int channels;
bool list_recent;
string *artist_lc;
string *album_lc;

View File

@ -77,13 +77,11 @@ namespace libsaria
Track::Track()
{
list_recent = false;
}
Track::Track(string file)
{
filepath = file;
list_recent = false;
read_tags();
}
@ -95,7 +93,6 @@ namespace libsaria
last_day = 0;
last_month = 0;
last_year = 0;
list_recent = true;
read_tags();
@ -137,7 +134,6 @@ namespace libsaria
artist_lc = lowercase(artist);
album_lc = lowercase(album);
list_recent = true;
}
Track::~Track()
@ -166,15 +162,15 @@ namespace libsaria
cur->mark_played();
println("Loading: " + title + " by " + artist);
audio::load(filepath, play);
if (path) {
deck::list_recent(this);
prefs::set("libsaria.current.library", path->id);
prefs::set("libsaria.current.track", id);
}
cur = this;
audio::load(filepath, play);
deck::list_recent(this);
}
Track *current_track()