libsaria: Remove library::find_filepath()

I can do this easier with library::lookup() since this avoids having to
loop on the entire track_list.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
This commit is contained in:
Bryan Schumaker 2012-02-20 10:02:56 -05:00
parent cc224376fa
commit 8b9457a8d0
3 changed files with 2 additions and 8 deletions

View File

@ -43,7 +43,6 @@ namespace libsaria
string next_file();
void add_path(string);
void remove_path(string);
string find_filepath(sid_t &);
Track *lookup(sid_t &);
void for_each_path(void (*)(struct PathInfo &));

View File

@ -41,7 +41,8 @@ namespace libsaria
void play_id(sid_t &songid)
{
println("Playing id: %lu", songid);
string filepath = library::find_filepath(songid);
Track *track = library::lookup(songid);
string filepath = track->get_filepath();
println(filepath);
play_file(filepath);
}

View File

@ -74,10 +74,4 @@ namespace libsaria
return filepath;
}
string library::find_filepath(sid_t &songid)
{
find_id(songid);
return (*current)->get_filepath();
}
} /* Namespace: libsaria */