diff options
author | Max Kellermann <max@duempel.org> | 2009-01-17 13:23:42 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2009-01-17 13:23:42 +0100 |
commit | 5395f5f6b34b6a98e94c8f3e8329150a2a4b9cac (patch) | |
tree | bb1e42988bd79c452b667da84ef662b45da8aa8e /src/decoder/mpc_plugin.c | |
parent | 43eefe9c41478f5605e4abd7e6c7fc6d710341e8 (diff) | |
download | mpd-5395f5f6b34b6a98e94c8f3e8329150a2a4b9cac.tar.gz mpd-5395f5f6b34b6a98e94c8f3e8329150a2a4b9cac.tar.xz mpd-5395f5f6b34b6a98e94c8f3e8329150a2a4b9cac.zip |
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().
Diffstat (limited to '')
-rw-r--r-- | src/decoder/mpc_plugin.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/src/decoder/mpc_plugin.c b/src/decoder/mpc_plugin.c index 5ef2c5448..23fa5787b 100644 --- a/src/decoder/mpc_plugin.c +++ b/src/decoder/mpc_plugin.c @@ -249,8 +249,8 @@ static float mpcGetTime(const char *file) static struct tag *mpcTagDup(const char *file) { - struct tag *ret = NULL; float total_time = mpcGetTime(file); + struct tag *tag; if (total_time < 0) { g_debug("mpcTagDup: Failed to get Songlength of file: %s\n", @@ -258,14 +258,9 @@ static struct tag *mpcTagDup(const char *file) return NULL; } - ret = tag_ape_load(file); - if (!ret) - ret = tag_id3_load(file); - if (!ret) - ret = tag_new(); - ret->time = total_time; - - return ret; + tag = tag_new(); + tag->time = total_time; + return tag; } static const char *const mpcSuffixes[] = { "mpc", NULL }; |