From: Joel S. <joe...@us...> - 2010-05-16 15:50:20
|
commit dd862439c70ebba288efb3fd46752270ceb00193 Author: Joel Smith <jsf...@jk...> Date: Sat May 1 13:48:38 2010 -0600 Fix bug for MP3 files with NULL genre being marked as audiobooks src/file.c | 9 ++++++--- 1 files changed, 6 insertions(+), 3 deletions(-) --- diff --git a/src/file.c b/src/file.c index 940543e..f5dadab 100644 --- a/src/file.c +++ b/src/file.c @@ -1311,9 +1311,12 @@ static Track *get_track_info_from_file (gchar *name, Track *orig_track) /* Set mediatype to audio */ if (nti) { - if (g_strcasecmp (nti->genre, "audiobook") == 0) nti->mediatype = ITDB_MEDIATYPE_AUDIOBOOK; - else if (g_strcasecmp (nti->genre, "podcast") == 0) nti->mediatype = ITDB_MEDIATYPE_PODCAST; - else nti->mediatype = ITDB_MEDIATYPE_AUDIO; + nti->mediatype = ITDB_MEDIATYPE_AUDIO; + if (nti->genre) + { + if (g_strcasecmp (nti->genre, "audiobook") == 0) nti->mediatype = ITDB_MEDIATYPE_AUDIOBOOK; + else if (g_strcasecmp (nti->genre, "podcast") == 0) nti->mediatype = ITDB_MEDIATYPE_PODCAST; + } } break; case FILE_TYPE_M4A: |