Fix merge.
[dcpomatic.git] / src / lib / config.cc
index 3a3a87faa53f227bee8d8a66a23128b3c026fbde..79a7b01f1dd68f4aebf39cb07e5797533926abfa 100644 (file)
@@ -52,12 +52,15 @@ Config* Config::_instance = 0;
 Config::Config ()
        : _num_local_encoding_threads (max (2U, boost::thread::hardware_concurrency()))
        , _server_port (6192)
-       , _tms_path (N_("."))
+       , _tms_path (".")
        , _sound_processor (SoundProcessor::from_id (N_("dolby_cp750")))
        , _default_still_length (10)
        , _default_container (Ratio::from_id ("185"))
        , _default_dcp_content_type (DCPContentType::from_dci_name ("TST"))
        , _default_j2k_bandwidth (200000000)
+       , _kdm_email (
+               "Dear Projectionist\n\nPlease find attached KDMs for $CPL_NAME.\n\nBest regards,\nDCP-o-matic"
+               )
 {
        _allowed_dcp_frame_rates.push_back (24);
        _allowed_dcp_frame_rates.push_back (25);
@@ -142,12 +145,13 @@ Config::read ()
 
        _mail_server = f.string_child ("MailServer");
        _kdm_from = f.string_child ("KDMFrom");
+       _kdm_email = f.string_child ("KDMEmail");
 }
 
 void
 Config::read_old_metadata ()
 {
-       ifstream f (file(true).c_str ());
+       ifstream f (file(true).string().c_str ());
        string line;
 
        while (getline (f, line)) {
@@ -217,7 +221,8 @@ Config::file (bool old) const
        if (old) {
                p /= ".dvdomatic";
        } else {
-               p /= "dcpomatic.xml";
+               p /= "dcpomatic";
+               p /= "config.xml";
        }
        return p;
 }
@@ -227,7 +232,7 @@ Config::signer_chain_directory () const
 {
        boost::filesystem::path p;
        p /= g_get_user_config_dir ();
-       p /= "dvdomatic";
+       p /= "dcpomatic";
        p /= "crypt";
        boost::filesystem::create_directories (p);
        return p;
@@ -300,6 +305,7 @@ Config::write () const
 
        root->add_child("MailServer")->add_child_text (_mail_server);
        root->add_child("KDMFrom")->add_child_text (_kdm_from);
+       root->add_child("KDMEmail")->add_child_text (_kdm_email);
 
        doc.write_to_file_formatted (file(false).string ());
 }