private static void CreateTorrent(WorkerTask task) { if (mTorrentCreate) { Helpers.CreateDirectoryFromDirectoryPath(mTorrentsDir); if (Directory.Exists(mTorrentsDir)) { task.Info.TaskSettings.TorrentFolder = mTorrentsDir; } task.CreateTorrent(); // create xml file if (mXmlCreate) { string fp = Path.Combine(task.Info.TaskSettings.TorrentFolder, MediaHelper.GetMediaName(task.Info.TaskSettings.Media.Location)) + ".xml"; FileSystem.GetXMLTorrentUpload(task.Info.TaskSettings).Write2(fp); } } }