def playlist(self, value): # TODO: better exception handling if self._obj.playlist != ffi.NULL: assert lib.groove_encoder_detach(self._obj) == 0 if value is not None: assert lib.groove_encoder_attach(self._obj, value._obj) == 0 self._playlist = value
def playlist(self, value): # TODO: better exception handling if self._playlist: assert lib.groove_encoder_detach(self._obj) == 0 self._playlist = None assert lib.groove_encoder_attach(self._obj, value._obj) == 0 self._playlist = value