* Add M3U/PLS music playlist support.
This commit is contained in:
12
utils.c
12
utils.c
@ -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:
|
||||
|
Reference in New Issue
Block a user