'calls the appropriate CMD class
looks for a cmd in args and kwargs
or calls the TVDBShorthandWrapper when the first args element is a number
or returns an error that there is no such cmd'

def call_dispatcher(self, args, kwargs):

    logger.log(((u"API    ::    all    args:    '" + str(args)) + u"'"), logger.DEBUG)
    logger.log(((u"API    ::    all    kwargs:    '" + str(kwargs)) + u"'"), logger.DEBUG)
    commands = None
    if args:
        (commands, args) = (args[0], args[1:])
    commands = kwargs.pop(u'cmd', commands)
    out_dict = {}
    if commands:
        commands = commands.split(u'|')
        multi_commands = (len(commands) > 1)
        for cmd in commands:
            (cur_args, cur_kwargs) = self.filter_params(cmd, args, kwargs)
            if (len(cmd.split(u'_')) > 1):
                (cmd, cmd_index) = cmd.split(u'_')
            else:
                cmd_index = None
            logger.log((((u'API    ::    ' + cmd) + u':    cur_kwargs    ') + str(cur_kwargs)), logger.DEBUG)
            if (not ((cmd in (u'show.getbanner', u'show.getfanart', u'show.getnetworklogo', u'show.getposter')) and multi_commands)):
                try:
                    if (cmd in function_mapper):
                        func = function_mapper.get(cmd)
                        to_call = func(cur_args, cur_kwargs)
                        to_call.rh = self
                        cur_out_dict = to_call.run()
                    elif _is_int(cmd):
                        to_call = TVDBShorthandWrapper(cur_args, cur_kwargs, cmd)
                        to_call.rh = self
                        cur_out_dict = to_call.run()
                    else:
                        cur_out_dict = _responds(RESULT_ERROR, ((u"No    such    cmd:    '" + cmd) + u"'"))
                except ApiError as error:
                    cur_out_dict = _responds(RESULT_ERROR, msg=ex(error))
            else:
                cur_out_dict = _responds(RESULT_ERROR, msg=((u"The    cmd    '" + cmd) + u"'    is    not    supported    while    chaining"))
            if multi_commands:
                if cmd_index:
                    if (cmd not in out_dict):
                        out_dict[cmd] = {}
                    out_dict[cmd][cmd_index] = cur_out_dict
                else:
                    out_dict[cmd] = cur_out_dict
            else:
                out_dict = cur_out_dict
        if multi_commands:
            out_dict = _responds(RESULT_SUCCESS, out_dict)
    else:
        out_dict = CMDSickBeard(args, kwargs).run()
    return out_dict
