def embed_album(album, maxwidth=None, quiet=False):
 imagepath = album.artpath
 if (not imagepath):
  log.info(u'No album art present: {0} - {1}'.format(album.albumartist, album.album))
  return
 if (not os.path.isfile(syspath(imagepath))):
  log.error(u'Album art not found at {0}'.format(displayable_path(imagepath)))
  return
 if maxwidth:
  imagepath = resize_image(imagepath, maxwidth)
 log.log((logging.DEBUG if quiet else logging.INFO), u'Embedding album art into {0.albumartist} - {0.album}.'.format(album))
 for item in album.items():
  embed_item(item, imagepath, maxwidth, None, config['embedart']['compare_threshold'].get(int), config['embedart']['ifempty'].get(bool), as_album=True)

def embed_album ( album , maxwidth = None , quiet = False ) : imagepath = album . artpath if ( not imagepath ) : log . info ( u'No album art present: {0} - {1}' . format ( album . albumartist , album . album ) ) return if ( not os . path . isfile ( syspath ( imagepath ) ) ) : log . error ( u'Album art not found at {0}' . format ( displayable_path ( imagepath ) ) ) return if maxwidth : imagepath = resize_image ( imagepath , maxwidth ) log . log ( ( logging . DEBUG if quiet else logging . INFO ) , u'Embedding album art into {0.albumartist} - {0.album}.' . format ( album ) ) for item in album . items ( ) : embed_item ( item , imagepath , maxwidth , None , config [ 'embedart' ] [ 'compare_threshold' ] . get ( int ) , config [ 'embedart' ] [ 'ifempty' ] . get ( bool ) , as_album = True )
embed album art into all of the albums items .