string
Content::calculate_digest () const
{
- boost::mutex::scoped_lock lm (_mutex);
- auto p = _paths;
- lm.unlock ();
-
/* Some content files are very big, so we use a poor man's
digest here: a digest of the first and last 1e6 bytes with the
size of the first file tacked on the end as a string.
*/
- return digest_head_tail(p, 1000000) + raw_convert<string>(boost::filesystem::file_size(p.front()));
+ return simple_digest (paths());
}
return digester.get ();
}
+
+string
+simple_digest (vector<boost::filesystem::path> paths)
+{
+ return digest_head_tail(paths, 1000000) + raw_convert<string>(boost::filesystem::file_size(paths.front()));
+}
+
+
/** Round a number up to the nearest multiple of another number.
* @param c Index.
* @param stride Array of numbers to round, indexed by c.
extern void dcpomatic_setup_path_encoding ();
extern void dcpomatic_setup_gettext_i18n (std::string);
extern std::string digest_head_tail (std::vector<boost::filesystem::path>, boost::uintmax_t size);
+extern std::string simple_digest (std::vector<boost::filesystem::path> paths);
extern void ensure_ui_thread ();
extern std::string audio_channel_name (int);
extern std::string short_audio_channel_name (int);