+ pos += range.second - range.first;
+ }
+
+ sort (_content.begin(), _content.end(), ContentSorter ());
+
+ reconnect ();
+ Changed ();
+}
+
+void
+Playlist::move_earlier (shared_ptr<Content> c)
+{
+ sort (_content.begin(), _content.end(), ContentSorter ());
+
+ ContentList::iterator previous = _content.end ();
+ ContentList::iterator i = _content.begin();
+ while (i != _content.end() && *i != c) {
+ previous = i;
+ ++i;
+ }
+
+ assert (i != _content.end ());
+ if (previous == _content.end ()) {
+ return;
+ }
+
+ Time const p = (*previous)->position ();
+ (*previous)->set_position (p + c->length_after_trim ());
+ c->set_position (p);
+ sort (_content.begin(), _content.end(), ContentSorter ());
+
+ Changed ();
+}
+
+void
+Playlist::move_later (shared_ptr<Content> c)
+{
+ sort (_content.begin(), _content.end(), ContentSorter ());
+
+ ContentList::iterator i = _content.begin();
+ while (i != _content.end() && *i != c) {
+ ++i;