moved fallback APE/ID3 tag loader to song.c

Some plugins used the APE or ID3 tag loader as a fallback when their
own methods of loading tags did not work.  Move this code out of all
decoder plugins, into song_file_update().
This commit is contained in:
Max Kellermann
2009-01-17 13:23:42 +01:00
parent 43eefe9c41
commit 5395f5f6b3
7 changed files with 55 additions and 58 deletions

View File

@@ -443,19 +443,18 @@ aac_stream_decode(struct decoder *mpd_decoder, struct input_stream *inStream)
static struct tag *aacTagDup(const char *file)
{
struct tag *ret = NULL;
int file_time = getAacTotalTime(file);
struct tag *tag;
if (file_time >= 0) {
if ((ret = tag_id3_load(file)) == NULL)
ret = tag_new();
ret->time = file_time;
} else {
if (file_time < 0) {
g_debug("aacTagDup: Failed to get total song time from: %s\n",
file);
return NULL;
}
return ret;
tag = tag_new();
tag->time = file_time;
return tag;
}
static const char *const aac_suffixes[] = { "aac", NULL };