diff options
author | jmarshallnz <jcmarsha@gmail.com> | 2013-12-23 16:50:22 -0800 |
---|---|---|
committer | jmarshallnz <jcmarsha@gmail.com> | 2013-12-23 16:50:22 -0800 |
commit | 9a581a0521d0b96f6c4286693de5cdc542b971fd (patch) | |
tree | bc3961cadb1b495e8e17f29526abc9b06d0a95b1 | |
parent | a8eb2a4560c6af722491aa31c2dc52551508e5da (diff) | |
parent | fee88fe8a5932a7d20e2430cfa7925e4b59bd918 (diff) |
Merge pull request #3889 from jmarshallnz/fix_sortlabel_year
[sorting] don't apply airdate when sorting by year if airdate is empty.
-rw-r--r-- | xbmc/utils/SortUtils.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/xbmc/utils/SortUtils.cpp b/xbmc/utils/SortUtils.cpp index 9e7eebcef3..655b1dde1a 100644 --- a/xbmc/utils/SortUtils.cpp +++ b/xbmc/utils/SortUtils.cpp @@ -195,7 +195,7 @@ string ByYear(SortAttribute attributes, const SortItem &values) { CStdString label; const CVariant &airDate = values.at(FieldAirDate); - if (!airDate.isNull()) + if (!airDate.isNull() && !airDate.asString().empty()) label = airDate.asString() + " "; label += StringUtils::Format("%i %s", (int)values.at(FieldYear).asInteger(), ByLabel(attributes, values).c_str()); |