Only mark _suspended as false at the appropriate times; previously
[dcpomatic.git] / src / lib / config.h
index 5ae14ebda03384f8250f3ad12d4085fd4025aa62..3518dc63fc4ea4a62985d03c161d9f260433e6c8 100644 (file)
@@ -79,6 +79,7 @@ public:
                INTERFACE_COMPLEXITY,
                PLAYER_CONTENT_DIRECTORY,
                PLAYER_PLAYLIST_DIRECTORY,
+               PLAYER_DEBUG_LOG,
                HISTORY,
 #ifdef DCPOMATIC_VARIANT_SWAROOP
                PLAYER_BACKGROUND_IMAGE,
@@ -488,6 +489,10 @@ public:
                return _player_activity_log_file;
        }
 
+       boost::optional<boost::filesystem::path> player_debug_log_file () const {
+               return _player_debug_log_file;
+       }
+
        boost::optional<boost::filesystem::path> player_content_directory () const {
                return _player_content_directory;
        }
@@ -856,7 +861,9 @@ public:
        }
 
        void add_to_history (boost::filesystem::path p);
+       void clean_history ();
        void add_to_player_history (boost::filesystem::path p);
+       void clean_player_history ();
 
        void set_jump_to_selected (bool j) {
                maybe_set (_jump_to_selected, j);
@@ -952,6 +959,18 @@ public:
                changed ();
        }
 
+       void set_player_debug_log_file (boost::filesystem::path p) {
+               maybe_set (_player_debug_log_file, p, PLAYER_DEBUG_LOG);
+       }
+
+       void unset_player_debug_log_file () {
+               if (!_player_debug_log_file) {
+                       return;
+               }
+               _player_debug_log_file = boost::none;
+               changed (PLAYER_DEBUG_LOG);
+       }
+
        void set_player_content_directory (boost::filesystem::path p) {
                maybe_set (_player_content_directory, p, PLAYER_CONTENT_DIRECTORY);
        }
@@ -1082,6 +1101,7 @@ private:
        boost::shared_ptr<dcp::CertificateChain> create_certificate_chain ();
        boost::filesystem::path directory_or (boost::optional<boost::filesystem::path> dir, boost::filesystem::path a) const;
        void add_to_history_internal (std::vector<boost::filesystem::path>& h, boost::filesystem::path p);
+       void clean_history_internal (std::vector<boost::filesystem::path>& h);
        void backup ();
 
        template <class T>
@@ -1231,6 +1251,8 @@ private:
            playlist etc.)  Does not contain debugging information.
        */
        boost::optional<boost::filesystem::path> _player_activity_log_file;
+       /** Log file containing debug information for the player */
+       boost::optional<boost::filesystem::path> _player_debug_log_file;
        /** A directory containing DCPs whose contents are presented to the user
            in the dual-screen player mode.  DCPs on the list can be loaded
            for playback.