diff options
Diffstat (limited to 'apps/playlist.c')
-rw-r--r-- | apps/playlist.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/apps/playlist.c b/apps/playlist.c index 554e1afd7e..4440c77dbf 100644 --- a/apps/playlist.c +++ b/apps/playlist.c @@ -2699,6 +2699,22 @@ bool playlist_allow_dirplay(const struct playlist_info *playlist) } /* + * Returns true if the current playlist is neither + * associated with a folder nor with an on-disk playlist. + */ +bool playlist_dynamic_only(void) +{ + /* NOTE: New dynamic playlists currently use root dir ("/") + * as their placeholder filename – this could change. + */ + if (!strcmp(current_playlist.filename, "/") && + !(current_playlist.flags & PLAYLIST_FLAG_DIRPLAY)) + return true; + + return false; +} + +/* * Move track at index to new_index. Tracks between the two are shifted * appropriately. Returns 0 on success and -1 on failure. */ |