* Don't expose album art images in the content directory.

* Support album art name wildcards.
This commit is contained in:
Justin Maggard
2011-02-14 23:52:10 +00:00
parent 761f62ca26
commit 14a0d1ac98
8 changed files with 44 additions and 11 deletions

24
utils.c
View File

@ -28,6 +28,7 @@
#include <errno.h>
#include "minidlnatypes.h"
#include "upnpglobalvars.h"
#include "log.h"
int
@ -245,6 +246,29 @@ is_playlist(const char * file)
return (ends_with(file, ".m3u") || ends_with(file, ".pls"));
}
int
is_album_art(const char * name)
{
struct album_art_name_s * album_art_name;
/* Check if this file name matches one of the default album art names */
for( album_art_name = album_art_names; album_art_name; album_art_name = album_art_name->next )
{
if( album_art_name->wildcard )
{
if( strncmp(album_art_name->name, name, strlen(album_art_name->name)) == 0 )
break;
}
else
{
if( strcmp(album_art_name->name, name) == 0 )
break;
}
}
return (album_art_name ? 1 : 0);
}
int
resolve_unknown_type(const char * path, enum media_types dir_type)
{