Fix typo on art_filename (possibly fixing cover art?) closing #140 and #94

This commit is contained in:
Ron Pedde 2006-06-12 06:53:56 +00:00
parent d05c9ad5c2
commit d4b78197b2
2 changed files with 5 additions and 4 deletions

View File

@ -851,7 +851,7 @@ void dispatch_stream_id(WS_CONNINFO *pwsc, int session, char *id) {
if(!offset) if(!offset)
config.stats.songs_served++; /* FIXME: remove stat races */ config.stats.songs_served++; /* FIXME: remove stat races */
if((conf_isset("general","art_filenaem")) && if((conf_isset("general","art_filename")) &&
(!offset) && (!offset) &&
((img_fd=da_get_image_fd(pmp3->path)) != -1)) { ((img_fd=da_get_image_fd(pmp3->path)) != -1)) {
if (strncasecmp(pmp3->type,"mp3",4) ==0) { if (strncasecmp(pmp3->type,"mp3",4) ==0) {

View File

@ -93,9 +93,9 @@ int da_get_image_fd(char *filename) {
char *path_end, *artfilename; char *path_end, *artfilename;
int fd; 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; return -1;
}
strncpy(buffer,filename,sizeof(buffer)); strncpy(buffer,filename,sizeof(buffer));
path_end = strrchr(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; 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; 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; img_type_flag = 0x0e;
} else { } else {
DPRINTF(E_LOG,L_ART, "Image type '%s' not supported.\n", cp); DPRINTF(E_LOG,L_ART, "Image type '%s' not supported.\n", cp);
free(artfilename);
return 0; return 0;
} }
} else { } else {