def remove(self, item): """Remove a photo or album from a database. item is either a Photo or PhotoAlbum object. """ if isinstance(item, PhotoAlbum): gpod.itdb_photodb_photoalbum_remove(self._itdb, item._pa, False) elif isinstance(item, Photo): gpod.itdb_photodb_remove_photo(self._itdb, None, item._photo) else: raise DatabaseException("Unable to remove a %s from database" % type(item))
def remove(self, photo): gpod.itdb_photodb_remove_photo(self._db._itdb, self._pa, photo._photo)