Remove file extension for playlists from virtual_path during scan and

update db to v19 removing the file extensions from the stored playlists

An existing file extension in the virtual path leads to wrong entries in
MPDroid (and mpd does also not return the file extension).
This commit is contained in:
chme
2015-05-31 09:57:07 +02:00
parent 3655e26703
commit 7cd96690c0
3 changed files with 42 additions and 2 deletions

View File

@@ -167,6 +167,9 @@ scan_playlist(char *file, time_t mtime)
pli->path = strdup(file);
snprintf(virtual_path, PATH_MAX, "/file:%s", file);
ptr = strrchr(virtual_path, '.');
if (ptr)
*ptr = '\0';
pli->virtual_path = strdup(virtual_path);
ret = db_pl_add(pli, &pl_id);