private void PostData(UploadDataEntity data)
        {
            upload_queue.Enqueue(data);

#if DEBUG
            logger.LogInfomation("PostData:" + data.ToString());
#endif
        }
        private void BackupDataToLocalTemp(UploadDataEntity task_obj)
        {
            if (!Directory.Exists("Uploader_Backup"))
            {
                Directory.CreateDirectory("Uploader_Backup");
            }

            var path = Path.Combine("Uploader_Backup", $"{task_obj.OsuFileHash}-{DateTime.Now.GetHashCode()}.txt");

            File.WriteAllText(path, JsonConvert.SerializeObject(task_obj, Formatting.Indented));
        }
        private void ListenerManager_OnStatusChanged(OsuStatus last_status, OsuStatus status)
        {
            if (status == last_status)
            {
                return;
            }

            if (status == OsuStatus.Rank)
            {
                //collect data and post to uploading queue.
                //todo
                try
                {
                    var data = new
                               UploadDataEntity {
                        BeatmapInfo = new BeatmapInfoEntity()
                        {
                            Artist        = current_beatmap?.Artist,
                            ArtistUnicode = current_beatmap?.ArtistUnicode,
                            Title         = current_beatmap?.Title,
                            TitleUnicode  = current_beatmap?.TitleUnicode,
                            Version       = current_beatmap?.Version,
                            Creator       = current_beatmap?.Creator
                        },
                        OsuFileHash  = CalculateHash(),
                        PP           = displayer.Pp.RealTimePP,
                        StarRatio    = displayer.BeatmapTuple.Stars,
                        ACC          = CalculateAcc(),
                        UR           = current_ur,
                        BeatmapID    = current_beatmap?.BeatmapID,
                        BeatmapSetID = current_beatmap?.BeatmapSetID,
                        PlayerName   = current_player,
                        Score        = ortdp_plugin.ListenerManager.GetCurrentData(ProvideDataMask.Score).Score
                    };

                    PostData(data);
                }
                catch (Exception e)
                {
                    logger.LogError($"collect data failed!.exception message:{e.Message}");
                    return;
                }
            }
        }