Added Total count of source in Session mix info

This commit is contained in:
Bruno Herbelin
2022-04-09 14:46:09 +02:00
parent dd55f41264
commit edffcf8902
2 changed files with 7 additions and 2 deletions

View File

@@ -64,8 +64,12 @@ SessionInformation SessionCreator::info(const std::string& filename)
const XMLElement *header = doc.FirstChildElement(APP_NAME);
if (header != nullptr) {
int s = header->IntAttribute("size");
ret.description = std::to_string( s ) + " source" + ( s > 1 ? "s\n" : "\n");
uint s = header->UnsignedAttribute("size");
ret.description = std::to_string( s ) + " source" + ( s > 1 ? "s" : "");
uint t = header->UnsignedAttribute("total");
if (t>s)
ret.description += " (" + std::to_string(t) + " in total)";
ret.description += "\n";
const char *att_string = header->Attribute("resolution");
if (att_string)
ret.description += std::string( att_string ) + "\n";