Пример #1
0
        public static void DownloadPS2Job(JObject thisManifest, JObject lastManifest, string outputfolder, FullDownloadJobComplete jobComplete, string jobName)
        {
            if (!Directory.Exists("output/")) Directory.CreateDirectory("output/");
            if (!Directory.Exists("output/PS2Install")) Directory.CreateDirectory("output/PS2Install");
            if (!Directory.Exists("output/PS2Install/" + outputfolder)) Directory.CreateDirectory("output/PS2Install/" + outputfolder);

            string of = "output/PS2Install/" + outputfolder + "/";

            JToken folders = thisManifest["digest"]["folder"];

            string shaasset = (string)thisManifest["digest"]["@shaAssetURL"];

            Downloader.JobCallbacks[jobName] = jobComplete;

            if (lastManifest == null) UpdateFilesInFolder(shaasset, of, folders, null, jobName);
            else
            {
                JToken oldFolders = lastManifest["digest"]["folder"];
                UpdateFilesInFolder(shaasset, of, folders, oldFolders, jobName);
            }
        }
Пример #2
0
        public static void DownloadPS2Job(JObject thisManifest, JObject lastManifest, string outputfolder, FullDownloadJobComplete jobComplete, string jobName)
        {
            if (!Directory.Exists("output/"))
            {
                Directory.CreateDirectory("output/");
            }
            if (!Directory.Exists("output/PS2Install"))
            {
                Directory.CreateDirectory("output/PS2Install");
            }
            if (!Directory.Exists("output/PS2Install/" + outputfolder))
            {
                Directory.CreateDirectory("output/PS2Install/" + outputfolder);
            }

            string of = "output/PS2Install/" + outputfolder + "/";


            JToken folders = thisManifest["digest"]["folder"];

            string downloadURL = (string)thisManifest["digest"]["@defaultServerFolder"];

            Downloader.JobCallbacks[jobName] = jobComplete;

            if (lastManifest == null)
            {
                UpdateFilesInFolder(downloadURL, "", of, folders, null, jobName);
            }
            else
            {
                JToken oldFolders = lastManifest["digest"]["folder"];
                UpdateFilesInFolder(downloadURL, "", of, folders, oldFolders, jobName);
            }
        }
Пример #3
0
 public static string DownloadPS2Job(JObject thisManifest, JObject lastManifest, string outputfolder, FullDownloadJobComplete jobComplete)
 {
     string jobStart = DateTime.Now.ToString();
     DownloadPS2Job(thisManifest, lastManifest, outputfolder, jobComplete, jobStart);
     return jobStart;
 }
Пример #4
0
        public static string DownloadPS2Job(JObject thisManifest, JObject lastManifest, string outputfolder, FullDownloadJobComplete jobComplete)
        {
            string jobStart = DateTime.Now.ToString();

            DownloadPS2Job(thisManifest, lastManifest, outputfolder, jobComplete, jobStart);
            return(jobStart);
        }