From 374e3cc33a55a5187ce89865711e2fa9897ca1cd Mon Sep 17 00:00:00 2001 From: Rafostar <40623528+Rafostar@users.noreply.github.com> Date: Sun, 6 Sep 2020 12:44:24 +0200 Subject: [PATCH] Show "Unknown" when language is undetected --- clapper_src/interface.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/clapper_src/interface.js b/clapper_src/interface.js index a529f512..b46d5ec1 100644 --- a/clapper_src/interface.js +++ b/clapper_src/interface.js @@ -141,13 +141,13 @@ class ClapperInterface extends Gtk.Grid // This one is too long to fit nicely in UI if(codec.startsWith('Free Lossless Audio Codec')) codec = 'FLAC'; - text = info.get_language() + ', ' - + codec + ', ' + text = info.get_language() || 'Unknown'; + text += ', ' + codec + ', ' + info.get_channels() + ' Channels'; break; case GstPlayer.PlayerSubtitleInfo: type = 'subtitle'; - text = info.get_language(); + text = info.get_language() || 'Unknown'; break; default: debug(`unrecognized media info type: ${info.constructor}`);