]> git.sesse.net Git - casparcg/blobdiff - common/env.cpp
[env] Added backwards compatibility (with deprecation warning) for using thumbnails...
[casparcg] / common / env.cpp
index 6984e2d827104289839215795a7702ca5d91e9e3..b97daca058f2c184d0f208c2751c2f291ff9e556 100644 (file)
@@ -125,7 +125,7 @@ void configure(const std::wstring& filename)
                ftemplate       = clean_path(boost::filesystem::complete(paths.get(L"template-path", initial + L"/template/")).wstring());
                data            = clean_path(paths.get(L"data-path", initial + L"/data/"));
                font            = clean_path(paths.get(L"font-path", initial + L"/font/"));
-               thumbnails      = clean_path(paths.get(L"thumbnail-path", initial + L"/thumbnail/"));
+               thumbnails      = clean_path(paths.get(L"thumbnail-path", paths.get(L"thumbnails-path", initial + L"/thumbnail/")));
        }
        catch (...)
        {
@@ -208,4 +208,13 @@ const boost::property_tree::wptree& properties()
        return pt;
 }
 
+void log_configuration_warnings()
+{
+       if (pt.empty())
+               return;
+
+       if (pt.get_optional<std::wstring>(L"configuration.paths.thumbnails-path"))
+               CASPAR_LOG(warning) << L"Element thumbnails-path in casparcg.config has been deprecated. Use thumbnail-path instead.";
+}
+
 }}