mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-13 18:17:39 -04:00
Database: Add ability to insert multiple files into playlists
You could only add single files to playlists from the database browser before. This enables adding any database selection to a new or existing playlist. Change-Id: I811c7167641c589944bb2afc18dcc1d299a7b979
This commit is contained in:
parent
cc79f1b543
commit
7f265ee8dd
11 changed files with 142 additions and 67 deletions
26
apps/misc.c
26
apps/misc.c
|
@ -1387,6 +1387,32 @@ int string_option(const char *option, const char *const oplist[], bool ignore_ca
|
|||
return -1;
|
||||
}
|
||||
|
||||
/* Make sure part of path only contain chars valid for a FAT32 long name.
|
||||
* Double quotes are replaced with single quotes, other unsupported chars
|
||||
* are replaced with an underscore.
|
||||
*
|
||||
* path - path to modify.
|
||||
* offset - where in path to start checking.
|
||||
* count - number of chars to check.
|
||||
*/
|
||||
void fix_path_part(char* path, int offset, int count)
|
||||
{
|
||||
static const char invalid_chars[] = "*/:<>?\\|";
|
||||
int i;
|
||||
|
||||
path += offset;
|
||||
|
||||
for (i = 0; i <= count; i++, path++)
|
||||
{
|
||||
if (*path == 0)
|
||||
return;
|
||||
if (*path == '"')
|
||||
*path = '\'';
|
||||
else if (strchr(invalid_chars, *path))
|
||||
*path = '_';
|
||||
}
|
||||
}
|
||||
|
||||
/* open but with a builtin printf for assembling the path */
|
||||
int open_pathfmt(char *buf, size_t size, int oflag, const char *pathfmt, ...)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue