Show chapter in popover when dragging position scale

This commit is contained in:
Rafostar
2021-01-13 17:55:22 +01:00
parent fe7a899aab
commit df4678d930
3 changed files with 97 additions and 3 deletions

View File

@@ -405,6 +405,10 @@ class ClapperWidget extends Gtk.Grid
return;
}
if(!this.controls.chapters)
this.controls.chapters = {};
this.controls.chapters[pos] = title;
debug(`chapter at ${pos}: ${title}`);
}
@@ -452,8 +456,11 @@ class ClapperWidget extends Gtk.Grid
switch(state) {
case GstPlayer.PlayerState.BUFFERING:
debug('player state changed to: BUFFERING');
if(player.needsTocUpdate)
if(player.needsTocUpdate) {
this.controls._setChapterVisible(false);
this.controls.positionScale.clear_marks();
this.controls.chapters = null;
}
if(!player.is_local_file) {
this.needsTracksUpdate = true;
}