summary refs log tree commit diff
path: root/src/timeline/InputBar.cpp
diff options
context:
space:
mode:
authorNicolas Werner <nicolas.werner@hotmail.de>2022-03-22 18:12:39 +0100
committerNicolas Werner <nicolas.werner@hotmail.de>2022-03-22 18:12:39 +0100
commit447a3d4cb9df7add0ace739d44096ea149fd26f1 (patch)
treeb8b4e9eea8da5ddb6eff5202a91cd67e66b11827 /src/timeline/InputBar.cpp
parentFix thumbnails of received encrypted images (diff)
downloadnheko-447a3d4cb9df7add0ace739d44096ea149fd26f1.tar.xz
Try to improve thumbnailing on macOS
Diffstat (limited to 'src/timeline/InputBar.cpp')
-rw-r--r--src/timeline/InputBar.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/timeline/InputBar.cpp b/src/timeline/InputBar.cpp
index cdb5305f..ed1782f3 100644
--- a/src/timeline/InputBar.cpp
+++ b/src/timeline/InputBar.cpp
@@ -879,7 +879,11 @@ MediaUpload::MediaUpload(std::unique_ptr<QIODevice> source_,
             }
             nhlog::ui()->debug("Duration changed {}", duration);
         });
-        mediaPlayer->setMedia(QMediaContent(originalFilename_), source.get());
+
+        auto originalFile = qobject_cast<QFile *>(source.get());
+
+        mediaPlayer->setMedia(
+          QMediaContent(originalFile ? originalFile->fileName() : originalFilename_), source.get());
 
         mediaPlayer->play();
     }