[smartpl] Add support for smart playlists

This commit is contained in:
chme
2015-04-12 06:49:38 +02:00
parent a174a1d18c
commit 4cac01ed88
8 changed files with 692 additions and 8 deletions

View File

@@ -103,6 +103,7 @@ enum file_type {
FILE_IGNORE,
FILE_REGULAR,
FILE_PLAYLIST,
FILE_SMARTPL,
FILE_ITUNES,
FILE_ARTWORK,
FILE_CTRL_REMOTE,
@@ -317,6 +318,9 @@ file_type_get(const char *path) {
if ((strcasecmp(ext, ".m3u") == 0) || (strcasecmp(ext, ".pls") == 0))
return FILE_PLAYLIST;
if (strcasecmp(ext, ".smartpl") == 0)
return FILE_SMARTPL;
if (artwork_file_is_artwork(filename))
return FILE_ARTWORK;
@@ -867,6 +871,11 @@ process_file(char *file, time_t mtime, off_t size, int type, int flags)
process_playlist(file, mtime);
break;
case FILE_SMARTPL:
DPRINTF(E_DBG, L_SCAN, "Smart playlist file: %s\n", file);
scan_smartpl(file, mtime);
break;
case FILE_ARTWORK:
DPRINTF(E_DBG, L_SCAN, "Artwork file: %s\n", file);
cache_artwork_ping(file, mtime);