[vlc-commits] [Git][videolan/vlc][master] macosx: Fix composite genre string when genre count is 2

Felix Paul Kühne (@fkuehne) gitlab at videolan.org
Mon Aug 3 09:09:35 UTC 2026



Felix Paul Kühne pushed to branch master at VideoLAN / VLC


Commits:
bf0a50ef by Claudio Cambra at 2026-08-03T10:34:07+02:00
macosx: Fix composite genre string when genre count is 2

Signed-off-by: Claudio Cambra <developer at claudiocambra.com>

- - - - -


1 changed file:

- modules/gui/macosx/library/VLCLibraryDataTypes.m


Changes:

=====================================
modules/gui/macosx/library/VLCLibraryDataTypes.m
=====================================
@@ -162,9 +162,13 @@ static NSString *genreArrayDisplayString(NSArray<VLCMediaLibraryGenre *> * const
     }
 
     VLCMediaLibraryGenre * const secondGenre = [genres objectAtIndex:1];
+    if (genreCount == 2) {
+        return [NSString stringWithFormat:_NS("%@ and %@"), firstGenre.name, secondGenre.name];
+    }
+
     return [NSString stringWithFormat:_NS("%@, %@, and %lli other genres"),
-                     firstGenre.displayString,
-                     secondGenre.displayString,
+                     firstGenre.name,
+                     secondGenre.name,
                      genreCount - 2];
 }
 



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/bf0a50ef21b4c83450b31741320660e20725be7c

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/bf0a50ef21b4c83450b31741320660e20725be7c
You're receiving this email because of your account on code.videolan.org. Manage all notifications: https://code.videolan.org/-/profile/notifications | Help: https://code.videolan.org/help




More information about the vlc-commits mailing list