13
0

get PlaylistDisposition argument of Session::new_route_from_template() working

This commit is contained in:
Paul Davis 2015-11-14 16:01:24 -05:00
parent a84d4c0609
commit 108634c3f3

View File

@ -3097,9 +3097,9 @@ Session::new_route_from_template (uint32_t how_many, XMLNode& node, const std::s
bool rename_playlist; bool rename_playlist;
switch (pd) { switch (pd) {
case NewPlaylist: case NewPlaylist:
case CopyPlaylist:
rename_playlist = true; rename_playlist = true;
break; break;
case CopyPlaylist:
case SharePlaylist: case SharePlaylist:
rename_playlist = false; rename_playlist = false;
} }
@ -3142,6 +3142,21 @@ Session::new_route_from_template (uint32_t how_many, XMLNode& node, const std::s
route->set_remote_control_id (control_id); route->set_remote_control_id (control_id);
++control_id; ++control_id;
boost::shared_ptr<Track> track;
if ((track = boost::dynamic_pointer_cast<Track> (route))) {
switch (pd) {
case NewPlaylist:
track->use_new_playlist ();
break;
case CopyPlaylist:
track->use_copy_playlist ();
break;
case SharePlaylist:
break;
}
};
ret.push_back (route); ret.push_back (route);
RouteAddedOrRemoved (true); /* EMIT SIGNAL */ RouteAddedOrRemoved (true); /* EMIT SIGNAL */