private void MediaAudioListAdd(string path) { var fileData = new FFmpeg.MediaInfo(path); foreach (ListViewItem lst in lstFile.SelectedItems) { foreach (var item in fileData.Audio) { (lst.Tag as MediaQueue).Audio.Add(MediaQueueParse.Audio(path, item)); } } MediaShowReList(); }
private void MediaFileListAdd(string path) { var fileData = new FFmpeg.MediaInfo(path); var fileQueue = new MediaQueue() { Enable = true, FilePath = path, FileSize = fileData.FileSize, Duration = fileData.Duration, InputFormat = fileData.FormatNameFull, OutputFormat = MediaContainer.MKV, Info = fileData }; foreach (var item in fileData.Video) { fileQueue.Video.Add(MediaQueueParse.Video(path, item)); } foreach (var item in fileData.Audio) { fileQueue.Audio.Add(MediaQueueParse.Audio(path, item)); } foreach (var item in fileData.Subtitle) { fileQueue.Subtitle.Add(MediaQueueParse.Subtitle(path, item)); } foreach (var item in fileData.Attachment) { fileQueue.Attachment.Add(MediaQueueParse.Attachment(path, item)); } lstFile.Items.Add(new ListViewItem(new[] { Path.GetFileName(path), Path.GetExtension(path).Substring(1).ToUpperInvariant(), TimeSpan.FromSeconds(fileData.Duration).ToString("hh\\:mm\\:ss"), OS.PrintFileSize(fileData.FileSize), fileQueue.Enable ? "Ready" : "Done", "" }) { Tag = fileQueue, Checked = true, Selected = true }); }