Do not show the channels number if the number is 0

This commit is contained in:
Damiano Galassi committed 2018-02-12 09:25:09 +01:00
1 parent af08a8d8f4
commit 738c3baeb6
1 file changed
+6 -1
+6 -1
View File
@@ -244,7 +244,12 @@
return [NSString stringWithFormat:@"%@, %u ch", localizedDisplayName(self.mediaType, self.conversionSettings.format), channels];
}
else {
return [NSString stringWithFormat:@"%@, %u ch", localizedDisplayName(self.mediaType, self.format), (unsigned int)_channels];
if (_channels > 0) {
return [NSString stringWithFormat:@"%@, %u ch", localizedDisplayName(self.mediaType, self.format), (unsigned int)_channels];
}
else {
return [NSString stringWithFormat:@"%@", localizedDisplayName(self.mediaType, self.format)];
}
}
}