* Add M3U/PLS music playlist support.

This commit is contained in:
Justin Maggard
2010-01-13 21:15:26 +00:00
parent 4aafa5e4ed
commit 346ff6e293
14 changed files with 412 additions and 30 deletions

12
utils.c
View File

@ -239,6 +239,12 @@ is_image(const char * file)
return (ends_with(file, ".jpg") || ends_with(file, ".jpeg"));
}
int
is_playlist(const char * file)
{
return (ends_with(file, ".m3u") || ends_with(file, ".pls"));
}
int
resolve_unknown_type(const char * path, enum media_types dir_type)
{
@ -258,11 +264,13 @@ resolve_unknown_type(const char * path, enum media_types dir_type)
case ALL_MEDIA:
if( is_image(path) ||
is_audio(path) ||
is_video(path) )
is_video(path) ||
is_playlist(path) )
type = TYPE_FILE;
break;
case AUDIO_ONLY:
if( is_audio(path) )
if( is_audio(path) ||
is_playlist(path) )
type = TYPE_FILE;
break;
case VIDEO_ONLY: