From 1fdbf09cbd14984d7456717378d925e9706333c6 Mon Sep 17 00:00:00 2001 From: Rafostar <40623528+Rafostar@users.noreply.github.com> Date: Thu, 10 Sep 2020 21:32:12 +0200 Subject: [PATCH] Display shorter names for all audio codecs --- clapper_src/interface.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/clapper_src/interface.js b/clapper_src/interface.js index e1d75200..736b3541 100644 --- a/clapper_src/interface.js +++ b/clapper_src/interface.js @@ -151,9 +151,12 @@ class ClapperInterface extends Gtk.Grid case GstPlayer.PlayerAudioInfo: type = 'audio'; let codec = info.get_codec(); - // This one is too long to fit nicely in UI - if(codec.startsWith('Free Lossless Audio Codec')) - codec = 'FLAC'; + if(codec.includes('(')) { + codec = codec.substring( + codec.indexOf('(') + 1, + codec.indexOf(')') + ); + } text = info.get_language() || 'Unknown'; text += ', ' + codec + ', ' + info.get_channels() + ' Channels';