aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJ. Alexander Treuman <jat@spatialrift.net>2006-07-21 17:11:45 +0000
committerJ. Alexander Treuman <jat@spatialrift.net>2006-07-21 17:11:45 +0000
commitac7ef037b520cfe961942aa2f18a75c6408a7150 (patch)
tree69ec7ed1db609dbf2e3c90f22cb482a753c8c350
parentb892028b9602f0f7922a5406047706eb36454469 (diff)
downloadmpd-ac7ef037b520cfe961942aa2f18a75c6408a7150.tar.gz
mpd-ac7ef037b520cfe961942aa2f18a75c6408a7150.tar.xz
mpd-ac7ef037b520cfe961942aa2f18a75c6408a7150.zip
Use getBoolConfigParam for save_absolute_paths_in_playlist
git-svn-id: https://svn.musicpd.org/mpd/trunk@4418 09075e82-0dd4-0310-85a5-a0d7c8717e4f
-rw-r--r--src/playlist.c16
1 files changed, 2 insertions, 14 deletions
diff --git a/src/playlist.c b/src/playlist.c
index a37ee76f3..c7ef9d17f 100644
--- a/src/playlist.c
+++ b/src/playlist.c
@@ -166,20 +166,8 @@ void initPlaylist(void)
}
}
- param = getConfigParam(CONF_SAVE_ABSOLUTE_PATHS);
-
- if (param) {
- if (0 == strcmp("yes", param->value)) {
- playlist_saveAbsolutePaths = 1;
- } else if (0 == strcmp("no", param->value)) {
- playlist_saveAbsolutePaths = 0;
- } else {
- ERROR("%s \"%s\" is not yes or no, line %i"
- CONF_SAVE_ABSOLUTE_PATHS,
- param->value, param->line);
- exit(EXIT_FAILURE);
- }
- }
+ playlist_saveAbsolutePaths = getBoolConfigParam(CONF_SAVE_ABSOLUTE_PATHS);
+ playlist_saveAbsolutePaths = playlist_saveAbsolutePaths < 0 ? 0 : playlist_saveAbsolutePaths;
playlist.songs = malloc(sizeof(Song *) * playlist_max_length);
playlist.songMod = malloc(sizeof(mpd_uint32) * playlist_max_length);