string ByTvShowStatus(SortAttribute attributes, const SortItem &values) { return values.at(FieldTvShowStatus).asString() + " " + ByLabel(attributes, values); }
string ByGenre(SortAttribute attributes, const SortItem &values) { return ArrayToString(attributes, values.at(FieldGenre)); }
string ByRating(SortAttribute attributes, const SortItem &values) { return StringUtils::Format("%f %s", values.at(FieldRating).asFloat(), ByLabel(attributes, values).c_str()); }
std::string BySize(SortAttribute attributes, const SortItem &values) { return StringUtils::Format("%" PRId64, values.at(FieldSize).asInteger()); }
string ByTrackNumber(SortAttribute attributes, const SortItem &values) { return StringUtils::Format("%i", (int)values.at(FieldTrackNumber).asInteger()); }
std::string ByLastPlayed(SortAttribute attributes, const SortItem &values) { return StringUtils::Format("%s %s", values.at(FieldLastPlayed).asString().c_str(), ByLabel(attributes, values).c_str()); }
std::string ByDate(SortAttribute attributes, const SortItem &values) { return values.at(FieldDate).asString() + " " + ByLabel(attributes, values); }
std::string ByProductionCode(SortAttribute attributes, const SortItem &values) { return values.at(FieldProductionCode).asString(); }
std::string ByVideoResolution(SortAttribute attributes, const SortItem &values) { return StringUtils::Format("%i %s", (int)values.at(FieldVideoResolution).asInteger(), ByLabel(attributes, values).c_str()); }
std::string ByNumberOfWatchedEpisodes(SortAttribute attributes, const SortItem &values) { return StringUtils::Format("%i %s", (int)values.at(FieldNumberOfWatchedEpisodes).asInteger(), ByLabel(attributes, values).c_str()); }
std::string ByTvShowTitle(SortAttribute attributes, const SortItem &values) { return values.at(FieldTvShowTitle).asString() + " " + ByLabel(attributes, values); }
std::string ByStudio(SortAttribute attributes, const SortItem &values) { return ArrayToString(attributes, values.at(FieldStudio)); }
std::string ByUserRating(SortAttribute attributes, const SortItem &values) { return StringUtils::Format("%d %s", static_cast<int>(values.at(FieldUserRating).asInteger()), ByLabel(attributes, values).c_str()); }
string ByListeners(SortAttribute attributes, const SortItem &values) { return StringUtils::Format("%i", values.at(FieldListeners).asInteger());; }
std::string ByFile(SortAttribute attributes, const SortItem &values) { CURL url(values.at(FieldPath).asString()); return StringUtils::Format("%s %" PRId64, url.GetFileNameWithoutPath().c_str(), values.at(FieldStartOffset).asInteger()); }
std::string ByVideoAspectRatio(SortAttribute attributes, const SortItem &values) { return StringUtils::Format("%.03f %s", values.at(FieldVideoAspectRatio).asFloat(), ByLabel(attributes, values).c_str()); }
std::string ByPath(SortAttribute attributes, const SortItem &values) { return StringUtils::Format("%s %" PRId64, values.at(FieldPath).asString().c_str(), values.at(FieldStartOffset).asInteger()); }
std::string ByAudioChannels(SortAttribute attributes, const SortItem &values) { return StringUtils::Format("%i %s", (int)values.at(FieldAudioChannels).asInteger(), ByLabel(attributes, values).c_str()); }
std::string ByPlaycount(SortAttribute attributes, const SortItem &values) { return StringUtils::Format("%i %s", (int)values.at(FieldPlaycount).asInteger(), ByLabel(attributes, values).c_str()); }
std::string ByAudioCodec(SortAttribute attributes, const SortItem &values) { return StringUtils::Format("%s %s", values.at(FieldAudioCodec).asString().c_str(), ByLabel(attributes, values).c_str()); }
std::string ByDateAdded(SortAttribute attributes, const SortItem &values) { return StringUtils::Format("%s %d", values.at(FieldDateAdded).asString().c_str(), (int)values.at(FieldId).asInteger()); }
std::string BySubtitleLanguage(SortAttribute attributes, const SortItem &values) { return StringUtils::Format("%s %s", values.at(FieldSubtitleLanguage).asString().c_str(), ByLabel(attributes, values).c_str()); }
string ByAlbumType(SortAttribute attributes, const SortItem &values) { return values.at(FieldAlbumType).asString() + " " + ByLabel(attributes, values); }
std::string ByChannel(SortAttribute attributes, const SortItem &values) { return values.at(FieldChannelName).asString(); }
string ByProgramCount(SortAttribute attributes, const SortItem &values) { return StringUtils::Format("%i", (int)values.at(FieldProgramCount).asInteger()); }
std::string ByDateTaken(SortAttribute attributes, const SortItem &values) { return values.at(FieldDateTaken).asString(); }
string ByCountry(SortAttribute attributes, const SortItem &values) { return ArrayToString(attributes, values.at(FieldCountry)); }
std::string ByRelevance(SortAttribute attributes, const SortItem &values) { return StringUtils::Format("%i", (int)values.at(FieldRelevance).asInteger()); }
string ByVotes(SortAttribute attributes, const SortItem &values) { return StringUtils::Format("%d %s", (int)values.at(FieldVotes).asInteger(), ByLabel(attributes, values).c_str()); }
string ByMPAA(SortAttribute attributes, const SortItem &values) { return values.at(FieldMPAA).asString() + " " + ByLabel(attributes, values); }