Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Network
KIO Extras
Commits
6c6eec30
Commit
6c6eec30
authored
Jan 06, 2022
by
Harald Sitter
✨
Browse files
mtp: add a bunch of todos for filetype mapping improvements
parent
ccad847a
Pipeline
#119704
passed with stage
in 3 minutes and 3 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
mtp/kiod_module/mtpstorage.cpp
View file @
6c6eec30
...
...
@@ -55,6 +55,11 @@ static LIBMTP_filetype_t getFiletype(const QString &filename)
const
QString
ptype
=
filename
.
split
(
QLatin1Char
(
'.'
)).
last
();
// TODO: use QMimeDatabase and query the mimetype from there (still from the extension presumably)
// TODO: merge the mime mapping tables from this function and the reverse function
// TODO: map video/* and text/* and audio/* to the generic types (e.g. LIBMTP_FILETYPE_UNDEF_VIDEO) when not otherwise mapped
// (NOTE: from glancing at the libmtp code mapping a file type isn't actually all that useful TBH, it only appears used when
// no destination folder was given?)
/* This need to be kept constantly updated as new file types arrive. */
if
(
ptype
==
QLatin1String
(
"wav"
))
{
filetype
=
LIBMTP_FILETYPE_WAV
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment