示例#1
0
文件: ipod.py 项目: Babl0lka/libgpod
    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))
示例#2
0
    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))
示例#3
0
 def remove(self, photo):
     gpod.itdb_photodb_remove_photo(self._db._itdb, self._pa, photo._photo)
示例#4
0
文件: ipod.py 项目: Babl0lka/libgpod
 def remove(self, photo):
     gpod.itdb_photodb_remove_photo(self._db._itdb, self._pa, photo._photo)