Loading Dockerfile +1 −1 Changes for Dockerfile: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -19,7 +19,7 @@ # images from another registry/namespace -- see DOCKER_PREFIX in systempp/build-chroot.sh. ARG IMAGE_PREFIX=tuxist/ ARG FENRIROS_TAG=20261020 ARG FENRIROS_TAG=20261023 FROM ${IMAGE_PREFIX}fenriros-devel:${FENRIROS_TAG} AS build Loading editor/widgets/video/video.cpp +4 −2 Changes for editor/widgets/video/video.cpp: 4 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -442,10 +442,12 @@ extern "C" { video.setAttribute("class", responsiveClass.c_str()); if (!dataAttrs.empty()) applyDataAttrs(video, dataAttrs); // Poster/thumbnail extracted from video by MediaDB // Poster/thumbnail: video frame extracted by MediaDB, fetched // through the blog's media/getimage route (t = whole seconds, // no w/h so the blog's allowed-size check doesn't apply) if (posterTime >= 0.0 && !mediaId.empty()) { std::ostringstream posterUrl; posterUrl << "/media/" << mediaId << "/preview?fmt=webp&w=1280&t=" << posterTime; posterUrl << "/media/getimage/" << mediaId << ".webp?t=" << static_cast<int>(posterTime); std::string pUrl = posterUrl.str(); if (!pfx.empty() && pfx != "/") { pUrl = pfx + pUrl; Loading plugins/media/media.cpp +10 −3 Changes for plugins/media/media.cpp: 10 added lines, 3 removed lines. Original line number Diff line number Diff line Loading @@ -891,10 +891,11 @@ namespace blogi { return true; // Extract media ID and extension from URL path // Format: <uuid>.<ext> with query params ?w=<W>&h=<H> // Format: <uuid>.<ext> with query params ?w=<W>&h=<H>&t=<T> // (t = video frame offset in seconds, for poster images) std::string mediaId = req.getRequestURL().substr(plen); std::string fmt; int reqWidth = 0, reqHeight = 0; int reqWidth = 0, reqHeight = 0, reqTime = -1; size_t dotPos = mediaId.rfind('.'); if(dotPos != std::string::npos){ fmt = mediaId.substr(dotPos + 1); Loading @@ -909,6 +910,7 @@ namespace blogi { std::cerr << "media: query param key='" << qp.key << "' value='" << qp.value << "'" << std::endl; if(qp.key == "w"){ try { reqWidth = std::stoi(qp.value); } catch(...) {} } else if(qp.key == "h"){ try { reqHeight = std::stoi(qp.value); } catch(...) {} } else if(qp.key == "t"){ try { reqTime = std::stoi(qp.value); } catch(...) {} } } } std::cerr << "media: mediaId=" << mediaId << " fmt=" << fmt Loading Loading @@ -1001,7 +1003,11 @@ namespace blogi { if(dp != std::string::npos) origExt = mi.filename.substr(dp + 1); if(fmt != origExt) needsTransform = true; } if (isVideo || !needsTransform) { // A video requested as a still image format is a poster frame bool videoFrame = isVideo && needsTransform && (fmt == "webp" || fmt == "png" || fmt == "jpg" || fmt == "jpeg" || fmt == "avif"); if ((isVideo && !videoFrame) || !needsTransform) { rawUrl = "/media/" + mediaId + "/raw"; } else { rawUrl = "/media/" + mediaId + "/preview"; Loading @@ -1009,6 +1015,7 @@ namespace blogi { if(!fmt.empty()){ rawUrl += sep + "fmt=" + fmt; sep = "&"; } if(reqWidth > 0){ rawUrl += sep + "w=" + std::to_string(reqWidth); sep = "&"; } if(reqHeight > 0){ rawUrl += sep + "h=" + std::to_string(reqHeight); sep = "&"; } if(videoFrame && reqTime >= 0){ rawUrl += sep + "t=" + std::to_string(reqTime); sep = "&"; } } std::cerr << "media: upstream rawUrl=" << rawUrl << std::endl; libhttppp::HttpRequest dataReq; Loading Loading
Dockerfile +1 −1 Changes for Dockerfile: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -19,7 +19,7 @@ # images from another registry/namespace -- see DOCKER_PREFIX in systempp/build-chroot.sh. ARG IMAGE_PREFIX=tuxist/ ARG FENRIROS_TAG=20261020 ARG FENRIROS_TAG=20261023 FROM ${IMAGE_PREFIX}fenriros-devel:${FENRIROS_TAG} AS build Loading
editor/widgets/video/video.cpp +4 −2 Changes for editor/widgets/video/video.cpp: 4 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -442,10 +442,12 @@ extern "C" { video.setAttribute("class", responsiveClass.c_str()); if (!dataAttrs.empty()) applyDataAttrs(video, dataAttrs); // Poster/thumbnail extracted from video by MediaDB // Poster/thumbnail: video frame extracted by MediaDB, fetched // through the blog's media/getimage route (t = whole seconds, // no w/h so the blog's allowed-size check doesn't apply) if (posterTime >= 0.0 && !mediaId.empty()) { std::ostringstream posterUrl; posterUrl << "/media/" << mediaId << "/preview?fmt=webp&w=1280&t=" << posterTime; posterUrl << "/media/getimage/" << mediaId << ".webp?t=" << static_cast<int>(posterTime); std::string pUrl = posterUrl.str(); if (!pfx.empty() && pfx != "/") { pUrl = pfx + pUrl; Loading
plugins/media/media.cpp +10 −3 Changes for plugins/media/media.cpp: 10 added lines, 3 removed lines. Original line number Diff line number Diff line Loading @@ -891,10 +891,11 @@ namespace blogi { return true; // Extract media ID and extension from URL path // Format: <uuid>.<ext> with query params ?w=<W>&h=<H> // Format: <uuid>.<ext> with query params ?w=<W>&h=<H>&t=<T> // (t = video frame offset in seconds, for poster images) std::string mediaId = req.getRequestURL().substr(plen); std::string fmt; int reqWidth = 0, reqHeight = 0; int reqWidth = 0, reqHeight = 0, reqTime = -1; size_t dotPos = mediaId.rfind('.'); if(dotPos != std::string::npos){ fmt = mediaId.substr(dotPos + 1); Loading @@ -909,6 +910,7 @@ namespace blogi { std::cerr << "media: query param key='" << qp.key << "' value='" << qp.value << "'" << std::endl; if(qp.key == "w"){ try { reqWidth = std::stoi(qp.value); } catch(...) {} } else if(qp.key == "h"){ try { reqHeight = std::stoi(qp.value); } catch(...) {} } else if(qp.key == "t"){ try { reqTime = std::stoi(qp.value); } catch(...) {} } } } std::cerr << "media: mediaId=" << mediaId << " fmt=" << fmt Loading Loading @@ -1001,7 +1003,11 @@ namespace blogi { if(dp != std::string::npos) origExt = mi.filename.substr(dp + 1); if(fmt != origExt) needsTransform = true; } if (isVideo || !needsTransform) { // A video requested as a still image format is a poster frame bool videoFrame = isVideo && needsTransform && (fmt == "webp" || fmt == "png" || fmt == "jpg" || fmt == "jpeg" || fmt == "avif"); if ((isVideo && !videoFrame) || !needsTransform) { rawUrl = "/media/" + mediaId + "/raw"; } else { rawUrl = "/media/" + mediaId + "/preview"; Loading @@ -1009,6 +1015,7 @@ namespace blogi { if(!fmt.empty()){ rawUrl += sep + "fmt=" + fmt; sep = "&"; } if(reqWidth > 0){ rawUrl += sep + "w=" + std::to_string(reqWidth); sep = "&"; } if(reqHeight > 0){ rawUrl += sep + "h=" + std::to_string(reqHeight); sep = "&"; } if(videoFrame && reqTime >= 0){ rawUrl += sep + "t=" + std::to_string(reqTime); sep = "&"; } } std::cerr << "media: upstream rawUrl=" << rawUrl << std::endl; libhttppp::HttpRequest dataReq; Loading