'windows assumes pythoncom wrapper'

def _add_library_book(self, file, metadata):

    if self.verbose:
        logger().info(('    %s._add_library_book()' % self.__class__.__name__))
    if isosx:
        import appscript
        added = self.iTunes.add(appscript.mactypes.File(file))
    elif iswindows:
        lib = self.iTunes.LibraryPlaylist
        file_s = ctypes.c_char_p(file)
        FileArray = (ctypes.c_char_p * 1)
        fa = FileArray(file_s)
        op_status = lib.AddFiles(fa)
        if self.verbose:
            logger().info('        file    added    to    Library|Books')
        logger().info(("        iTunes    adding    '%s'" % file))
        if self.verbose:
            sys.stdout.write(("        iTunes    copying    '%s'    ..." % metadata.title))
            sys.stdout.flush()
        while op_status.InProgress:
            time.sleep(0.5)
            if self.verbose:
                sys.stdout.write('.')
                sys.stdout.flush()
        if self.verbose:
            sys.stdout.write('\n')
            sys.stdout.flush()
        if True:
            '\n                                                                Preferable\n                                                                Originally    disabled    because    op_status.Tracks    never    returned    a    value\n                                                                after    adding    file.        Seems    to    be    working    with    iTunes    9.2.1.5    06    Aug    2010\n                                                                '
            if self.verbose:
                sys.stdout.write(("        waiting    for    handle    to    added    '%s'    ..." % metadata.title))
                sys.stdout.flush()
            while (op_status.Tracks is None):
                time.sleep(0.5)
                if self.verbose:
                    sys.stdout.write('.')
                    sys.stdout.flush()
            if self.verbose:
                print
            added = op_status.Tracks[0]
        else:
            '\n                                                                Hackish\n                                                                Search    Library|Books    for    the    book    we    just    added\n                                                                PDF    file    name    is    added    title    -    need    to    search    for    base    filename    w/o    extension\n                                                                '
            format = file.rpartition('.')[2].lower()
            base_fn = file.rpartition(os.sep)[2]
            base_fn = base_fn.rpartition('.')[0]
            added = self._find_library_book({'title': (base_fn if (format == 'pdf') else metadata.title), 'author': authors_to_string(metadata.authors), 'uuid': metadata.uuid, 'format': format})
    return added
