aboutsummaryrefslogtreecommitdiffstats
path: root/src/ls.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-01-04 17:26:22 +0100
committerMax Kellermann <max@duempel.org>2009-01-04 17:26:22 +0100
commitff72fff68da8edc9d28e0022425893d1641f21e5 (patch)
tree2ef8847032fddb93823e0b30c872c51a25c9ab75 /src/ls.c
parentd6b229e35c87cb246fcb77b2b04ac65adccc2b31 (diff)
downloadmpd-ff72fff68da8edc9d28e0022425893d1641f21e5.tar.gz
mpd-ff72fff68da8edc9d28e0022425893d1641f21e5.tar.xz
mpd-ff72fff68da8edc9d28e0022425893d1641f21e5.zip
ls: removed hasMusicSuffix() and get_archive_by_suffix()
Determine the suffix manually, and use decoder_plugin_from_suffix() and archive_plugin_from_suffix() instead. This way, song_file_update_inarchive() can be optimized: it does not have to translate its path.
Diffstat (limited to 'src/ls.c')
-rw-r--r--src/ls.c35
1 files changed, 0 insertions, 35 deletions
diff --git a/src/ls.c b/src/ls.c
index 85f0d266c..5be3f7b70 100644
--- a/src/ls.c
+++ b/src/ls.c
@@ -19,8 +19,6 @@
#include "ls.h"
#include "client.h"
#include "config.h"
-#include "decoder_list.h"
-#include "archive_list.h"
#include <string.h>
@@ -66,36 +64,3 @@ const char *getSuffix(const char *utf8file)
return dot != NULL ? dot + 1 : NULL;
}
-
-const struct decoder_plugin *
-hasMusicSuffix(const char *utf8file, unsigned int next)
-{
- const struct decoder_plugin *ret = NULL;
-
- const char *s = getSuffix(utf8file);
- if (s) {
- ret = decoder_plugin_from_suffix(s, next);
- } else {
- g_debug("hasMusicSuffix: The file: %s has no valid suffix\n",
- utf8file);
- }
-
- return ret;
-}
-
-#ifdef ENABLE_ARCHIVE
-const struct archive_plugin *
-get_archive_by_suffix(const char *utf8file)
-{
- const struct archive_plugin *ret = NULL;
-
- const char *s = getSuffix(utf8file);
- if (s) {
- ret = archive_plugin_from_suffix(s);
- } else {
- g_debug("get_archive_by_suffix: The file: %s has no valid suffix\n",
- utf8file);
- }
- return ret;
-}
-#endif