aboutsummaryrefslogtreecommitdiffstats
path: root/src/inputPlugins
diff options
context:
space:
mode:
Diffstat (limited to 'src/inputPlugins')
-rw-r--r--src/inputPlugins/aac_plugin.c3
-rw-r--r--src/inputPlugins/audiofile_plugin.c3
-rw-r--r--src/inputPlugins/flac_plugin.c18
-rw-r--r--src/inputPlugins/mod_plugin.c12
-rw-r--r--src/inputPlugins/mp3_plugin.c3
-rw-r--r--src/inputPlugins/mp4_plugin.c5
-rw-r--r--src/inputPlugins/mpc_plugin.c10
-rw-r--r--src/inputPlugins/ogg_plugin.c6
8 files changed, 52 insertions, 8 deletions
diff --git a/src/inputPlugins/aac_plugin.c b/src/inputPlugins/aac_plugin.c
index 149290648..e368f3089 100644
--- a/src/inputPlugins/aac_plugin.c
+++ b/src/inputPlugins/aac_plugin.c
@@ -405,6 +405,9 @@ MpdTag * aacTagDup(char * file) {
if((ret = id3Dup(file))==NULL) ret = newMpdTag();
ret->time = time;
}
+ else {
+ DEBUG("aacTagDup: Failed to get total song time from: %s\n", file);
+ }
return ret;
}
diff --git a/src/inputPlugins/audiofile_plugin.c b/src/inputPlugins/audiofile_plugin.c
index 0c205888d..adc279b60 100644
--- a/src/inputPlugins/audiofile_plugin.c
+++ b/src/inputPlugins/audiofile_plugin.c
@@ -148,6 +148,9 @@ MpdTag * audiofileTagDup(char * file) {
if(!ret) ret = newMpdTag();
ret->time = time;
}
+ else {
+ DEBUG("audiofileTagDup: Failed to get total song time from: %s\n", file);
+ }
return ret;
}
diff --git a/src/inputPlugins/flac_plugin.c b/src/inputPlugins/flac_plugin.c
index 801b72797..6be7f43b3 100644
--- a/src/inputPlugins/flac_plugin.c
+++ b/src/inputPlugins/flac_plugin.c
@@ -533,6 +533,19 @@ MpdTag * flacMetadataDup(char * file, int * vorbisCommentFound) {
it = FLAC__metadata_simple_iterator_new();
if(!FLAC__metadata_simple_iterator_init(it, file ,1,0)) {
+ switch(FLAC__metadata_simple_iterator_status(it)) {
+ case FLAC__METADATA_SIMPLE_ITERATOR_STATUS_ILLEGAL_INPUT:
+ DEBUG("flacMetadataDup: Reading '%s' metadata gave the following error: Illegal Input\n",file);
+ break;
+ case FLAC__METADATA_SIMPLE_ITERATOR_STATUS_ERROR_OPENING_FILE:
+ DEBUG("flacMetadataDup: Reading '%s' metadata gave the following error: Error Opening File\n",file);
+ break;
+ case FLAC__METADATA_SIMPLE_ITERATOR_STATUS_NOT_A_FLAC_FILE:
+ DEBUG("flacMetadataDup: Reading '%s' metadata gave the following error: Not A Flac File\n",file);
+ break;
+ default:
+ DEBUG("flacMetadataDup: Reading '%s' metadata failed\n",file);
+ }
FLAC__metadata_simple_iterator_delete(it);
return ret;
}
@@ -564,7 +577,10 @@ MpdTag * flacTagDup(char * file) {
int foundVorbisComment = 0;
ret = flacMetadataDup(file, &foundVorbisComment);
- if(!ret) return NULL;
+ if(!ret) {
+ DEBUG("flacTagDup: Failed to grab information from: %s\n", file);
+ return NULL;
+ }
if(!foundVorbisComment) {
MpdTag * temp = id3Dup(file);
if(temp) {
diff --git a/src/inputPlugins/mod_plugin.c b/src/inputPlugins/mod_plugin.c
index 74524fed9..547f4af4a 100644
--- a/src/inputPlugins/mod_plugin.c
+++ b/src/inputPlugins/mod_plugin.c
@@ -212,10 +212,17 @@ MpdTag * modTagDup(char * file) {
MODULE * moduleHandle;
char * title;
- if(mod_initMikMod() < 0) return NULL;
+ if(mod_initMikMod() < 0) {
+ DEBUG("modTagDup: Failed to initialize MikMod\n");
+ return NULL;
+ }
- if(!(moduleHandle = Player_Load(file, 128, 0))) goto fail;
+ if(!(moduleHandle = Player_Load(file, 128, 0))) {
+ DEBUG("modTagDup: Failed to open file: %s\n",file);
+ MikMod_Exit();
+ return NULL;
+ }
Player_Free(moduleHandle);
ret = newMpdTag();
@@ -224,7 +231,6 @@ MpdTag * modTagDup(char * file) {
title = strdup(Player_LoadTitle(file));
if(title) addItemToMpdTag(ret, TAG_ITEM_TITLE, title);
-fail:
MikMod_Exit();
return ret;
diff --git a/src/inputPlugins/mp3_plugin.c b/src/inputPlugins/mp3_plugin.c
index 33087e134..8799e1c87 100644
--- a/src/inputPlugins/mp3_plugin.c
+++ b/src/inputPlugins/mp3_plugin.c
@@ -756,6 +756,9 @@ MpdTag * mp3_tagDup(char * file) {
if(!ret) ret = newMpdTag();
ret->time = time;
}
+ else {
+ DEBUG("mp3_tagDup: Failed to get total song time from: %s\n", file);
+ }
return ret;
}
diff --git a/src/inputPlugins/mp4_plugin.c b/src/inputPlugins/mp4_plugin.c
index a66f7d43d..a1af848c5 100644
--- a/src/inputPlugins/mp4_plugin.c
+++ b/src/inputPlugins/mp4_plugin.c
@@ -326,7 +326,10 @@ MpdTag * mp4DataDup(char * file, int * mp4MetadataFound) {
*mp4MetadataFound = 0;
- if(openInputStream(&inStream, file) < 0) return NULL;
+ if(openInputStream(&inStream, file) < 0) {
+ DEBUG("mp4DataDup: Failed to open file: %s\n", file);
+ return NULL;
+ }
cb = malloc(sizeof(mp4ff_callback_t));
cb->read = mp4_inputStreamReadCallback;
diff --git a/src/inputPlugins/mpc_plugin.c b/src/inputPlugins/mpc_plugin.c
index af332dbf4..335c5c368 100644
--- a/src/inputPlugins/mpc_plugin.c
+++ b/src/inputPlugins/mpc_plugin.c
@@ -294,7 +294,10 @@ static float mpcGetTime(char * file) {
mpc_streaminfo_init(&info);
- if(openInputStream(&inStream, file) < 0) return -1;
+ if(openInputStream(&inStream, file) < 0) {
+ DEBUG("mpcGetTime: Failed to open file: %s\n", file);
+ return -1;
+ }
if(mpc_streaminfo_read(&info, &reader) != ERROR_CODE_OK) {
closeInputStream(&inStream);
@@ -312,7 +315,10 @@ static MpdTag * mpcTagDup(char * file) {
MpdTag * ret = NULL;
float time = mpcGetTime(file);
- if(time < 0) return NULL;
+ if(time < 0) {
+ DEBUG("mpcTagDup: Failed to get Songlength of file: %s\n",file);
+ return NULL;
+ }
ret = apeDup(file);
if(!ret) ret = id3Dup(file);
diff --git a/src/inputPlugins/ogg_plugin.c b/src/inputPlugins/ogg_plugin.c
index f74e3e56a..abadca388 100644
--- a/src/inputPlugins/ogg_plugin.c
+++ b/src/inputPlugins/ogg_plugin.c
@@ -366,7 +366,11 @@ MpdTag * oggTagDup(char * file) {
OggVorbis_File vf;
fp = fopen(file,"r");
- if(!fp) return NULL;
+ if(!fp)
+ {
+ DEBUG("oggTagDup: Failed to open file: '%s', %s\n", file, strerror(errno));
+ return NULL;
+ }
if(ov_open(fp,&vf,NULL,0)<0) {
fclose(fp);
return NULL;