clapper-app: Fix missing media in file dialog on Windows

Windows does not support mime-types file filters, so use file extensions instead
This commit is contained in:
Rafał Dzięgiel
2024-06-20 19:43:40 +02:00
parent 0b253b41f6
commit abff579b70
3 changed files with 48 additions and 1 deletions

View File

@@ -23,6 +23,30 @@
#include "clapper-app-utils.h"
#include "clapper-app-media-item-box.h"
/* Useful only on Windows */
#ifdef G_OS_WIN32
const gchar *const *
clapper_app_utils_get_extensions (void)
{
static const gchar *const all_extensions[] = {
"avi", "claps", "m2ts", "mkv", "mov",
"mp4", "webm", "wmv", NULL
};
return all_extensions;
}
const gchar *const *
clapper_app_utils_get_subtitles_extensions (void)
{
static const gchar *const subs_extensions[] = {
"srt", "vtt", NULL
};
return subs_extensions;
}
#endif
const gchar *const *
clapper_app_utils_get_mime_types (void)
{