private void treeView1_DoubleClick(object sender, EventArgs e) { if (((Descriptor)plexTreeView.SelectedNode.Tag).canDownload) { Clipboard.SetText(PlexUtils.getDownloadURL(plexTreeView.SelectedNode)); MessageBox.Show("URL Copied to clipboard"); } }
internal static void PlayInVLC(TreeNode selected, TreeNode subfile = null) { ProcessStartInfo startInfo = new ProcessStartInfo(); RegistryKey key = null; try { using (var lm = RegistryKey.OpenBaseKey(RegistryHive.LocalMachine, RegistryView.Registry64)) { key = lm.OpenSubKey(@"SOFTWARE\VideoLAN\VLC\"); if (key == null) { key = lm.OpenSubKey(@"SOFTWARE\WOW6432Node\VideoLAN\VLC\"); } if (key == null) { MessageBox.Show("Please install VLC to use this feature"); } } } catch { MessageBox.Show("Failed to read from registry"); } if (key != null) { try { Process.Start(key.GetValue("").ToString(), PlexUtils.getDownloadURL(selected) + (subfile == null ? "" : " --sub-file=\"" + downloadTemp(PlexUtils.getDownloadURL(subfile)) + '"') ); } catch { MessageBox.Show("Failed to launch VLC."); } } }
private void copyUrlToolStripMenuItem_Click(object sender, EventArgs e) { Clipboard.SetText(PlexUtils.getDownloadURL(selected)); MessageBox.Show("URL Copied to clipboard"); }