aboutsummaryrefslogtreecommitdiffstats
path: root/src/ls.c
diff options
context:
space:
mode:
authorWarren Dukes <warren.dukes@gmail.com>2004-05-31 01:21:17 +0000
committerWarren Dukes <warren.dukes@gmail.com>2004-05-31 01:21:17 +0000
commitfd6aa253594e18877ca2380961c0425a7de21b2e (patch)
treeb86fc645573adef9c0de9bd5f22eadffe3d16814 /src/ls.c
parentd7893a3e76d261b33b83fd9333d85892b3308594 (diff)
downloadmpd-fd6aa253594e18877ca2380961c0425a7de21b2e.tar.gz
mpd-fd6aa253594e18877ca2380961c0425a7de21b2e.tar.xz
mpd-fd6aa253594e18877ca2380961c0425a7de21b2e.zip
mp3 and ogg plugin stuff
git-svn-id: https://svn.musicpd.org/mpd/trunk@1245 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to 'src/ls.c')
-rw-r--r--src/ls.c24
1 files changed, 6 insertions, 18 deletions
diff --git a/src/ls.c b/src/ls.c
index 52ca5b782..285874585 100644
--- a/src/ls.c
+++ b/src/ls.c
@@ -216,27 +216,15 @@ int isDir(char * utf8name) {
return 0;
}
-int isMusic(char * utf8file, time_t * mtime) {
+InputPlugin * isMusic(char * utf8file, time_t * mtime) {
+ InputPlugin * ret = NULL;
+
if(isFile(utf8file,mtime)) {
-#ifdef HAVE_OGG
- if(hasOggSuffix(utf8file)) return 1;
-#endif
-#ifdef HAVE_FLAC
- if(hasFlacSuffix(utf8file)) return 1;
-#endif
-#ifdef HAVE_MAD
- if(hasMp3Suffix(utf8file)) return 1;
-#endif
-#ifdef HAVE_AUDIOFILE
- if(hasWaveSuffix(utf8file)) return 1;
-#endif
-#ifdef HAVE_FAAD
- if(hasMp4Suffix(utf8file)) return 1;
- if(hasAacSuffix(utf8file)) return 1;
-#endif
+ char * s = getSuffix(utf8file);
+ if(s) ret = getInputPluginFromSuffix(s);
}
- return 0;
+ return ret;
}
/* vim:set shiftwidth=4 tabstop=8 expandtab: */