format: shorten date by simple truncation

This commit is contained in:
Andrzej Rybczak
2015-09-22 00:00:21 +02:00
parent 1acaaa4064
commit 43a6b81820

View File

@@ -124,8 +124,8 @@ struct Printer: boost::static_visitor<Result>
{
if (st.delimiter() > 0)
{
// shorten length by chopping off the tail
if (st.function() == &MPD::Song::getLength)
// shorten date/length by simple truncation
if (st.function() == &MPD::Song::getDate || st.function() == &MPD::Song::getLength)
tags.resize(st.delimiter());
else
tags = wideShorten(tags, st.delimiter());