directory: added directory_lookup_song()

Moved code from db_get_song().
This commit is contained in:
Max Kellermann
2009-04-01 18:41:37 +02:00
parent 36ec2edacf
commit 7f38c3fc78
3 changed files with 41 additions and 25 deletions

View File

@@ -108,6 +108,16 @@ directory_prune_empty(struct directory *directory);
struct directory *
directory_lookup_directory(struct directory *directory, const char *uri);
/**
* Looks up a song by its relative URI.
*
* @param directory the parent (or grandparent, ...) directory
* @param uri the relative URI
* @return the song, or NULL if none was found
*/
struct song *
directory_lookup_song(struct directory *directory, const char *uri);
void
directory_sort(struct directory *directory);