pass
def _on_delete_curve(self, _class, method, playlist, curve):
- # TODO: execute_command 'remove curve from playlist'
+ index = playlist.index(curve)
+ results = self.execute_command(
+ command=self._command_by_name('remove curve from playlist'),
+ args={'index': index})
#os.remove(curve.path)
pass
if c.name == name:
curve = c
break
- self._delete_curve(playlist, curve)
+ if curve is None:
+ raise ValueError(name)
+ self._delete_curve(playlist=playlist, curve=curve)
in_callback(self, playlist, curve)
def _delete_curve(self, playlist, curve):
"""
_id = self._id_for_name.pop((playlist.name, curve.name))
del(self._name_for_id[_id])
- in_callback(self, playlist, curve)
+ in_callback(self, playlist=playlist, curve=curve)
# Get selection