[totem/wip/hadess/web-vtt: 1/2] main: Load vtt subtitle files



commit 34bf81b25bd4c2a01b723be857495571f624b9b4
Author: Bastien Nocera <hadess hadess net>
Date:   Thu Apr 2 20:19:58 2020 +0200

    main: Load vtt subtitle files

 src/plugins/autoload-subtitles/totem-autoload-subtitles.c | 1 +
 src/totem-uri.c                                           | 2 ++
 2 files changed, 3 insertions(+)
---
diff --git a/src/plugins/autoload-subtitles/totem-autoload-subtitles.c 
b/src/plugins/autoload-subtitles/totem-autoload-subtitles.c
index e9906752c..b4f2a17ad 100644
--- a/src/plugins/autoload-subtitles/totem-autoload-subtitles.c
+++ b/src/plugins/autoload-subtitles/totem-autoload-subtitles.c
@@ -53,6 +53,7 @@ TOTEM_PLUGIN_REGISTER(TOTEM_TYPE_AUTOLOAD_SUBTITLES_PLUGIN, TotemAutoloadSubtitl
 static const char subtitle_ext[][4] = {
        "sub",
        "srt",
+       "vtt",
        "smi",
        "ssa",
        "ass",
diff --git a/src/totem-uri.c b/src/totem-uri.c
index db24b45e0..9ace19b78 100644
--- a/src/totem-uri.c
+++ b/src/totem-uri.c
@@ -286,6 +286,7 @@ totem_setup_file_monitoring (Totem *totem)
 static const char subtitle_ext[][4] = {
        "sub",
        "srt",
+       "vtt",
        "smi",
        "ssa",
        "ass",
@@ -346,6 +347,7 @@ totem_setup_file_filters (void)
        gtk_file_filter_set_name (filter_subs, _("Subtitle files"));
        gtk_file_filter_add_mime_type (filter_subs, "application/x-subrip"); /* *.srt */
        gtk_file_filter_add_mime_type (filter_subs, "text/plain"); /* *.asc, *.txt */
+       gtk_file_filter_add_mime_type (filter_subs, "text/vtt"); /* *.vtt */
        gtk_file_filter_add_mime_type (filter_subs, "application/x-sami"); /* *.smi, *.sami */
        gtk_file_filter_add_mime_type (filter_subs, "text/x-microdvd"); /* *.sub */
        gtk_file_filter_add_mime_type (filter_subs, "text/x-mpsub"); /* *.sub */


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]