Show "Unknown" when language is undetected

This commit is contained in:
Rafostar
2020-09-06 12:44:24 +02:00
parent f5db250486
commit 374e3cc33a

View File

@@ -141,13 +141,13 @@ class ClapperInterface extends Gtk.Grid
// This one is too long to fit nicely in UI // This one is too long to fit nicely in UI
if(codec.startsWith('Free Lossless Audio Codec')) if(codec.startsWith('Free Lossless Audio Codec'))
codec = 'FLAC'; codec = 'FLAC';
text = info.get_language() + ', ' text = info.get_language() || 'Unknown';
+ codec + ', ' text += ', ' + codec + ', '
+ info.get_channels() + ' Channels'; + info.get_channels() + ' Channels';
break; break;
case GstPlayer.PlayerSubtitleInfo: case GstPlayer.PlayerSubtitleInfo:
type = 'subtitle'; type = 'subtitle';
text = info.get_language(); text = info.get_language() || 'Unknown';
break; break;
default: default:
debug(`unrecognized media info type: ${info.constructor}`); debug(`unrecognized media info type: ${info.constructor}`);