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:
parent
cc224376fa
commit
8b9457a8d0
|
@ -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 &));
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -74,10 +74,4 @@ namespace libsaria
|
|||
return filepath;
|
||||
}
|
||||
|
||||
string library::find_filepath(sid_t &songid)
|
||||
{
|
||||
find_id(songid);
|
||||
return (*current)->get_filepath();
|
||||
}
|
||||
|
||||
} /* Namespace: libsaria */
|
||||
|
|
Loading…
Reference in New Issue