Пример #1
0
        private ILoadProcess DownloadImpl(ISoundLoadDatabase database, string cueSheetName)
        {
            var fileData = database.Find(cueSheetName);

            if (fileData == null)
            {
                ChipstarLog.Log_RequestCueSheet_Error(cueSheetName);
                return(SkipLoadProcess.Create(cueSheetName));
            }
            ChipstarLog.Log_Download_Sound(fileData);
            ILoadProcess acbJob = SkipLoadProcess.Create(cueSheetName);

            var(acbUrl, awbUrl) = database.GetServerLocation(fileData);
            if (!HasAcb(fileData))
            {
                acbJob = Download(acbUrl, fileData.Acb);
            }
            else
            {
                ChipstarLog.Log($"Cached :: {fileData.Acb.Identifier}");
            }
            if (!fileData.HasAwb())
            {
                //	Awbファイルがないならココまで
                return(acbJob);
            }
            ILoadProcess awbJob = SkipLoadProcess.Create(cueSheetName);

            if (!HasAwb(fileData))
            {
                awbJob = Download(awbUrl, fileData.Awb);
            }
            else
            {
                ChipstarLog.Log($"Cached :: {fileData.Awb.Identifier}");
            }
            return(acbJob.ToJoin(awbJob));
        }