mirror of
https://github.com/Rafostar/clapper.git
synced 2025-08-31 16:31:58 +02:00
Fix missing file extension in online URIs
This commit is contained in:
@@ -55,30 +55,25 @@ class ClapperPlaylistWidget extends Gtk.ListBox
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getActiveRow()
|
||||||
|
{
|
||||||
|
return this.get_row_at_index(this.activeRowId);
|
||||||
|
}
|
||||||
|
|
||||||
getActiveFilename()
|
getActiveFilename()
|
||||||
{
|
{
|
||||||
const row = this.get_row_at_index(this.activeRowId);
|
const row = this.getActiveRow();
|
||||||
if(!row) return null;
|
if(!row) return null;
|
||||||
|
|
||||||
return row.filename;
|
return row.filename;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* FIXME: Remove once/if GstPlay(er) gets
|
|
||||||
* less vague MediaInfo signals */
|
|
||||||
getActiveIsLocalFile()
|
|
||||||
{
|
|
||||||
const row = this.get_row_at_index(this.activeRowId);
|
|
||||||
if(!row) return null;
|
|
||||||
|
|
||||||
return row.isLocalFile;
|
|
||||||
}
|
|
||||||
|
|
||||||
deactivateActiveItem()
|
deactivateActiveItem()
|
||||||
{
|
{
|
||||||
if(this.activeRowId < 0)
|
if(this.activeRowId < 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
const row = this.get_row_at_index(this.activeRowId);
|
const row = this.getActiveRow();
|
||||||
if(!row) return null;
|
if(!row) return null;
|
||||||
|
|
||||||
const icon = row.child.get_first_child();
|
const icon = row.child.get_first_child();
|
||||||
|
@@ -316,11 +316,11 @@ class ClapperWidget extends Gtk.Grid
|
|||||||
title = this.player.customVideoTitle;
|
title = this.player.customVideoTitle;
|
||||||
|
|
||||||
if(!title) {
|
if(!title) {
|
||||||
const subtitle = this.player.playlistWidget.getActiveFilename();
|
const item = this.player.playlistWidget.getActiveRow();
|
||||||
|
|
||||||
title = (subtitle.includes('.'))
|
title = (item.isLocalFile && item.filename.includes('.'))
|
||||||
? subtitle.split('.').slice(0, -1).join('.')
|
? item.filename.split('.').slice(0, -1).join('.')
|
||||||
: subtitle;
|
: item.filename;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.root.title = title;
|
this.root.title = title;
|
||||||
|
Reference in New Issue
Block a user