From 6246777f0697237e941dd9057d7eeb18d81ae1a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Dzi=C4=99giel?= Date: Mon, 31 May 2021 17:46:19 +0200 Subject: [PATCH] Prefer custom title over media info one Otherwise YT videos will all show filename of dash manifest as title --- src/widget.js | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/widget.js b/src/widget.js index 70679a3a..6cbc1dd0 100644 --- a/src/widget.js +++ b/src/widget.js @@ -291,17 +291,14 @@ class ClapperWidget extends Gtk.Grid updateTitle(mediaInfo) { - let title = mediaInfo.get_title(); + let title = this.player.customVideoTitle; if(!title) - title = this.player.customVideoTitle; + title = mediaInfo.get_title(); if(!title) { const item = this.player.playlistWidget.getActiveRow(); - - title = (item.isLocalFile && item.filename.includes('.')) - ? item.filename.split('.').slice(0, -1).join('.') - : item.filename; + title = item.filename; } this.root.title = title;