[vlc-commits] [Git][videolan/vlc][master] macosx: Do not display the year in supplementary detail view if this is invalid
Felix Paul Kühne (@fkuehne)
gitlab at videolan.org
Sat Jun 21 10:57:48 UTC 2025
Felix Paul Kühne pushed to branch master at VideoLAN / VLC
Commits:
eccffab9 by Claudio Cambra at 2025-06-21T10:36:29+00:00
macosx: Do not display the year in supplementary detail view if this is invalid
Signed-off-by: Claudio Cambra <developer at claudiocambra.com>
- - - - -
1 changed file:
- modules/gui/macosx/library/VLCLibraryCollectionViewMediaItemListSupplementaryDetailView.m
Changes:
=====================================
modules/gui/macosx/library/VLCLibraryCollectionViewMediaItemListSupplementaryDetailView.m
=====================================
@@ -130,8 +130,13 @@ NSCollectionViewSupplementaryElementKind const VLCLibraryCollectionViewMediaItem
self.secondaryDetailTextButton.title = item.secondaryDetailString;
if ([item isKindOfClass:VLCMediaLibraryAlbum.class]) {
- self.yearAndDurationTextField.stringValue =
- [NSString stringWithFormat:@"%u · %@", [(VLCMediaLibraryAlbum *)item year], item.durationString];
+ const int year = [(VLCMediaLibraryAlbum *)item year];
+ if (year != 0) {
+ self.yearAndDurationTextField.stringValue =
+ [NSString stringWithFormat:@"%u · %@", year, item.durationString];
+ } else {
+ self.yearAndDurationTextField.stringValue = item.durationString;
+ }
} else {
self.yearAndDurationTextField.stringValue = item.durationString;
}
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/eccffab95e19558e771be09c4a3f26455b266579
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/eccffab95e19558e771be09c4a3f26455b266579
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
More information about the vlc-commits
mailing list