From 0e6507682aa64987c3f9f8f2d4e2443585c27463 Mon Sep 17 00:00:00 2001 From: Rafostar <40623528+Rafostar@users.noreply.github.com> Date: Sat, 1 May 2021 12:11:16 +0200 Subject: [PATCH] Do not show visualizations button when no audio tracks --- src/widget.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/widget.js b/src/widget.js index 10a5f2a2..0065b047 100644 --- a/src/widget.js +++ b/src/widget.js @@ -270,7 +270,10 @@ class ClapperWidget extends Gtk.Grid debug(`${type} caps: ${caps.to_string()}`); } if(type === 'video') { - const isShowVis = (parsedInfo[`${type}Tracks`].length === 0); + const isShowVis = ( + !parsedInfo.videoTracks.length + && parsedInfo.audioTracks.length + ); this.showVisualizationsButton(isShowVis); } if(!parsedInfo[`${type}Tracks`].length) {