1
0
Fork 0
forked from len0rd/rockbox

Added ID3 database support for individual tracks in the context menu

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7421 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Linus Nielsen Feltzing 2005-08-30 07:52:36 +00:00
parent d565269cfa
commit 196376c3c2
4 changed files with 34 additions and 10 deletions

View file

@ -478,6 +478,22 @@ void db_exit(struct tree_context* c)
c->firstpos = c->pos_history[c->dirlevel];
}
int db_get_filename(struct tree_context* c, char *buf, int buflen)
{
int rc;
int filenum = c->dircursor + c->dirstart;
int pathoffset = ((int*)c->dircache)[filenum * c->dentry_size + 1];
lseek(tagdb_fd, pathoffset, SEEK_SET);
rc = read(tagdb_fd, buf, buflen);
if (rc < tagdbheader.songlen) {
DEBUGF("short path read(%ld) = %d\n", sizeof(buf), rc);
return -2;
}
return 0;
}
static int db_play_folder(struct tree_context* c)
{
char buf[MAX_PATH];