mirror of
https://github.com/owntone/owntone-server.git
synced 2025-04-23 03:55:42 -04:00
add logging to find reason for file skipping
This commit is contained in:
parent
e84e153910
commit
ffee7a4acf
@ -440,7 +440,7 @@ void scan_music_file(char *path, struct dirent *pde, struct stat *psb) {
|
|||||||
snprintf(mp3_path,sizeof(mp3_path),"%s/%s",path,pde->d_name);
|
snprintf(mp3_path,sizeof(mp3_path),"%s/%s",path,pde->d_name);
|
||||||
|
|
||||||
/* we found an mp3 file */
|
/* we found an mp3 file */
|
||||||
DPRINTF(ERR_DEBUG,"Found music file: %s\n",pde->d_name);
|
DPRINTF(ERR_INFO,"Found music file: %s\n",pde->d_name);
|
||||||
|
|
||||||
memset((void*)&mp3file,0,sizeof(mp3file));
|
memset((void*)&mp3file,0,sizeof(mp3file));
|
||||||
mp3file.path=mp3_path;
|
mp3file.path=mp3_path;
|
||||||
@ -479,7 +479,7 @@ long scan_aac_findatom(FILE *fin, long max_offset, char *which_atom, int *atom_s
|
|||||||
|
|
||||||
size=ntohl(size);
|
size=ntohl(size);
|
||||||
|
|
||||||
if(size < 0) /* something not right */
|
if(size <= 7) /* something not right */
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
if(fread(atom,1,4,fin) != 4)
|
if(fread(atom,1,4,fin) != 4)
|
||||||
@ -542,7 +542,7 @@ int scan_get_aactags(char *file, MP3FILE *pmp3) {
|
|||||||
|
|
||||||
current_size=ntohl(current_size);
|
current_size=ntohl(current_size);
|
||||||
|
|
||||||
if(current_size < 0) /* something not right */
|
if(current_size <= 7) /* something not right */
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if(fread(current_atom,1,4,fin) != 4)
|
if(fread(current_atom,1,4,fin) != 4)
|
||||||
@ -624,16 +624,7 @@ int scan_gettags(char *file, MP3FILE *pmp3) {
|
|||||||
* in turn, just in case the extensions are wrong/lying
|
* in turn, just in case the extensions are wrong/lying
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if(!strcasecmp(pmp3->type,".aac"))
|
if(strcasestr(".aac.m4a.m4p.mp4",pmp3->type))
|
||||||
return scan_get_aactags(file,pmp3);
|
|
||||||
|
|
||||||
if(!strcasecmp(pmp3->type,".m4a"))
|
|
||||||
return scan_get_aactags(file,pmp3);
|
|
||||||
|
|
||||||
if(!strcasecmp(pmp3->type,".m4p"))
|
|
||||||
return scan_get_aactags(file,pmp3);
|
|
||||||
|
|
||||||
if(!strcasecmp(pmp3->type,".mp4"))
|
|
||||||
return scan_get_aactags(file,pmp3);
|
return scan_get_aactags(file,pmp3);
|
||||||
|
|
||||||
/* should handle mp3 in the same way */
|
/* should handle mp3 in the same way */
|
||||||
@ -1007,7 +998,7 @@ int scan_get_mp3fileinfo(char *file, MP3FILE *pmp3) {
|
|||||||
DPRINTF(ERR_DEBUG," Bit Rate: %d\n",bitrate);
|
DPRINTF(ERR_DEBUG," Bit Rate: %d\n",bitrate);
|
||||||
} else {
|
} else {
|
||||||
/* not an mp3... */
|
/* not an mp3... */
|
||||||
DPRINTF(ERR_DEBUG,"File is not a MPEG file\n");
|
DPRINTF(ERR_WARN,"%s is not a MPEG file... skipping\n",file);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user