summaryrefslogtreecommitdiff
path: root/src/media_library.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/media_library.cpp
parent25708093e6098a510b79dcbc715fa2fa465bd859 (diff)
format: implement generic format parser and printer
Diffstat (limited to 'src/media_library.cpp')
-rw-r--r--src/media_library.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/media_library.cpp b/src/media_library.cpp
index baebbd62..a7680d26 100644
--- a/src/media_library.cpp
+++ b/src/media_library.cpp
@@ -93,8 +93,8 @@ public:
}
bool operator()(const MPD::Song &a, const MPD::Song &b) {
for (auto get = GetFuns.begin()+m_offset; get != GetFuns.end(); ++get) {
- int ret = m_cmp(a.getTags(*get, Config.tags_separator),
- b.getTags(*get, Config.tags_separator));
+ int ret = m_cmp(a.getTags(*get),
+ b.getTags(*get));
if (ret != 0)
return ret < 0;
}
@@ -197,7 +197,9 @@ MediaLibrary::MediaLibrary()
Songs.centeredCursor(Config.centered_cursor);
Songs.setSelectedPrefix(Config.selected_item_prefix);
Songs.setSelectedSuffix(Config.selected_item_suffix);
- Songs.setItemDisplayer(boost::bind(Display::Songs, _1, songsProxyList(), Config.song_library_format));
+ Songs.setItemDisplayer(boost::bind(
+ Display::Songs, _1, songsProxyList(), Config.song_library_format
+ ));
w = &Tags;
}
@@ -1037,7 +1039,9 @@ std::string AlbumToString(const AlbumEntry &ae)
std::string SongToString(const MPD::Song &s)
{
- return s.toString(Config.song_library_format, Config.tags_separator);
+ return Format::stringify<char>(
+ Config.song_library_format, &s//FIXME, Config.tags_separator
+ );
}
bool TagEntryMatcher(const boost::regex &rx, const MediaLibrary::PrimaryTag &pt)