Beispiel #1
0
        void UpdateDownloadNotify(long lTotalSize, long lAlreadyDownloadSize, long lIncreSize, object data)
        {
            object[] paras = (object[])data;
            MainItem main  = (MainItem)paras[0];
            SubItem  sub   = (SubItem)paras[1];

            sub.DownloadSize = lAlreadyDownloadSize;
            sub.Percentage   = (int)(sub.DownloadSize * 100 / lTotalSize);

            lock (LockForMain)
            {
                //检查子项是否获取文件大小失败
                if (sub.TotalSize <= 0)
                {
                    sub.TotalSize   = lTotalSize;
                    main.TotalSize += lTotalSize;
                }

                main.DownloadSize += lIncreSize;
                main.Percentage    = (int)(main.DownloadSize * 100 / main.TotalSize);
            }
        }
Beispiel #2
0
        public string GetFilePath(MainItem main, SubItem sub)
        {
            string sRet = Para.Config.OutputDir + '\\' + main.Type + '\\' + main.Name + '\\' + AIGS.Helper.PathHelper.ReplaceLimitChar(sub.Name, "-") + ".m4a";

            return(sRet);
        }