private void UpdateVideoSelection() { bool hasVideoOptions = VideoOutputs.Items.Count > 0; if (hasVideoOptions) { selectedVideo = (VideoOutput)VideoOutputs.SelectedItem; UpdateSelectedOutput(GetVideoLabel()); } }
private string GetVideoLabel() { VideoOutput selectedItem = (VideoOutput)VideoOutputs.SelectedItem; if (selectedItem != null) { return("Video - " + selectedItem.Extension + ", " + selectedItem.Resolution); } else { return(""); } }
private string GenerateQuery(string fileName) { string query; if (isAudioOnly) { string extension = (string)AudioOutputs.SelectedValue; query = "-x --audio-format " + extension + " --audio-quality 0 -i -o " + fileName + extension + " " + urlInput.Text; } else { VideoOutput video = VideoOutputs.SelectedValue as VideoOutput; query = "-f " + video.FormatCode + " " + urlInput.Text + " -o \"" + fileName + "\""; } return(query); }
private void ClearOptions() { VideoOutputs.Items.Clear(); ClearSelectedOutput(); selectedVideo = null; }
private string GetVideoFilter() { VideoOutput video = VideoOutputs.SelectedValue as VideoOutput; return("Video file (*." + video.Extension + ")|*." + video.Extension); }