'Copies or converts the associated cover art of the album. Album must
have at least one track.'

def copy_album_art(self, album, dest_dir, path_formats, pretend=False):

    if ((not album) or (not album.artpath)):
        return
    album_item = album.items().get()
    if (not album_item):
        return
    dest = album_item.destination(basedir=dest_dir, path_formats=path_formats)
    dest = os.path.join(*util.components(dest)[:(-1)])
    dest = album.art_destination(album.artpath, item_dir=dest)
    if (album.artpath == dest):
        return
    if (not pretend):
        util.mkdirall(dest)
    if os.path.exists(util.syspath(dest)):
        self._log.info(u'Skipping    {0}    (target    file    exists)', util.displayable_path(album.artpath))
        return
    resize = False
    maxwidth = None
    if self.config['album_art_maxwidth']:
        maxwidth = self.config['album_art_maxwidth'].get(int)
        size = ArtResizer.shared.get_size(album.artpath)
        self._log.debug('image    size:    {}', size)
        if size:
            resize = (size[0] > maxwidth)
        else:
            self._log.warning(u'Could    not    get    size    of    image    (please    see    documentation    for    dependencies).')
    if resize:
        self._log.info(u'Resizing    cover    art    from    {0}    to    {1}', util.displayable_path(album.artpath), util.displayable_path(dest))
        if (not pretend):
            ArtResizer.shared.resize(maxwidth, album.artpath, dest)
    elif pretend:
        self._log.info(u'cp    {0}    {1}', util.displayable_path(album.artpath), util.displayable_path(dest))
    else:
        self._log.info(u'Copying    cover    art    to    {0}', util.displayable_path(album.artpath), util.displayable_path(dest))
        util.copy(album.artpath, dest)
