mirror of
https://invent.kde.org/system/dolphin
synced 2024-11-05 18:47:12 +00:00
Use a saner check for multimedia files in infopanel.
Don't rely on the reported supported mimetypes from Phonon, Phonon supports more than just video and audio, but if it is video or audio there's a very good chance Phonon supports it. (If the mime type isn't in the list returned by Phonon there's still a good chance it supports it, because mime types are stupid.) BUG: 252539
This commit is contained in:
parent
5ae3d9c0ae
commit
0adb88184b
1 changed files with 1 additions and 3 deletions
|
@ -197,9 +197,7 @@ void InformationPanelContent::showItem(const KFileItem& item)
|
|||
|
||||
if (InformationPanelSettings::previewsShown()) {
|
||||
const QString mimeType = item.mimetype();
|
||||
const bool usePhonon = Phonon::BackendCapabilities::isMimeTypeAvailable(mimeType) &&
|
||||
(mimeType != "image/png"); // TODO: workaround, as Phonon
|
||||
// thinks it supports PNG images
|
||||
const bool usePhonon = mimeType.startsWith("audio/") || mimeType.startsWith("video/");
|
||||
if (usePhonon) {
|
||||
m_phononWidget->show();
|
||||
m_phononWidget->setUrl(item.targetUrl());
|
||||
|
|
Loading…
Reference in a new issue