aboutsummaryrefslogtreecommitdiffstats
path: root/src/song.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/song.c')
-rw-r--r--src/song.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/song.c b/src/song.c
index 377487cbd..c7186d1e0 100644
--- a/src/song.c
+++ b/src/song.c
@@ -57,32 +57,32 @@ Song * newSong(char * utf8file) {
song->utf8file = strdup(utf8file);
- if(0);
+ if(!isFile(utf8file,&(song->mtime)));
#ifdef HAVE_OGG
- else if(isOgg(utf8file,&(song->mtime))) {
+ else if(hasOggSuffix(utf8file)) {
song->tag = oggTagDup(utf8file);
}
#endif
#ifdef HAVE_FLAC
- else if((isFlac(utf8file,&(song->mtime)))) {
+ else if((hasFlacSuffix(utf8file))) {
song->tag = flacTagDup(utf8file);
}
#endif
#ifdef HAVE_MAD
- else if(isMp3(utf8file,&(song->mtime))) {
+ else if(hasMp3Suffix(utf8file)) {
song->tag = mp3TagDup(utf8file);
}
#endif
#ifdef HAVE_AUDIOFILE
- else if(isWave(utf8file,&(song->mtime))) {
+ else if(hasWaveSuffix(utf8file)) {
song->tag = audiofileTagDup(utf8file);
}
#endif
#ifdef HAVE_FAAD
- else if(isAac(utf8file,&(song->mtime))) {
+ else if(hasAacSuffix(utf8file)) {
song->tag = aacTagDup(utf8file);
}
- else if(isMp4(utf8file,&(song->mtime))) {
+ else if(hasMp4Suffix(utf8file)) {
song->tag = mp4TagDup(utf8file);
}
#endif
@@ -227,32 +227,32 @@ int updateSongInfo(Song * song) {
song->tag = NULL;
- if(0);
+ if(!isFile(utf8file,&(song->mtime)));
#ifdef HAVE_OGG
- else if(isOgg(utf8file,&(song->mtime))) {
+ else if(hasOggSuffix(utf8file)) {
song->tag = oggTagDup(utf8file);
}
#endif
#ifdef HAVE_FLAC
- else if((isFlac(utf8file,&(song->mtime)))) {
+ else if((hasFlacSuffix(utf8file))) {
song->tag = flacTagDup(utf8file);
}
#endif
#ifdef HAVE_MAD
- else if(isMp3(utf8file,&(song->mtime))) {
+ else if(hasMp3Suffix(utf8file)) {
song->tag = mp3TagDup(utf8file);
}
#endif
#ifdef HAVE_AUDIOFILE
- else if(isWave(utf8file,&(song->mtime))) {
+ else if(hasWaveSuffix(utf8file)) {
song->tag = audiofileTagDup(utf8file);
}
#endif
#ifdef HAVE_FAAD
- else if(isAac(utf8file,&(song->mtime))) {
+ else if(hasAacSuffix(utf8file)) {
song->tag = aacTagDup(utf8file);
}
- else if(isMp4(utf8file,&(song->mtime))) {
+ else if(hasMp4Suffix(utf8file)) {
song->tag = mp4TagDup(utf8file);
}
#endif