[vlc-commits] [Git][videolan/vlc][master] macosx: Fix year string on songs table view
Felix Paul Kühne (@fkuehne)
gitlab at videolan.org
Mon Mar 24 05:43:06 UTC 2025
Felix Paul Kühne pushed to branch master at VideoLAN / VLC
Commits:
2c9b2d97 by Claudio Cambra at 2025-03-24T05:42:49+00:00
macosx: Fix year string on songs table view
- - - - -
1 changed file:
- modules/gui/macosx/library/audio-library/VLCLibraryAudioTableViewDelegate.m
Changes:
=====================================
modules/gui/macosx/library/audio-library/VLCLibraryAudioTableViewDelegate.m
=====================================
@@ -101,7 +101,14 @@
cellText = [@(mediaItem.playCount) stringValue];
} else if ([columnIdentifier isEqualToString:VLCLibrarySongsTableViewYearColumnIdentifier]) {
cellIdentifier = @"VLCLibrarySongsTableViewYearTableCellViewIdentifier";
- cellText = [@(mediaItem.year) stringValue];
+ if (mediaItem.year == 0) {
+ cellText = @"";
+ } else {
+ NSDate * const yearDate = [NSDate dateWithTimeIntervalSince1970:mediaItem.year];
+ NSDateComponents * const components =
+ [NSCalendar.currentCalendar components:NSCalendarUnitYear fromDate:yearDate];
+ cellText = @(components.year).stringValue;
+ }
} else {
NSAssert(true, @"Received unknown column identifier %@", columnIdentifier);
}
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/2c9b2d97bece77b0ef8b1c9b2b0bbe45b2ed2d50
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/2c9b2d97bece77b0ef8b1c9b2b0bbe45b2ed2d50
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