summaryrefslogtreecommitdiff
path: root/src/lib/content.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/content.cc')
-rw-r--r--src/lib/content.cc17
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 ();
+}