summaryrefslogtreecommitdiff
path: root/src/playlist.cpp
diff options
context:
space:
mode:
authorAndrzej Rybczak <electricityispower@gmail.com>2014-11-10 00:31:53 +0100
committerAndrzej Rybczak <electricityispower@gmail.com>2014-11-11 00:08:23 +0100
commit8d24c42261c17d18ce723df5a65cc9d1e8dc3a9d (patch)
tree748e5215b607611a2d8c39625f5645e21bfa5d2c /src/playlist.cpp
parent25708093e6098a510b79dcbc715fa2fa465bd859 (diff)
format: implement generic format parser and printer
Diffstat (limited to 'src/playlist.cpp')
-rw-r--r--src/playlist.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/playlist.cpp b/src/playlist.cpp
index bdb99ea4..ef7dbd54 100644
--- a/src/playlist.cpp
+++ b/src/playlist.cpp
@@ -61,10 +61,14 @@ Playlist::Playlist()
switch (Config.playlist_display_mode)
{
case DisplayMode::Classic:
- w.setItemDisplayer(boost::bind(Display::Songs, _1, proxySongList(), Config.song_list_format));
+ w.setItemDisplayer(boost::bind(
+ Display::Songs, _1, proxySongList(), Config.song_list_format
+ ));
break;
case DisplayMode::Columns:
- w.setItemDisplayer(boost::bind(Display::SongsInColumns, _1, proxySongList()));
+ w.setItemDisplayer(boost::bind(
+ Display::SongsInColumns, _1, proxySongList()
+ ));
break;
}
}
@@ -307,10 +311,10 @@ std::string songToString(const MPD::Song &s)
switch (Config.playlist_display_mode)
{
case DisplayMode::Classic:
- result = s.toString(Config.song_list_format_dollar_free, Config.tags_separator);
+ result = Format::stringify<char>(Config.song_list_format, &s);
break;
case DisplayMode::Columns:
- result = s.toString(Config.song_in_columns_to_string_format, Config.tags_separator);
+ result = Format::stringify<char>(Config.song_columns_mode_format, &s);
}
return result;
}