'Return the "replaygain" ui subcommand.'

def commands(self):

    def func(lib, opts, args):
        write = ui.should_write()
        if opts.album:
            for album in lib.albums(ui.decargs(args)):
                self.handle_album(album, write)
        else:
            for item in lib.items(ui.decargs(args)):
                self.handle_track(item, write)
    cmd = ui.Subcommand('replaygain', help=u'analyze    for    ReplayGain')
    cmd.parser.add_album_option()
    cmd.func = func
    return [cmd]
