]> git.sesse.net Git - casparcg/commitdiff
#262
authorHelge Norberg <helge.norberg@gmail.com>
Tue, 5 Aug 2014 13:06:36 +0000 (15:06 +0200)
committerHelge Norberg <helge.norberg@gmail.com>
Tue, 5 Aug 2014 13:06:36 +0000 (15:06 +0200)
Added support for still playing http addresses via html producer bu using [HTML] as the first parameter. So for example:

PLAY 1-10 [HTML] http://www.casparcg.com

modules/html/producer/html_producer.cpp

index a7339412043a5d1ddc13886c18227108cfbc636f..3dbc1c68f600d65066e0e03d1c400023e04868a4 100644 (file)
@@ -343,12 +343,12 @@ safe_ptr<core::frame_producer> create_producer(
 {
        const auto filename = env::template_folder() + L"\\" + params.at_original(0) + L".html";
        
-       if (!boost::filesystem::exists(filename))
+       if (!boost::filesystem::exists(filename) && params.at(0) != L"[HTML]")
                return core::frame_producer::empty();
 
        const auto url = boost::filesystem::exists(filename) 
-               ? filename 
-               : params.at_original(0);
+               ? filename
+               : params.at_original(1);
                
        if(!boost::algorithm::contains(url, ".") || boost::algorithm::ends_with(url, "_A") || boost::algorithm::ends_with(url, "_ALPHA"))
                return core::frame_producer::empty();