Prefer custom title over media info one

Otherwise YT videos will all show filename of dash manifest as title
This commit is contained in:
Rafał Dzięgiel
2021-05-31 17:46:19 +02:00
parent 1f781716d7
commit 6246777f06

View File

@@ -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;