From fc39e328bb2db5a2021c5ac9eba16914a94740e8 Mon Sep 17 00:00:00 2001 From: Daniel Neto Date: Mon, 23 Sep 2024 15:51:57 -0300 Subject: [PATCH] https://github.com/WWBN/AVideo/issues/9433 --- plugin/BulkEmbed/save.json.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/plugin/BulkEmbed/save.json.php b/plugin/BulkEmbed/save.json.php index dbdf338845..40b7dd52e3 100644 --- a/plugin/BulkEmbed/save.json.php +++ b/plugin/BulkEmbed/save.json.php @@ -85,8 +85,14 @@ if (empty($objo) || ($objo->onlyAdminCanBulkEmbed && !User::isAdmin())) { $poster = Video::getPathToFile("{$paths['filename']}.jpg"); $thumbs = $value['thumbs']; if (!empty($thumbs)) { - $bytes = file_put_contents($poster, url_get_contents($thumbs)); - _error_log("thumbs={$thumbs} poster=$poster bytes=$bytes "); + $contentThumbs = url_get_contents($thumbs); + if (!empty($contentThumbs)) { + make_path($poster); + $bytes = file_put_contents($poster, $contentThumbs); + _error_log("thumbs={$thumbs} poster=$poster bytes=$bytes strlen=".strlen($contentThumbs)); + } else { + _error_log("ERROR thumbs={$thumbs} poster=$poster"); + } } else { _error_log("ERROR thumbs={$thumbs} poster=$poster"); }