From 53316e4bada29f1392df2528d8616afde17f570b Mon Sep 17 00:00:00 2001 From: dec05eba Date: Mon, 31 Oct 2022 22:54:59 +0100 Subject: Add ctrl+shift+s to download files without a dialog --- src/FileAnalyzer.cpp | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'src/FileAnalyzer.cpp') diff --git a/src/FileAnalyzer.cpp b/src/FileAnalyzer.cpp index 0f312cf..b02d0c2 100644 --- a/src/FileAnalyzer.cpp +++ b/src/FileAnalyzer.cpp @@ -108,7 +108,7 @@ namespace QuickMedia { || strcase_equals(ext, ".flv") || strcase_equals(ext, ".vob") || strcase_equals(ext, ".ogv") - || strcase_equals(ext, ".ogg") + //|| strcase_equals(ext, ".ogg") || strcase_equals(ext, ".avi") //|| strcase_equals(ext, ".ts") || strcase_equals(ext, ".mov") @@ -121,6 +121,24 @@ namespace QuickMedia { || strcase_equals(ext, ".3gp"); } + bool is_music_ext(const char *ext) { + return strcase_equals(ext, ".aac") + || strcase_equals(ext, ".alac") + || strcase_equals(ext, ".flac") + || strcase_equals(ext, ".m4a") + || strcase_equals(ext, ".m4p") + || strcase_equals(ext, ".mp3") + || strcase_equals(ext, ".ogg") + || strcase_equals(ext, ".oga") + || strcase_equals(ext, ".mogg") + || strcase_equals(ext, ".opus") + || strcase_equals(ext, ".vox") + || strcase_equals(ext, ".wav") + || strcase_equals(ext, ".wma") + || strcase_equals(ext, ".mid"); + + } + static int accumulate_string(char *data, int size, void *userdata) { std::string *str = (std::string*)userdata; str->append(data, size); -- cgit v1.2.3-70-g09d2