mirror of
https://github.com/owntone/owntone-server.git
synced 2025-11-12 23:01:44 -05:00
[smartpl] Add support for smart playlists
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user