Commit fb2dfad3 authored by jan.koester's avatar jan.koester
Browse files

test

parent 0828df29
Loading
Loading
Loading
Loading
+7 −1
Changes for plugins/media/media.cpp: 7 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -643,11 +643,17 @@ namespace blogi {
                }

                // Stream from mediadb via GetStream
                std::string rawUrl = "/media/" + mediaId + "/preview";
                // Videos use /raw endpoint; images use /preview with optional resize params
                std::string rawUrl;
                if (mi.kind == "video") {
                    rawUrl = "/media/" + mediaId + "/raw";
                } else {
                    rawUrl = "/media/" + mediaId + "/preview";
                    std::string sep = "?";
                    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 = "&"; }
                }
                std::cerr << "media: upstream rawUrl=" << rawUrl << std::endl;
                libhttppp::HttpRequest dataReq;
                dataReq.setRequestURL(rawUrl);