mirror of
https://github.com/Rafostar/clapper.git
synced 2025-08-31 00:11:59 +02:00
Prefer custom title over media info one
Otherwise YT videos will all show filename of dash manifest as title
This commit is contained in:
@@ -291,17 +291,14 @@ class ClapperWidget extends Gtk.Grid
|
|||||||
|
|
||||||
updateTitle(mediaInfo)
|
updateTitle(mediaInfo)
|
||||||
{
|
{
|
||||||
let title = mediaInfo.get_title();
|
let title = this.player.customVideoTitle;
|
||||||
|
|
||||||
if(!title)
|
if(!title)
|
||||||
title = this.player.customVideoTitle;
|
title = mediaInfo.get_title();
|
||||||
|
|
||||||
if(!title) {
|
if(!title) {
|
||||||
const item = this.player.playlistWidget.getActiveRow();
|
const item = this.player.playlistWidget.getActiveRow();
|
||||||
|
title = item.filename;
|
||||||
title = (item.isLocalFile && item.filename.includes('.'))
|
|
||||||
? item.filename.split('.').slice(0, -1).join('.')
|
|
||||||
: item.filename;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this.root.title = title;
|
this.root.title = title;
|
||||||
|
Reference in New Issue
Block a user