mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-12-04 16:18:48 +03:00
Fix video thumbnails for small videos
This commit is contained in:
parent
a3219c71d7
commit
2ded62f77d
1 changed files with 1 additions and 1 deletions
|
@ -1182,7 +1182,7 @@ MediaUpload::startUpload()
|
||||||
QBuffer buffer(&ba);
|
QBuffer buffer(&ba);
|
||||||
buffer.open(QIODevice::WriteOnly);
|
buffer.open(QIODevice::WriteOnly);
|
||||||
thumbnail_.save(&buffer, "PNG", 0);
|
thumbnail_.save(&buffer, "PNG", 0);
|
||||||
if (ba.size() >= (data.size() - data.size() / 10)) {
|
if (type() == MediaType::Image && ba.size() >= (data.size() - data.size() / 10)) {
|
||||||
nhlog::ui()->info(
|
nhlog::ui()->info(
|
||||||
"Thumbnail is not a lot smaller than original image, not uploading it");
|
"Thumbnail is not a lot smaller than original image, not uploading it");
|
||||||
nhlog::ui()->debug(
|
nhlog::ui()->debug(
|
||||||
|
|
Loading…
Reference in a new issue