Jelajahi Sumber

Library View: reduce file size precision by dropping positions after the decimal point

Felix Paul Kühne 12 tahun lalu
induk
melakukan
a3cff2d98a

+ 1 - 1
AspenProject/VLCPlaylistGridView.m

@@ -75,7 +75,7 @@
 - (void)_updatedDisplayedInformation
 {
     self.titleLabel.text = self.mediaObject.title;
-    self.subtitleLabel.text = [NSString stringWithFormat:@"%@ — %.2f MB", [VLCTime timeWithNumber:[self.mediaObject duration]], [self.mediaObject fileSizeInBytes] / 1e6];
+    self.subtitleLabel.text = [NSString stringWithFormat:@"%@ — %i MB", [VLCTime timeWithNumber:[self.mediaObject duration]], (int)([self.mediaObject fileSizeInBytes] / 1e6)];
     self.thumbnailView.image = self.mediaObject.computedThumbnail;
     self.progressView.progress = self.mediaObject.lastPosition.floatValue;
 

+ 1 - 1
AspenProject/VLCPlaylistTableViewCell.m

@@ -55,7 +55,7 @@
 - (void)_updatedDisplayedInformation
 {
     self.titleLabel.text = self.mediaObject.title;
-    self.subtitleLabel.text = [NSString stringWithFormat:@"%@ — %.2f MB", [VLCTime timeWithNumber:[self.mediaObject duration]], [self.mediaObject fileSizeInBytes] / 1e6];
+    self.subtitleLabel.text = [NSString stringWithFormat:@"%@ — %i MB", [VLCTime timeWithNumber:[self.mediaObject duration]], (int)([self.mediaObject fileSizeInBytes] / 1e6)];
     self.thumbnailView.image = self.mediaObject.computedThumbnail;
     self.progressIndicator.progress = self.mediaObject.lastPosition.floatValue;