'Print a listing of tracks missing from each album in the library
matching query.'

def _missing_tracks(self, lib, query):

    albums = lib.albums(query)
    count = self.config['count'].get()
    total = self.config['total'].get()
    fmt = config[('format_album' if count else 'format_item')].get()
    if total:
        print(sum([_missing_count(a) for a in albums]))
        return
    if count:
        fmt += ':    $missing'
    for album in albums:
        if count:
            if _missing_count(album):
                print_(format(album, fmt))
        else:
            for item in self._missing(album):
                print_(format(item, fmt))
