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:
parent
593103cd8b
commit
282a54b23c
2 changed files with 26 additions and 4 deletions
|
|
@ -2082,8 +2082,13 @@ int playlist_add(const char *filename)
|
|||
struct playlist_info* playlist = ¤t_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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue