mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-09 13:12:37 -05:00
Hide Bookmark menu for new dynamically generated playlists
The bookmark menu with the option to create a bookmark was inadvertently displayed for new dynamic playlists, that had no associated folder or playlist file on disk. (e.g. after selecting some track from the database for playback), until the playlist was modified by the user. Change-Id: I9d6809e4d03603c651459415327f28e38162ad53
This commit is contained in:
parent
a0c29d8857
commit
75befe19ef
3 changed files with 23 additions and 3 deletions
|
|
@ -2698,6 +2698,22 @@ bool playlist_allow_dirplay(const struct playlist_info *playlist)
|
|||
return !!(playlist->flags & PLAYLIST_FLAG_DIRPLAY);
|
||||
}
|
||||
|
||||
/*
|
||||
* 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.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue