From f16e3728711c3dd4fd2ca241ddbe3df4499d754e Mon Sep 17 00:00:00 2001 From: "J. Alexander Treuman" Date: Sat, 26 May 2007 14:09:09 +0000 Subject: Make sure StoredPlaylists always contain UTF-8 paths that are either relative paths in the DB or URLs. The main functional difference is that playlistmove and playlistdelete will rewrite playlists in the correct encoding and remove invalid lines instead of potentially modifying them. The specific changes are: appendSongToStoredPlaylist: * Don't convert to FS charset * Don't prepend music_directory if saving absolute paths writeStoredPlaylistToPath: * Convert to FS charset * Prepend music_directory if saving absolute paths loadStoredPlaylist: * Make sure each line is either in the DB or a URL loadPlaylist: * Don't bother checking paths, since it's done in loadStoredPlaylist now git-svn-id: https://svn.musicpd.org/mpd/trunk@6266 09075e82-0dd4-0310-85a5-a0d7c8717e4f --- src/playlist.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/playlist.c') diff --git a/src/playlist.c b/src/playlist.c index d389b1db8..5536dcf8d 100644 --- a/src/playlist.c +++ b/src/playlist.c @@ -1434,9 +1434,7 @@ int loadPlaylist(int fd, char *utf8file) node = sp->list->firstNode; while (node != NULL) { char *temp = node->data; - if (!getSongFromDB(temp) && !isRemoteUrl(temp)) { - - } else if ((addToPlaylist(STDERR_FILENO, temp, 0)) < 0) { + if ((addToPlaylist(STDERR_FILENO, temp, 0)) < 0) { /* for windows compatibility, convert slashes */ char *temp2 = xstrdup(temp); char *p = temp2; -- cgit v1.2.3