1
0
Fork 0
forked from len0rd/rockbox

Fix for FS#8082:

runtime data fields are filled like any other fields in the mp3entry struct during the call to get_metadata(); HWCODEC still uses the old callback mechanism

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15463 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Robert Kukla 2007-11-04 21:11:40 +00:00
parent 31c1164c49
commit ca1b920896
3 changed files with 11 additions and 3 deletions

View file

@ -26,6 +26,9 @@
#include "playback.h" #include "playback.h"
#include "debug.h" #include "debug.h"
#include "logf.h" #include "logf.h"
#ifdef HAVE_TAGCACHE
#include "tagtree.h"
#endif
#include "cuesheet.h" #include "cuesheet.h"
#if CONFIG_CODEC == SWCODEC #if CONFIG_CODEC == SWCODEC
@ -319,6 +322,10 @@ bool get_metadata(struct mp3entry* id3, int fd, const char* trackname)
lseek(fd, 0, SEEK_SET); lseek(fd, 0, SEEK_SET);
strncpy(id3->path, trackname, sizeof(id3->path)); strncpy(id3->path, trackname, sizeof(id3->path));
#ifdef HAVE_TAGCACHE
tagtree_buffer_event(id3);
#endif
return true; return true;
} }

View file

@ -633,10 +633,8 @@ static int compare(const void *p1, const void *p2)
return strncasecmp(e1->name, e2->name, MAX_PATH); return strncasecmp(e1->name, e2->name, MAX_PATH);
} }
static void tagtree_buffer_event(struct mp3entry *id3) void tagtree_buffer_event(struct mp3entry *id3)
{ {
(void)id3;
/* Do not gather data unless proper setting has been enabled. */ /* Do not gather data unless proper setting has been enabled. */
if (!global_settings.runtimedb) if (!global_settings.runtimedb)
return; return;
@ -923,7 +921,9 @@ void tagtree_init(void)
root_menu = 0; root_menu = 0;
uniqbuf = buffer_alloc(UNIQBUF_SIZE); uniqbuf = buffer_alloc(UNIQBUF_SIZE);
#if CONFIG_CODEC != SWCODEC
audio_set_track_buffer_event(tagtree_buffer_event); audio_set_track_buffer_event(tagtree_buffer_event);
#endif
audio_set_track_unbuffer_event(tagtree_unbuffer_event); audio_set_track_unbuffer_event(tagtree_unbuffer_event);
} }

View file

@ -48,6 +48,7 @@ char *tagtree_get_title(struct tree_context* c);
int tagtree_get_attr(struct tree_context* c); int tagtree_get_attr(struct tree_context* c);
int tagtree_get_icon(struct tree_context* c); int tagtree_get_icon(struct tree_context* c);
int tagtree_get_filename(struct tree_context* c, char *buf, int buflen); int tagtree_get_filename(struct tree_context* c, char *buf, int buflen);
void tagtree_buffer_event(struct mp3entry *id3);
#endif #endif
#endif #endif