diff options
| author | Carl Hetherington <cth@carlh.net> | 2013-10-16 23:08:31 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2013-10-16 23:08:31 +0100 |
| commit | 5072adc82cf6ae088bb6e08af8bbef2d0d49914c (patch) | |
| tree | 48399cd467f0648a6e771ff26652e5e079ab0ab3 /src/lib/content.cc | |
| parent | b07f8b2ea71d50d7da76f8929d47c56e3807c59f (diff) | |
Content trim and position in the digests used to decide whether or not a rebuild is necessary.
Diffstat (limited to 'src/lib/content.cc')
| -rw-r--r-- | src/lib/content.cc | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/lib/content.cc b/src/lib/content.cc index d2a07f795..dbb841200 100644 --- a/src/lib/content.cc +++ b/src/lib/content.cc @@ -26,6 +26,7 @@ #include "ui_signaller.h" using std::string; +using std::stringstream; using std::set; using boost::shared_ptr; using boost::lexical_cast; @@ -174,3 +175,19 @@ Content::trimmed (Time t) const { return (t < trim_start() || t > (full_length() - trim_end ())); } + +/** @return string which includes everything about how this content affects + * its playlist. + */ +string +Content::identifier () const +{ + stringstream s; + + s << Content::digest() + << "_" << position() + << "_" << trim_start() + << "_" << trim_end(); + + return s.str (); +} |
