public bool Output(OutputType output_type, string osu_file_path, ModsInfo mods, Dictionary <string, object> extra)
        {
            if (output_type == OutputType.Listen && String.IsNullOrWhiteSpace(osu_file_path))
            {
                ListenClean();
                return(true);
            }

            return(InfoOutputter.TrigOutput(output_type, osu_file_path, mods, extra));
        }
        private void Init(string config_path)
        {
            var config_instance = Config.LoadPPShowConfig(config_path);

            ListenOfs = new List <OutputWrapper>();
            PlayOfs   = new List <OutputWrapper>();

            foreach (var o in config_instance.output_list)
            {
                PlayOfs.Add(new OutputWrapper
                {
                    formatter = new OutputFormatter(o.output_format),
                    outputter = OutputBase.Create(o.output_file)
                });
            }

            foreach (var o in config_instance.listen_list)
            {
                ListenOfs.Add(new OutputWrapper
                {
                    formatter = new OutputFormatter(o.output_format),
                    outputter = OutputBase.Create(o.output_file)
                });
            }

            List <float> acc_list = new List <float>();

            foreach (var o in ListenOfs)
            {
                acc_list = acc_list.Concat(
                    from n in o.formatter.GetAccuracyArray()
                    where !acc_list.Contains(n)
                    select n
                    ).ToList();
            }

            foreach (var o in PlayOfs)
            {
                acc_list = acc_list.Concat(
                    from n in o.formatter.GetAccuracyArray()
                    where !acc_list.Contains(n)
                    select n
                    ).ToList();
            }

            if (acc_list.Count == 0)
            {
                Log.Warn("No pp query in PPShowConfig.json,defualt add 100%acc to get info.");
                acc_list.Add(100);
            }

            InfoOutputter = new InfoOutputter(acc_list);

            InfoOutputter.OnOutputEvent += OnOutput;
        }