diff --git a/clapper_src/dialogs.js b/clapper_src/dialogs.js index 8e36ab9e..ddfe6e2a 100644 --- a/clapper_src/dialogs.js +++ b/clapper_src/dialogs.js @@ -52,18 +52,17 @@ class ClapperFileChooser extends Gtk.FileChooserNative let playlist = []; while((file = files.get_item(index))) { - let uri = file.get_uri(); let filename = file.get_basename(); let [type, isUncertain] = Gio.content_type_guess(filename, null); if(this.subsMimes.includes(type)) { - subs = uri; + subs = file; files.remove(index); continue; } - playlist.push(uri); + playlist.push(file); index++; } diff --git a/clapper_src/player.js b/clapper_src/player.js index 76238aec..d0f40ef2 100644 --- a/clapper_src/player.js +++ b/clapper_src/player.js @@ -156,8 +156,12 @@ class ClapperPlayer extends PlayerBase return this._playlist; } - set_subtitles(uri) + set_subtitles(source) { + let uri = (source.get_uri) + ? source.get_uri() + : source; + this.set_subtitle_uri(uri); this.set_subtitle_track_enabled(true);