From d4b78197b23ea27fc507e32ad5aa6d7f4194330a Mon Sep 17 00:00:00 2001 From: Ron Pedde Date: Mon, 12 Jun 2006 06:53:56 +0000 Subject: [PATCH] Fix typo on art_filename (possibly fixing cover art?) closing #140 and #94 --- src/dispatch.c | 2 +- src/dynamic-art.c | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/dispatch.c b/src/dispatch.c index b2088ab6..b71a4dff 100644 --- a/src/dispatch.c +++ b/src/dispatch.c @@ -851,7 +851,7 @@ void dispatch_stream_id(WS_CONNINFO *pwsc, int session, char *id) { if(!offset) config.stats.songs_served++; /* FIXME: remove stat races */ - if((conf_isset("general","art_filenaem")) && + if((conf_isset("general","art_filename")) && (!offset) && ((img_fd=da_get_image_fd(pmp3->path)) != -1)) { if (strncasecmp(pmp3->type,"mp3",4) ==0) { diff --git a/src/dynamic-art.c b/src/dynamic-art.c index 4663a884..387292b4 100644 --- a/src/dynamic-art.c +++ b/src/dynamic-art.c @@ -93,9 +93,9 @@ int da_get_image_fd(char *filename) { char *path_end, *artfilename; int fd; - if((artfilename = conf_alloc_string("general","art_filename","_folderOpenImage.jpg")) == NULL) { + artfilename = conf_alloc_string("general","art_filename",NULL); + if(!artfilename) return -1; - } strncpy(buffer,filename,sizeof(buffer)); path_end = strrchr(buffer,'/'); @@ -297,7 +297,7 @@ off_t da_aac_insert_covr_atom(off_t extra_size, int out_fd, FILE *aac_fp, char *artfilename; - if((artfilename = conf_alloc_string("general","art_filename","_folderOpenImage.jpg")) == NULL) { + if((artfilename = conf_alloc_string("general","art_filename",NULL)) == NULL) { return 0; } @@ -311,6 +311,7 @@ off_t da_aac_insert_covr_atom(off_t extra_size, int out_fd, FILE *aac_fp, img_type_flag = 0x0e; } else { DPRINTF(E_LOG,L_ART, "Image type '%s' not supported.\n", cp); + free(artfilename); return 0; } } else {