1
0
Fork 0
forked from len0rd/rockbox

[Feature] filetree fallback to loading a playlist from disk

give user option to load playlist from disk when
namebuffer is too small -- max_playlist size still
limits the total entries but filename length
 won't stop them from playing the directory

Change-Id: I1787689417661ea670a211f575f2c52e84465869
This commit is contained in:
William Wilgus 2023-01-08 09:44:57 -05:00 committed by William Wilgus
parent 593103cd8b
commit 282a54b23c
2 changed files with 26 additions and 4 deletions

View file

@ -2082,8 +2082,13 @@ int playlist_add(const char *filename)
struct playlist_info* playlist = &current_playlist;
int len = strlen(filename);
if((len+1 > playlist->buffer_size - playlist->buffer_end_pos) ||
(playlist->amount >= playlist->max_playlist_size))
if(len+1 > playlist->buffer_size - playlist->buffer_end_pos)
{
notify_buffer_full();
return -2;
}
if(playlist->amount >= playlist->max_playlist_size)
{
notify_buffer_full();
return -1;