diff options
author | Nicolas Werner <nicolas.werner@hotmail.de> | 2022-03-22 18:12:39 +0100 |
---|---|---|
committer | Nicolas Werner <nicolas.werner@hotmail.de> | 2022-03-22 18:12:39 +0100 |
commit | 447a3d4cb9df7add0ace739d44096ea149fd26f1 (patch) | |
tree | b8b4e9eea8da5ddb6eff5202a91cd67e66b11827 /src/timeline/InputBar.cpp | |
parent | Fix thumbnails of received encrypted images (diff) | |
download | nheko-447a3d4cb9df7add0ace739d44096ea149fd26f1.tar.xz |
Try to improve thumbnailing on macOS
Diffstat (limited to 'src/timeline/InputBar.cpp')
-rw-r--r-- | src/timeline/InputBar.cpp | 6 |
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(); } |