diff --git a/Controls/ExtendedProgressBar.cs b/Controls/ExtendedProgressBar.cs index ee8ecee6..7cb6443f 100644 --- a/Controls/ExtendedProgressBar.cs +++ b/Controls/ExtendedProgressBar.cs @@ -272,12 +272,14 @@ public bool ShowTextDropShadow { get => base.Style; set { base.Style = value; - if (_ShowInTaskbar && _ContainerParent != null) { - SetStateInTaskbar(); - SetValueInTaskbar(); - } - if (value != ProgressBarStyle.Marquee && this.IsHandleCreated) { - NativeMethods.SendMessage(Handle, PBM_SETSTATE, (IntPtr)_ProgressState, IntPtr.Zero); + if (this.IsHandleCreated) { + if (_ShowInTaskbar && _ContainerParent != null) { + SetStateInTaskbar(); + SetValueInTaskbar(); + } + if (value != ProgressBarStyle.Marquee) { + NativeMethods.SendMessage(Handle, PBM_SETSTATE, (IntPtr)_ProgressState, IntPtr.Zero); + } } } } @@ -403,9 +405,10 @@ protected override void OnHandleCreated(EventArgs e) { base.OnHandleCreated(e); TextGraphics = CreateGraphics(); TextSize = TextGraphics.MeasureString(Text, Font); - if (ProgressState != ProgressBarState.Normal) { - NativeMethods.SendMessage(Handle, PBM_SETSTATE, (nint)ProgressState, IntPtr.Zero); - SetStateInTaskbar(); + if (DesignMode) { + if (ProgressState != ProgressBarState.Normal) { + NativeMethods.SendMessage(Handle, PBM_SETSTATE, (nint)ProgressState, IntPtr.Zero); + } } } @@ -455,7 +458,11 @@ protected override void WndProc(ref Message m) { #region Events internal void ExtendedProgressBar_Shown(object sender, EventArgs e) { - if (_ShowInTaskbar) { + if (ProgressState != ProgressBarState.Normal) { + NativeMethods.SendMessage(Handle, PBM_SETSTATE, (nint)ProgressState, IntPtr.Zero); + } + + if (ShowInTaskbar) { if (Style != ProgressBarStyle.Marquee) { SetValueInTaskbar(); } diff --git a/youtube-dl-gui-updater/Classes/Language.cs b/youtube-dl-gui-updater/Classes/Language.cs index 7e8876f4..40069b52 100644 --- a/youtube-dl-gui-updater/Classes/Language.cs +++ b/youtube-dl-gui-updater/Classes/Language.cs @@ -17,8 +17,8 @@ public static class Language { public static string lbExceptionDescription { get; private set; } public static string rtbExceptionDetails { get; private set; } public static string btnExceptionGithub { get; private set; } - public static string tpExceptionDetails { get; private set; } - public static string tpExceptionExtraInfo { get; private set; } + public static string tabExceptionDetails { get; private set; } + public static string tabExceptionExtraInfo { get; private set; } public static string frmUpdater { get; private set; } public static string lbUpdaterHeader { get; private set; } @@ -51,8 +51,8 @@ public static class InternalEnglish { public const string lbExceptionDescription = "Below is the error that occured. Feel free to open a new issue and report it."; public const string rtbExceptionDetails = "Feel free to copy + paste this entire text wall into a new issue on Github"; public const string btnExceptionGithub = "Github"; - public const string tpExceptionDetails = "Exception details"; - public const string tpExceptionExtraInfo = "Extra info"; + public const string tabExceptionDetails = "Exception details"; + public const string tabExceptionExtraInfo = "Extra info"; public const string frmUpdater = "Updating"; public const string lbUpdaterHeader = "Updating youtube-dl-gui"; @@ -85,8 +85,8 @@ public static void LoadInternalEnglish() { lbExceptionDescription = InternalEnglish.lbExceptionDescription; rtbExceptionDetails = InternalEnglish.rtbExceptionDetails; btnExceptionGithub = InternalEnglish.btnExceptionGithub; - tpExceptionDetails = InternalEnglish.tpExceptionDetails; - tpExceptionExtraInfo = InternalEnglish.tpExceptionExtraInfo; + tabExceptionDetails = InternalEnglish.tabExceptionDetails; + tabExceptionExtraInfo = InternalEnglish.tabExceptionExtraInfo; frmUpdater = InternalEnglish.frmUpdater; lbUpdaterHeader = InternalEnglish.lbUpdaterHeader; @@ -163,11 +163,11 @@ public static bool LoadLanguage(string LanguageFile = null) { case "btnexceptiongithub": btnExceptionGithub = ReadValue; continue; - case "tpexceptiondetails": - tpExceptionDetails = ReadValue; + case "tabexceptiondetails": + tabExceptionDetails = ReadValue; continue; - case "tpexceptionextrainfo": - tpExceptionExtraInfo = ReadValue; + case "tabexceptionextrainfo": + tabExceptionExtraInfo = ReadValue; continue; case "frmupdater": diff --git a/youtube-dl-gui/Classes/DataClasses/DownloaderData.cs b/youtube-dl-gui/Classes/DataClasses/DownloaderData.cs index ec6c845c..aa483a69 100644 --- a/youtube-dl-gui/Classes/DataClasses/DownloaderData.cs +++ b/youtube-dl-gui/Classes/DataClasses/DownloaderData.cs @@ -121,7 +121,7 @@ public string Duration { if (DurationTime is not null) { int hours = 0; int minutes = 0; - long seconds = DurationTime.Value; + decimal seconds = DurationTime.Value; while (seconds >= 60) { minutes++; @@ -133,7 +133,7 @@ public string Duration { minutes -= 60; } - return $"{(hours > 0 ? $"{hours:N0}:{minutes:00.##}" : $"{minutes}")}:{seconds:00.##}"; + return $"{(hours > 0 ? $"{hours:N0}:{minutes:00.##}" : $"{minutes}")}:{Math.Round(seconds, MidpointRounding.ToEven):00.##}"; } return DurationString.IsNullEmptyWhitespace() ? "???" : DurationString; @@ -162,7 +162,7 @@ public string Duration { public string DurationString { get; set; } [DataMember(Name = "duration")] - public long? DurationTime { get; set; } + public decimal? DurationTime { get; set; } [DataContract(Name = "formats")] public class Format { diff --git a/youtube-dl-gui/Classes/Language.cs b/youtube-dl-gui/Classes/Language.cs index 4ffc049b..1307ae99 100644 --- a/youtube-dl-gui/Classes/Language.cs +++ b/youtube-dl-gui/Classes/Language.cs @@ -38,15 +38,23 @@ public static class Language { public static string GenericAdd { get; private set; } public static string GenericRemoveSelected { get; private set; } public static string GenericVerifyLinks { get; private set; } + public static string GenericDoNotReEncode { get; private set; } + public static string GenericDoNotRemux { get; private set; } + + /// + /// Not really a generic, but it's a single string. + /// + public static string frmGenericDownloadProgress { get; private set; } #endregion #region Dialogs public static string dlgFirstTimeInitialMessage { get; private set; } public static string dlgFirstTimeDownloadFolder { get; private set; } + public static string dlgFirstTimeDownloadYoutubeDl { get; private set; } + public static string dlgFirstTimeDownloadFfmpeg { get; private set; } public static string dlgClipboardAutoDownloadNotice { get; private set; } public static string dlgBatchDownloadClipboardScannerNotice { get; private set; } - public static string dlgRunningActions { get; private set; } public static string dlgMainArgsTxtDoesntExist { get; private set; } public static string dlgMainArgsTxtIsEmpty { get; private set; } @@ -148,8 +156,8 @@ public static class Language { public static string lbExceptionDescription { get; private set; } public static string rtbExceptionDetails { get; private set; } public static string btnExceptionGithub { get; private set; } - public static string tpExceptionDetails { get; private set; } - public static string tpExceptionExtraInfo { get; private set; } + public static string tabExceptionDetails { get; private set; } + public static string tabExceptionExtraInfo { get; private set; } #endregion #region frmExtendedDownloader @@ -160,8 +168,14 @@ public static class Language { public static string lbExtendedDownloaderDownloadingThumbnail { get; private set; } public static string lbExtendedDownloaderDownloadingThumbnailFailed { get; private set; } public static string btnExtendedDownloaderDownloadThumbnail { get; private set; } - public static string tpExtendedDownloaderFormatOptions { get; private set; } + public static string tabExtendedDownloaderDescription { get; private set; } + public static string tabExtendedDownloaderVerbose { get; private set; } + public static string tabExtendedDownloaderFormatOptions { get; private set; } public static string chkExtendedDownloaderVideoSeparateAudio { get; private set; } + public static string lbExtendedDownloaderNoVideoFormatsAvailable { get; private set; } + public static string lbExtendedDownloaderNoAudioFormatsAvailable { get; private set; } + public static string lbVideoRemux { get; private set; } + public static string txtExtendedDownloaderMediaTitle { get; private set; } #endregion #region frmLanguage @@ -249,7 +263,6 @@ public static class Language { #region frmSettings form public static string frmSettings { get; private set; } - public static string btnSettingsRedownloadYoutubeDl { get; private set; } public static string tabSettingsGeneral { get; private set; } public static string tabSettingsDownloads { get; private set; } @@ -257,6 +270,8 @@ public static class Language { public static string tabSettingsExtensions { get; private set; } public static string tabSettingsErrors { get; private set; } + public static string tabSettingsGeneralYoutubeDl { get; private set; } + public static string tabSettingsGeneralFfmpeg { get; private set; } public static string lbSettingsGeneralYoutubeDlPath { get; private set; } public static string chkSettingsGeneralUseStaticYoutubeDl { get; private set; } public static string ofdTitleYoutubeDl { get; private set; } @@ -265,6 +280,9 @@ public static class Language { public static string chkSettingsGeneralUseStaticFFmpeg { get; private set; } public static string ofdTitleFFmpeg { get; private set; } public static string ofdFilterFFmpeg { get; private set; } + public static string btnSettingsRedownloadYoutubeDl { get; private set; } + public static string btnSettingsRedownloadFfmpeg { get; private set; } + public static string chkSettingsGeneralCheckForUpdatesOnLaunch { get; private set; } public static string chkSettingsGeneralCheckForBetaUpdates { get; private set; } public static string chkSettingsGeneralDeleteUpdaterAfterUpdating { get; private set; } @@ -349,7 +367,6 @@ public static class Language { #endregion #region tipSettings - public static string btnSettingsRedownloadYoutubeDlHint { get; private set; } public static string btnSettingsCancelHint { get; private set; } public static string btnSettingsSaveHint { get; private set; } @@ -361,6 +378,9 @@ public static class Language { public static string chkSettingsGeneralUseStaticFFmpegHint { get; private set; } public static string txtSettingsGeneralFFmpegPathHint { get; private set; } public static string btnSettingsGeneralBrowseFFmpegHint { get; private set; } + public static string btnSettingsRedownloadYoutubeDlHint { get; private set; } + public static string btnSettingsRedownloadFfmpegHint { get; private set; } + public static string chkSettingsGeneralCheckForUpdatesOnLaunchHint { get; private set; } public static string chkSettingsGeneralCheckForBetaUpdatesHint { get; private set; } public static string chkSettingsGeneralDeleteUpdaterAfterUpdatingHint { get; private set; } @@ -491,15 +511,20 @@ public static class InternalEnglish { public const string GenericAdd = "Add"; public const string GenericRemoveSelected = "Remove selected"; public const string GenericVerifyLinks = "Verify copied links"; + public const string GenericDoNotReEncode = "(Do not re-encode)"; + public const string GenericDoNotRemux = "(Do not remux)"; + + public const string frmGenericDownloadProgress = "Downloading..."; #endregion #region Dialogs public const string dlgFirstTimeInitialMessage = "youtube-dl-gui is a visual extension to youtube-dl and is not affiliated with the developers of youtube-dl in any way.\n\nThis program (and I) does not condone piracy or illegally downloading of any video you do not own the rights to or is not in public domain.\n\nAny help regarding any problems when downloading anything illegal (in my jurisdiction) will be ignored. This message will not appear again.\n\nHave you read the above?"; public const string dlgFirstTimeDownloadFolder = "Downloads are saved to your downloads folder by default, would you like to specify a different location now?\n(You can change this in the settings at any time)"; + public const string dlgFirstTimeDownloadYoutubeDl = "Would you like to download youtube-dl (yt-dlp is the default fork)? You can do this manually in the settings if you do not wish to do it now."; + public const string dlgFirstTimeDownloadFfmpeg = "Would you like to download ffmpeg? You can do this manually in the settings if you do not wish to do it now."; public const string dlgClipboardAutoDownloadNotice = "Using the clipboard auto downloader will automatically attempt to download verified links from the clipboard using the selected settings on the main form. Please do not copy any sensitive information while this option is enabled, ever."; public const string dlgBatchDownloadClipboardScannerNotice = "Enabling this option will add anything from your clipboard when something is copied (link or not). It will need to be manually enabled per-converter instance. Take care to not copy any sensitive information to the cipboard."; - public const string dlgRunningActions = "There are actions currently running. Wait for them to finish or abort them before closing the main form."; public const string dlgFindDownloadFolder = "Select a directory to save downloads to..."; public const string dlgMainArgsTxtDoesntExist = "args.txt does not exist, create it and put in arguments to use this command"; @@ -605,8 +630,8 @@ public static class InternalEnglish { public const string lbExceptionDescription = "Below is the error that occured. Feel free to open a new issue and report it."; public const string rtbExceptionDetails = "Feel free to copy + paste this entire text wall into a new issue on Github"; public const string btnExceptionGithub = "Github"; - public const string tpExceptionDetails = "Exception details"; - public const string tpExceptionExtraInfo = "Extra info"; + public const string tabExceptionDetails = "Exception details"; + public const string tabExceptionExtraInfo = "Extra info"; #endregion #region frmExtendedDownloader @@ -617,8 +642,14 @@ public static class InternalEnglish { public const string lbExtendedDownloaderDownloadingThumbnail = "Downloading thumbnail..."; public const string lbExtendedDownloaderDownloadingThumbnailFailed = "Unable to download thumbnail"; public const string btnExtendedDownloaderDownloadThumbnail = "Get thumbnail"; - public const string tpExtendedDownloaderFormatOptions = "Format download options"; + public const string tabExtendedDownloaderDescription = "Description"; + public const string tabExtendedDownloaderVerbose = "Verbose"; + public const string tabExtendedDownloaderFormatOptions = "Format download options"; public const string chkExtendedDownloaderVideoSeparateAudio = "Separate audio from video"; + public const string lbExtendedDownloaderNoVideoFormatsAvailable = "No video formats are available."; + public const string lbExtendedDownloaderNoAudioFormatsAvailable = "No audio formats are available."; + public const string lbVideoRemux = "Video remux"; + public const string txtExtendedDownloaderMediaTitle = "Retrieving media information..."; #endregion #region frmLanguage @@ -715,8 +746,6 @@ public static class InternalEnglish { // frmSettings public const string frmSettings = "youtube-dl-gui settings"; - public const string btnSettingsRedownloadYoutubeDl = "(re)download youtube-dl"; - public const string btnSettingsRedownloadYoutubeDlHint = "Redownloads youtube-dl if one is already present, otherwise, updates youtube-dl"; public const string btnSettingsCancelHint = "Discard any changed settings"; public const string btnSettingsSaveHint = "Save all configured settings"; // frmSettings / tcMain @@ -727,6 +756,9 @@ public static class InternalEnglish { public const string tabSettingsErrors = "Errors"; #region tabGeneral //frmSettings / tcMain / tabGeneral + public const string tabSettingsGeneralYoutubeDl = "youtube-dl"; + public const string tabSettingsGeneralFfmpeg = "ffmpeg"; + public const string lbSettingsGeneralYoutubeDlPath = "youtube-dl path"; public const string chkSettingsGeneralUseStaticYoutubeDl = "Use static youtube-dl"; public const string txtSettingsGeneralYoutubeDlPathHint = "The path of youtube-dl where it won't be moved"; @@ -740,6 +772,11 @@ public static class InternalEnglish { public const string ofdTitleFFmpeg = "Select ffmpeg.exe and ffprobe.exe"; public const string ofdFilterFFmpeg = "ffmpeg and ffprobe executable"; + public const string btnSettingsRedownloadYoutubeDl = "(re)download youtube-dl"; + public const string btnSettingsRedownloadYoutubeDlHint = "Downloads or updates youtube-dl to the known path of youtube-dl if one is known; otherwise, the same directory as the program.\n\nIf the path to youtube-dl is not accessible or writeable by this program, the download will fail."; + public const string btnSettingsRedownloadFfmpeg = "(re)download ffmpeg"; + public const string btnSettingsRedownloadFfmpegHint = "Downloads the latest version of ffmpeg and extracts it to the path to ffmpeg if one is known; otherwise, the same directory as the program.\n\nIf the path to ffmpeg is not accessible or writeable by this program, the download will fail."; + public const string chkSettingsGeneralCheckForUpdatesOnLaunch = "Check for updates on launch"; public const string chkSettingsGeneralCheckForBetaUpdates = "Check for beta updates"; public const string chkSettingsGeneralDeleteUpdaterAfterUpdating = "Delete updater after updating"; @@ -980,14 +1017,19 @@ public static void LoadInternalEnglish() { GenericAdd = InternalEnglish.GenericAdd; GenericRemoveSelected = InternalEnglish.GenericRemoveSelected; GenericVerifyLinks = InternalEnglish.GenericVerifyLinks; + GenericDoNotReEncode = InternalEnglish.GenericDoNotReEncode; + GenericDoNotRemux = InternalEnglish.GenericDoNotRemux; + + frmGenericDownloadProgress = InternalEnglish.frmGenericDownloadProgress; // Dialogs dlgFirstTimeInitialMessage = InternalEnglish.dlgFirstTimeInitialMessage; dlgFirstTimeDownloadFolder = InternalEnglish.dlgFirstTimeDownloadFolder; + dlgFirstTimeDownloadYoutubeDl = InternalEnglish.dlgFirstTimeDownloadYoutubeDl; + dlgFirstTimeDownloadFfmpeg = InternalEnglish.dlgFirstTimeDownloadFfmpeg; dlgClipboardAutoDownloadNotice = InternalEnglish.dlgClipboardAutoDownloadNotice; dlgBatchDownloadClipboardScannerNotice = InternalEnglish.dlgBatchDownloadClipboardScannerNotice; - dlgRunningActions = InternalEnglish.dlgRunningActions; dlgFindDownloadFolder = InternalEnglish.dlgFindDownloadFolder; dlgMainArgsTxtDoesntExist = InternalEnglish.dlgMainArgsTxtDoesntExist; @@ -1081,8 +1123,8 @@ public static void LoadInternalEnglish() { lbExceptionDescription = InternalEnglish.lbExceptionDescription; rtbExceptionDetails = InternalEnglish.rtbExceptionDetails; btnExceptionGithub = InternalEnglish.btnExceptionGithub; - tpExceptionDetails = InternalEnglish.tpExceptionDetails; - tpExceptionExtraInfo = InternalEnglish.tpExceptionExtraInfo; + tabExceptionDetails = InternalEnglish.tabExceptionDetails; + tabExceptionExtraInfo = InternalEnglish.tabExceptionExtraInfo; // frmExtendedDownloader frmExtendedDownloaderRetrieving = InternalEnglish.frmExtendedDownloaderRetrieving; @@ -1092,8 +1134,14 @@ public static void LoadInternalEnglish() { lbExtendedDownloaderDownloadingThumbnail = InternalEnglish.lbExtendedDownloaderDownloadingThumbnail; lbExtendedDownloaderDownloadingThumbnailFailed = InternalEnglish.lbExtendedDownloaderDownloadingThumbnailFailed; btnExtendedDownloaderDownloadThumbnail = InternalEnglish.btnExtendedDownloaderDownloadThumbnail; - tpExtendedDownloaderFormatOptions = InternalEnglish.tpExtendedDownloaderFormatOptions; + tabExtendedDownloaderDescription = InternalEnglish.tabExtendedDownloaderDescription; + tabExtendedDownloaderVerbose = InternalEnglish.tabExtendedDownloaderVerbose; + tabExtendedDownloaderFormatOptions = InternalEnglish.tabExtendedDownloaderFormatOptions; chkExtendedDownloaderVideoSeparateAudio = InternalEnglish.chkExtendedDownloaderVideoSeparateAudio; + lbExtendedDownloaderNoVideoFormatsAvailable = InternalEnglish.lbExtendedDownloaderNoVideoFormatsAvailable; + lbExtendedDownloaderNoAudioFormatsAvailable = InternalEnglish.lbExtendedDownloaderNoAudioFormatsAvailable; + lbVideoRemux = InternalEnglish.lbVideoRemux; + txtExtendedDownloaderMediaTitle = InternalEnglish.txtExtendedDownloaderMediaTitle; // frmLanguage frmLanguage = InternalEnglish.frmLanguage; @@ -1176,7 +1224,6 @@ public static void LoadInternalEnglish() { // frmSettings frmSettings = InternalEnglish.frmSettings; - btnSettingsRedownloadYoutubeDl = InternalEnglish.btnSettingsRedownloadYoutubeDl; tabSettingsGeneral = InternalEnglish.tabSettingsGeneral; tabSettingsDownloads = InternalEnglish.tabSettingsDownloads; @@ -1184,6 +1231,9 @@ public static void LoadInternalEnglish() { tabSettingsExtensions = InternalEnglish.tabSettingsExtensions; tabSettingsErrors = InternalEnglish.tabSettingsErrors; + tabSettingsGeneralYoutubeDl = InternalEnglish.tabSettingsGeneralYoutubeDl; + tabSettingsGeneralFfmpeg = InternalEnglish.tabSettingsGeneralFfmpeg; + lbSettingsGeneralYoutubeDlPath = InternalEnglish.lbSettingsGeneralYoutubeDlPath; chkSettingsGeneralUseStaticYoutubeDl = InternalEnglish.chkSettingsGeneralUseStaticYoutubeDl; ofdTitleYoutubeDl = InternalEnglish.ofdTitleYoutubeDl; @@ -1192,6 +1242,10 @@ public static void LoadInternalEnglish() { chkSettingsGeneralUseStaticFFmpeg = InternalEnglish.chkSettingsGeneralUseStaticFFmpeg; ofdTitleFFmpeg = InternalEnglish.ofdTitleFFmpeg; ofdFilterFFmpeg = InternalEnglish.ofdFilterFFmpeg; + + btnSettingsRedownloadYoutubeDl = InternalEnglish.btnSettingsRedownloadYoutubeDl; + btnSettingsRedownloadFfmpeg = InternalEnglish.btnSettingsRedownloadFfmpeg; + chkSettingsGeneralCheckForUpdatesOnLaunch = InternalEnglish.chkSettingsGeneralCheckForUpdatesOnLaunch; chkSettingsGeneralCheckForBetaUpdates = InternalEnglish.chkSettingsGeneralCheckForBetaUpdates; chkSettingsGeneralDeleteUpdaterAfterUpdating = InternalEnglish.chkSettingsGeneralDeleteUpdaterAfterUpdating; @@ -1273,7 +1327,6 @@ public static void LoadInternalEnglish() { chkSettingsErrorsSuppressErrors = InternalEnglish.chkSettingsErrorsSuppressErrors; // frmSettings tipSettings - btnSettingsRedownloadYoutubeDlHint = InternalEnglish.btnSettingsRedownloadYoutubeDlHint; btnSettingsCancelHint = InternalEnglish.btnSettingsCancelHint; btnSettingsSaveHint = InternalEnglish.btnSettingsSaveHint; @@ -1285,6 +1338,10 @@ public static void LoadInternalEnglish() { chkSettingsGeneralUseStaticFFmpegHint = InternalEnglish.chkSettingsGeneralUseStaticFFmpegHint; txtSettingsGeneralFFmpegPathHint = InternalEnglish.txtSettingsGeneralFFmpegPathHint; btnSettingsGeneralBrowseFFmpegHint = InternalEnglish.btnSettingsGeneralBrowseFFmpegHint; + + btnSettingsRedownloadYoutubeDlHint = InternalEnglish.btnSettingsRedownloadYoutubeDlHint; + btnSettingsRedownloadFfmpegHint = InternalEnglish.btnSettingsRedownloadFfmpegHint; + chkSettingsGeneralCheckForUpdatesOnLaunchHint = InternalEnglish.chkSettingsGeneralCheckForUpdatesOnLaunchHint; chkSettingsGeneralCheckForBetaUpdatesHint = InternalEnglish.chkSettingsGeneralCheckForBetaUpdatesHint; chkSettingsGeneralDeleteUpdaterAfterUpdatingHint = InternalEnglish.chkSettingsGeneralDeleteUpdaterAfterUpdatingHint; @@ -1419,14 +1476,19 @@ public static void ResetControlNames() { GenericAdd = nameof(GenericAdd); GenericRemoveSelected = nameof(GenericRemoveSelected); GenericVerifyLinks = nameof(GenericVerifyLinks); + GenericDoNotReEncode = nameof(GenericDoNotReEncode); + GenericDoNotRemux = nameof(GenericDoNotRemux); + + frmGenericDownloadProgress = nameof(frmGenericDownloadProgress); // Dialogs dlgFirstTimeInitialMessage = nameof(dlgFirstTimeInitialMessage); dlgFirstTimeDownloadFolder = nameof(dlgFirstTimeDownloadFolder); + dlgFirstTimeDownloadYoutubeDl = nameof(dlgFirstTimeDownloadYoutubeDl); + dlgFirstTimeDownloadFfmpeg = nameof(dlgFirstTimeDownloadFfmpeg); dlgClipboardAutoDownloadNotice = nameof(dlgClipboardAutoDownloadNotice); dlgBatchDownloadClipboardScannerNotice = nameof(dlgBatchDownloadClipboardScannerNotice); - dlgRunningActions = nameof(dlgRunningActions); dlgFindDownloadFolder = nameof(dlgFindDownloadFolder); dlgMainArgsTxtDoesntExist = nameof(dlgMainArgsTxtDoesntExist); @@ -1518,8 +1580,8 @@ public static void ResetControlNames() { lbExceptionDescription = nameof(lbExceptionDescription); rtbExceptionDetails = nameof(rtbExceptionDetails); btnExceptionGithub = nameof(btnExceptionGithub); - tpExceptionDetails = nameof(tpExceptionDetails); - tpExceptionExtraInfo = nameof(tpExceptionExtraInfo); + tabExceptionDetails = nameof(tabExceptionDetails); + tabExceptionExtraInfo = nameof(tabExceptionExtraInfo); // frmExtendedDownloader frmExtendedDownloaderRetrieving = nameof(frmExtendedDownloaderRetrieving); @@ -1529,8 +1591,14 @@ public static void ResetControlNames() { lbExtendedDownloaderDownloadingThumbnail = nameof(lbExtendedDownloaderDownloadingThumbnail); lbExtendedDownloaderDownloadingThumbnailFailed = nameof(lbExtendedDownloaderDownloadingThumbnailFailed); btnExtendedDownloaderDownloadThumbnail = nameof(btnExtendedDownloaderDownloadThumbnail); - tpExtendedDownloaderFormatOptions = nameof(tpExtendedDownloaderFormatOptions); + tabExtendedDownloaderDescription = nameof(tabExtendedDownloaderDescription); + tabExtendedDownloaderVerbose = nameof(tabExtendedDownloaderVerbose); + tabExtendedDownloaderFormatOptions = nameof(tabExtendedDownloaderFormatOptions); chkExtendedDownloaderVideoSeparateAudio = nameof(chkExtendedDownloaderVideoSeparateAudio); + lbExtendedDownloaderNoVideoFormatsAvailable = nameof(lbExtendedDownloaderNoVideoFormatsAvailable); + lbExtendedDownloaderNoAudioFormatsAvailable = nameof(lbExtendedDownloaderNoAudioFormatsAvailable); + lbVideoRemux = nameof(lbVideoRemux); + txtExtendedDownloaderMediaTitle = nameof(txtExtendedDownloaderMediaTitle); // frmLanguage frmLanguage = nameof(frmLanguage); @@ -1613,7 +1681,6 @@ public static void ResetControlNames() { // frmSettings frmSettings = nameof(frmSettings); - btnSettingsRedownloadYoutubeDl = nameof(btnSettingsRedownloadYoutubeDl); tabSettingsGeneral = nameof(tabSettingsGeneral); tabSettingsDownloads = nameof(tabSettingsDownloads); @@ -1621,6 +1688,9 @@ public static void ResetControlNames() { tabSettingsExtensions = nameof(tabSettingsExtensions); tabSettingsErrors = nameof(tabSettingsErrors); + tabSettingsGeneralYoutubeDl = nameof(tabSettingsGeneralYoutubeDl); + tabSettingsGeneralFfmpeg = nameof(tabSettingsGeneralFfmpeg); + lbSettingsGeneralYoutubeDlPath = nameof(lbSettingsGeneralYoutubeDlPath); chkSettingsGeneralUseStaticYoutubeDl = nameof(chkSettingsGeneralUseStaticYoutubeDl); ofdTitleYoutubeDl = nameof(ofdTitleYoutubeDl); @@ -1629,6 +1699,10 @@ public static void ResetControlNames() { chkSettingsGeneralUseStaticFFmpeg = nameof(chkSettingsGeneralUseStaticFFmpeg); ofdTitleFFmpeg = nameof(ofdTitleFFmpeg); ofdFilterFFmpeg = nameof(ofdFilterFFmpeg); + + btnSettingsRedownloadYoutubeDl = nameof(btnSettingsRedownloadYoutubeDl); + btnSettingsRedownloadFfmpeg = nameof(btnSettingsRedownloadFfmpeg); + chkSettingsGeneralCheckForUpdatesOnLaunch = nameof(chkSettingsGeneralCheckForUpdatesOnLaunch); chkSettingsGeneralCheckForBetaUpdates = nameof(chkSettingsGeneralCheckForBetaUpdates); chkSettingsGeneralDeleteUpdaterAfterUpdating = nameof(chkSettingsGeneralDeleteUpdaterAfterUpdating); @@ -1710,7 +1784,6 @@ public static void ResetControlNames() { chkSettingsErrorsSuppressErrors = nameof(chkSettingsErrorsSuppressErrors); // frmSettings tipSettings - btnSettingsRedownloadYoutubeDlHint = nameof(btnSettingsRedownloadYoutubeDlHint); btnSettingsCancelHint = nameof(btnSettingsCancelHint); btnSettingsSaveHint = nameof(btnSettingsSaveHint); @@ -1722,6 +1795,10 @@ public static void ResetControlNames() { chkSettingsGeneralUseStaticFFmpegHint = nameof(chkSettingsGeneralUseStaticFFmpegHint); txtSettingsGeneralFFmpegPathHint = nameof(txtSettingsGeneralFFmpegPathHint); btnSettingsGeneralBrowseFFmpegHint = nameof(btnSettingsGeneralBrowseFFmpegHint); + + btnSettingsRedownloadYoutubeDlHint = nameof(btnSettingsRedownloadYoutubeDlHint); + btnSettingsRedownloadFfmpegHint = nameof(btnSettingsRedownloadFfmpegHint); + chkSettingsGeneralCheckForUpdatesOnLaunchHint = nameof(chkSettingsGeneralCheckForUpdatesOnLaunchHint); chkSettingsGeneralCheckForBetaUpdatesHint = nameof(chkSettingsGeneralCheckForBetaUpdatesHint); chkSettingsGeneralDeleteUpdaterAfterUpdatingHint = nameof(chkSettingsGeneralDeleteUpdaterAfterUpdatingHint); @@ -1920,6 +1997,16 @@ public static bool LoadLanguage(string LanguageFile = null) { case "genericverifylinks": GenericVerifyLinks = ReadValue; continue; + case "genericdonotreencode": + GenericDoNotReEncode = ReadValue; + continue; + case "genericdonotremux": + GenericDoNotRemux = ReadValue; + continue; + + case "frmgenericdownloadprogress": + frmGenericDownloadProgress = ReadValue; + continue; #endregion #region Dialogs @@ -1932,6 +2019,12 @@ public static bool LoadLanguage(string LanguageFile = null) { case "dlgfinddownloadfolder": dlgFindDownloadFolder = ReadValue; continue; + case "dlgfirsttimedownloadyoutubedl": + dlgFindDownloadFolder = ReadValue; + continue; + case "dlgfirsttimedownloadffmpeg": + dlgFindDownloadFolder = ReadValue; + continue; case "dlgclipboardautodownloadnotice": dlgClipboardAutoDownloadNotice = ReadValue; @@ -1939,9 +2032,6 @@ public static bool LoadLanguage(string LanguageFile = null) { case "dlgbatchdownloadclipboardscannernotice": dlgBatchDownloadClipboardScannerNotice = ReadValue; continue; - case "dlgrunningactions": - dlgRunningActions = ReadValue; - continue; case "dlgmainargstxtdoesntexist": dlgMainArgsTxtDoesntExist = ReadValue; @@ -2184,11 +2274,11 @@ public static bool LoadLanguage(string LanguageFile = null) { case "btnexceptiongithub": btnExceptionGithub = ReadValue; continue; - case "tpexceptiondetails": - tpExceptionDetails = ReadValue; + case "tabexceptiondetails": + tabExceptionDetails = ReadValue; continue; - case "tpexceptionextrainfo": - tpExceptionExtraInfo = ReadValue; + case "tabexceptionextrainfo": + tabExceptionExtraInfo = ReadValue; continue; #endregion @@ -2214,12 +2304,30 @@ public static bool LoadLanguage(string LanguageFile = null) { case "btnextendeddownloaderdownloadthumbnail": btnExtendedDownloaderDownloadThumbnail = ReadValue; continue; - case "tpextendeddownloaderformatoptions": - tpExtendedDownloaderFormatOptions = ReadValue; + case "tabextendeddownloaderformatoptions": + tabExtendedDownloaderFormatOptions = ReadValue; + continue; + case "tabextendeddownloaderdescription": + tabExtendedDownloaderDescription = ReadValue; + continue; + case "tabextendeddownloaderverbose": + tabExtendedDownloaderVerbose = ReadValue; continue; case "chkextendeddownloadervideoseparateaudio": chkExtendedDownloaderVideoSeparateAudio = ReadValue; continue; + case "lbextendeddownloadernovideoformatsavailable": + lbExtendedDownloaderNoVideoFormatsAvailable = ReadValue; + continue; + case "lbextendeddownloadernoaudioformatsavailable": + lbExtendedDownloaderNoAudioFormatsAvailable = ReadValue; + continue; + case "lbvideoremux": + lbVideoRemux = ReadValue; + continue; + case "txtextendeddownloadermediatitle": + txtExtendedDownloaderMediaTitle = ReadValue; + continue; #endregion #region frmLanguage @@ -2454,12 +2562,6 @@ public static bool LoadLanguage(string LanguageFile = null) { case "frmsettings": frmSettings = ReadValue; continue; - case "btnsettingsredownloadyoutubedl": - btnSettingsRedownloadYoutubeDl = ReadValue; - continue; - case "btnsettingsredownloadyoutubedlhint": - btnSettingsRedownloadYoutubeDlHint = ReadValue; - continue; case "btnsettingscancelhint": btnSettingsCancelHint = ReadValue; continue; @@ -2485,6 +2587,13 @@ public static bool LoadLanguage(string LanguageFile = null) { continue; //frmSettings / tcMain / tabGeneral + case "tabsettingsgeneralyoutubedl": + tabSettingsGeneralYoutubeDl = ReadValue; + continue; + case "tabsettingsgeneralffmpeg": + tabSettingsGeneralFfmpeg = ReadValue; + continue; + case "lbsettingsgeneralyoutubedlpath": lbSettingsGeneralYoutubeDlPath = ReadValue; continue; @@ -2509,6 +2618,21 @@ public static bool LoadLanguage(string LanguageFile = null) { case "ofdfilterffmpeg": ofdFilterFFmpeg = ReadValue; continue; + + + case "btnsettingsredownloadyoutubedl": + btnSettingsRedownloadYoutubeDl = ReadValue; + continue; + case "btnsettingsredownloadyoutubedlhint": + btnSettingsRedownloadYoutubeDlHint = ReadValue; + continue; + case "btnsettingsredownloadffmpeg": + btnSettingsRedownloadFfmpeg = ReadValue; + continue; + case "btnsettingsredownloadffmpeghint": + btnSettingsRedownloadFfmpegHint = ReadValue; + continue; + case "chksettingsgeneralcheckforupdatesonlaunch": chkSettingsGeneralCheckForUpdatesOnLaunch = ReadValue; continue; diff --git a/youtube-dl-gui/Classes/Verification.cs b/youtube-dl-gui/Classes/Verification.cs index ebc519bf..1a349e6c 100644 --- a/youtube-dl-gui/Classes/Verification.cs +++ b/youtube-dl-gui/Classes/Verification.cs @@ -4,7 +4,7 @@ using youtube_dl_gui.updater; internal static class Verification { - private static GitID YoutubeDlGitType = GitID.YoutubeDl; + private static GitID YoutubeDlGitType = GitID.YtDlp; public static string YoutubeDlPath { get; private set; } public static string FFmpegPath { get; private set; } @@ -22,9 +22,9 @@ public static void RefreshYoutubeDlLocation() { YoutubeDlGitType = (GitID)Config.Settings.Downloads.YtdlType; string TempPath; string YoutubeDlName = YoutubeDlGitType switch { + GitID.YoutubeDl => "youtube-dl.exe", GitID.YoutubeDlc => "youtube-dlc.exe", - GitID.YoutubeDlp => "yt-dlp.exe", - _ => "youtube-dl.exe", + _ => "yt-dlp.exe", }; if (Config.Settings.General.UseStaticYtdl && File.Exists(Config.Settings.General.ytdlPath)) { @@ -41,8 +41,8 @@ public static void RefreshYoutubeDlLocation() { if (YoutubeDlPath != null) { YoutubeDlVersion = GetProgramVersion(YoutubeDlPath); switch (YoutubeDlGitType) { - default: //ytdl/youtube-dl {YYYY.MM.DD} - break; + case GitID.YoutubeDl: { //ytdl/youtube-dl {YYYY.MM.DD} + } break; case GitID.YoutubeDlc: // blackjack###/youtube-dlc {YYYY.MM.DD | git.io/link} YoutubeDlVersion = YoutubeDlVersion[..YoutubeDlVersion.IndexOf(" | ")]; @@ -51,9 +51,9 @@ public static void RefreshYoutubeDlLocation() { //} break; - case GitID.YoutubeDlp: //yt-dlp/yt-dlp {YYYY.MM.DD on Python 3.8.10} + default: { // yt-dlp/yt-dlp {YYYY.MM.DD on Python 3.8.10} YoutubeDlVersion = YoutubeDlVersion[..YoutubeDlVersion.IndexOf(" on ")]; - break; + } break; } } } diff --git a/youtube-dl-gui/Config/Ini.cs b/youtube-dl-gui/Config/Ini.cs index a4219bc4..9fbfe807 100644 --- a/youtube-dl-gui/Config/Ini.cs +++ b/youtube-dl-gui/Config/Ini.cs @@ -5,15 +5,14 @@ internal static class Ini { public static string Path = Environment.CurrentDirectory + "\\settings.ini"; - public static string ExecutableName = "youtube-dl-gui"; private static string Read(string Key, string Section = null) { var Value = new StringBuilder(65535); - NativeMethods.GetPrivateProfileString(Section ?? ExecutableName, Key, "", Value, 65535, Path); + NativeMethods.GetPrivateProfileString(Section ?? Language.ApplicationName, Key, "", Value, 65535, Path); return Value.ToString(); } private static void WriteString(string Key, string Value, string Section = null) { - NativeMethods.WritePrivateProfileString(Section ?? ExecutableName, Key, Value, Path); + NativeMethods.WritePrivateProfileString(Section ?? Language.ApplicationName, Key, Value, Path); } public static string ReadString(string Key, string Section = null) { @@ -66,13 +65,13 @@ public static void Write(string Key, Size Value, string Section = null) { } public static void DeleteKey(string Key, string Section = null) { - Write(Key, null, Section ?? ExecutableName); + Write(Key, null, Section ?? Language.ApplicationName); } public static void DeleteSection(string Section = null) { - Write(null, null, Section ?? ExecutableName); + Write(null, null, Section ?? Language.ApplicationName); } public static bool KeyExists(string Key, string Section = null) { - return ReadString(Key, Section ?? ExecutableName).Length > 0; + return ReadString(Key, Section ?? Language.ApplicationName).Length > 0; } } \ No newline at end of file diff --git a/youtube-dl-gui/Controls/MessageHandler.cs b/youtube-dl-gui/Controls/MessageHandler.cs index bdfc74ca..09587798 100644 --- a/youtube-dl-gui/Controls/MessageHandler.cs +++ b/youtube-dl-gui/Controls/MessageHandler.cs @@ -13,7 +13,7 @@ protected override void WndProc(ref Message m) { UpdaterData Data = new() { FileName = AppDomain.CurrentDomain.FriendlyName, NewVersion = updater.UpdateChecker.LastChecked.Version.ToString(), - RepoName = "youtube-dl-gui", + RepoName = Language.ApplicationName, UpdateHash = updater.UpdateChecker.LastChecked.ExecutableHash }; CopyDataStruct DataStruct = new(); diff --git a/youtube-dl-gui/Forms/frmAbout.cs b/youtube-dl-gui/Forms/frmAbout.cs index ba85db61..e490b6b7 100644 --- a/youtube-dl-gui/Forms/frmAbout.cs +++ b/youtube-dl-gui/Forms/frmAbout.cs @@ -36,7 +36,7 @@ private void llbCheckForUpdates_LinkClicked(object sender, LinkLabelLinkClickedE Program.CurrentVersion.IsBeta ? string.Format(Language.dlgUpdateNoBetaUpdateAvailable, Program.CurrentVersion, updater.UpdateChecker.LastChecked.Version) : string.Format(Language.dlgUpdateNoUpdateAvailable, Program.CurrentVersion, updater.UpdateChecker.LastChecked.Version), - "youtube-dl-gui", + Language.ApplicationName, MessageBoxButtons.OK); }); } diff --git a/youtube-dl-gui/Forms/frmArchiveDownloader.cs b/youtube-dl-gui/Forms/frmArchiveDownloader.cs index b5be34ce..49d9ff9c 100644 --- a/youtube-dl-gui/Forms/frmArchiveDownloader.cs +++ b/youtube-dl-gui/Forms/frmArchiveDownloader.cs @@ -84,7 +84,7 @@ private void Download(bool Extended) { } if (Extended) { - frmExtendedDownload ExtendedForm = new($"ytarchive:{URL}"); + frmExtendedDownload ExtendedForm = new($"ytarchive:{URL}", true); ExtendedForm.Show(); } else { diff --git a/youtube-dl-gui/Forms/frmBatchDownloader.cs b/youtube-dl-gui/Forms/frmBatchDownloader.cs index e1e9e2dd..3ac7ab37 100644 --- a/youtube-dl-gui/Forms/frmBatchDownloader.cs +++ b/youtube-dl-gui/Forms/frmBatchDownloader.cs @@ -500,7 +500,7 @@ private void mBatchDownloadImportLinksFromClipboard_Click(object sender, EventAr private void chkBatchDownloadClipboardScanner_CheckedChanged(object sender, EventArgs e) { if (chkBatchDownloadClipboardScanner.Checked) { if (!Config.Settings.Batch.ClipboardScannerNoticeViewed) { - if (MessageBox.Show(Language.dlgBatchDownloadClipboardScannerNotice, "yotube-dl-gui", MessageBoxButtons.OKCancel) == DialogResult.Cancel) { + if (MessageBox.Show(Language.dlgBatchDownloadClipboardScannerNotice, Language.ApplicationName, MessageBoxButtons.OKCancel) == DialogResult.Cancel) { chkBatchDownloadClipboardScanner.Checked = false; return; } diff --git a/youtube-dl-gui/Forms/frmDownloadLanguage.cs b/youtube-dl-gui/Forms/frmDownloadLanguage.cs index 398d862c..fb965152 100644 --- a/youtube-dl-gui/Forms/frmDownloadLanguage.cs +++ b/youtube-dl-gui/Forms/frmDownloadLanguage.cs @@ -63,7 +63,7 @@ private void DownloadSelectedLanguageFile() { // The SHA on github doesn't match what I can calculate here. //if (Program.CalculateSha1Hash(Environment.CurrentDirectory + "\\lang\\" + EnumeratedLanguages[listView1.SelectedIndices[0]].Name).ToLower() != EnumeratedLanguages[listView1.SelectedIndices[0]].Sha.ToLower()) { - //MessageBox.Show(Language.dlgLanguageHashNoMatch, "youtube-dl-gui", MessageBoxButtons.OK, MessageBoxIcon.Warning); + //MessageBox.Show(Language.dlgLanguageHashNoMatch, Language.ApplicationName, MessageBoxButtons.OK, MessageBoxIcon.Warning); //} } catch (System.Net.WebException wex) { diff --git a/youtube-dl-gui/Forms/frmExtendedDownload.Designer.cs b/youtube-dl-gui/Forms/frmExtendedDownload.Designer.cs index 7df7c0f0..d49f974b 100644 --- a/youtube-dl-gui/Forms/frmExtendedDownload.Designer.cs +++ b/youtube-dl-gui/Forms/frmExtendedDownload.Designer.cs @@ -13,7 +13,7 @@ protected override void Dispose(bool disposing) { private void InitializeComponent() { this.pbThumbnail = new System.Windows.Forms.PictureBox(); - this.txtMediaTitle = new System.Windows.Forms.TextBox(); + this.txtExtendedDownloaderMediaTitle = new System.Windows.Forms.TextBox(); this.lbExtendedDownloaderUploader = new System.Windows.Forms.Label(); this.txtUploader = new System.Windows.Forms.TextBox(); this.lbExtendedDownloaderDownloadingThumbnail = new System.Windows.Forms.Label(); @@ -22,9 +22,10 @@ private void InitializeComponent() { this.txtViews = new System.Windows.Forms.TextBox(); this.lbExtendedDownloaderViews = new System.Windows.Forms.Label(); this.tcVideoData = new System.Windows.Forms.TabControl(); - this.tpFormats = new System.Windows.Forms.TabPage(); + this.tabExtendedDownloaderFormats = new System.Windows.Forms.TabPage(); this.tcFormats = new System.Windows.Forms.TabControl(); this.tabVideoFormats = new System.Windows.Forms.TabPage(); + this.lbExtendedDownloaderNoVideoFormatsAvailable = new System.Windows.Forms.Label(); this.lvVideoFormats = new System.Windows.Forms.ListView(); this.chVideoQuality = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); this.chVideoFPS = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); @@ -35,6 +36,7 @@ private void InitializeComponent() { this.chVideoCodec = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); this.chVideoFormatId = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); this.tabAudioFormats = new System.Windows.Forms.TabPage(); + this.lbExtendedDownloaderNoAudioFormatsAvailable = new System.Windows.Forms.Label(); this.lvAudioFormats = new System.Windows.Forms.ListView(); this.chAudioBitrate = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); this.chAudioContainer = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); @@ -44,7 +46,7 @@ private void InitializeComponent() { this.chAudioFormatId = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); this.tabCustom = new System.Windows.Forms.TabPage(); this.txtCustomArguments = new System.Windows.Forms.TextBox(); - this.tpFormatOptions = new System.Windows.Forms.TabPage(); + this.tabFormatOptions = new System.Windows.Forms.TabPage(); this.chkVideoSeparateAudio = new System.Windows.Forms.CheckBox(); this.cbVbrQualities = new System.Windows.Forms.ComboBox(); this.chkAudioVBR = new System.Windows.Forms.CheckBox(); @@ -55,12 +57,10 @@ private void InitializeComponent() { this.lbVideoEncoder = new System.Windows.Forms.Label(); this.cbAudioEncoders = new System.Windows.Forms.ComboBox(); this.cbVideoEncoders = new System.Windows.Forms.ComboBox(); - this.tpDescription = new System.Windows.Forms.TabPage(); - this.rtbMediaDescription = new murrty.controls.ExtendedRichTextBox(); - this.tpVerbose = new System.Windows.Forms.TabPage(); + this.tabExtendedDownloaderDescription = new System.Windows.Forms.TabPage(); + this.tabExtendedDownloaderVerbose = new System.Windows.Forms.TabPage(); this.txtGeneratedArguments = new System.Windows.Forms.TextBox(); - this.rtbVerbose = new murrty.controls.ExtendedRichTextBox(); - this.tpDebug = new System.Windows.Forms.TabPage(); + this.tabDebug = new System.Windows.Forms.TabPage(); this.btnKill = new System.Windows.Forms.Button(); this.chkPbTaskbar = new System.Windows.Forms.CheckBox(); this.btnPbRemove = new System.Windows.Forms.Button(); @@ -72,20 +72,24 @@ private void InitializeComponent() { this.btnDownloadAbortClose = new System.Windows.Forms.Button(); this.btnDownloadWithAuthentication = new System.Windows.Forms.Button(); this.chkDownloaderCloseAfterDownload = new System.Windows.Forms.CheckBox(); - this.pbStatus = new murrty.controls.ExtendedProgressBar(); this.txtLink = new System.Windows.Forms.TextBox(); this.lbExtendedDownloaderLink = new System.Windows.Forms.Label(); + this.lbVideoRemux = new System.Windows.Forms.Label(); + this.cbVideoRemux = new System.Windows.Forms.ComboBox(); + this.pbStatus = new murrty.controls.ExtendedProgressBar(); + this.rtbMediaDescription = new murrty.controls.ExtendedRichTextBox(); + this.rtbVerbose = new murrty.controls.ExtendedRichTextBox(); ((System.ComponentModel.ISupportInitialize)(this.pbThumbnail)).BeginInit(); this.tcVideoData.SuspendLayout(); - this.tpFormats.SuspendLayout(); + this.tabExtendedDownloaderFormats.SuspendLayout(); this.tcFormats.SuspendLayout(); this.tabVideoFormats.SuspendLayout(); this.tabAudioFormats.SuspendLayout(); this.tabCustom.SuspendLayout(); - this.tpFormatOptions.SuspendLayout(); - this.tpDescription.SuspendLayout(); - this.tpVerbose.SuspendLayout(); - this.tpDebug.SuspendLayout(); + this.tabFormatOptions.SuspendLayout(); + this.tabExtendedDownloaderDescription.SuspendLayout(); + this.tabExtendedDownloaderVerbose.SuspendLayout(); + this.tabDebug.SuspendLayout(); this.SuspendLayout(); // // pbThumbnail @@ -98,17 +102,18 @@ private void InitializeComponent() { this.pbThumbnail.TabIndex = 0; this.pbThumbnail.TabStop = false; // - // txtMediaTitle + // txtExtendedDownloaderMediaTitle // - this.txtMediaTitle.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + this.txtExtendedDownloaderMediaTitle.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.txtMediaTitle.BorderStyle = System.Windows.Forms.BorderStyle.None; - this.txtMediaTitle.Font = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txtMediaTitle.Location = new System.Drawing.Point(12, 196); - this.txtMediaTitle.Name = "txtMediaTitle"; - this.txtMediaTitle.ReadOnly = true; - this.txtMediaTitle.Size = new System.Drawing.Size(450, 22); - this.txtMediaTitle.TabIndex = 6; + this.txtExtendedDownloaderMediaTitle.BorderStyle = System.Windows.Forms.BorderStyle.None; + this.txtExtendedDownloaderMediaTitle.Font = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtExtendedDownloaderMediaTitle.Location = new System.Drawing.Point(12, 196); + this.txtExtendedDownloaderMediaTitle.Name = "txtExtendedDownloaderMediaTitle"; + this.txtExtendedDownloaderMediaTitle.ReadOnly = true; + this.txtExtendedDownloaderMediaTitle.Size = new System.Drawing.Size(450, 22); + this.txtExtendedDownloaderMediaTitle.TabIndex = 6; + this.txtExtendedDownloaderMediaTitle.Text = "txtExtendedDownloaderMediaTitle"; // // lbExtendedDownloaderUploader // @@ -116,9 +121,9 @@ private void InitializeComponent() { this.lbExtendedDownloaderUploader.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.lbExtendedDownloaderUploader.Location = new System.Drawing.Point(333, 107); this.lbExtendedDownloaderUploader.Name = "lbExtendedDownloaderUploader"; - this.lbExtendedDownloaderUploader.Size = new System.Drawing.Size(51, 13); + this.lbExtendedDownloaderUploader.Size = new System.Drawing.Size(160, 13); this.lbExtendedDownloaderUploader.TabIndex = 10; - this.lbExtendedDownloaderUploader.Text = "Uploader"; + this.lbExtendedDownloaderUploader.Text = "lbExtendedDownloaderUploader"; // // txtUploader // @@ -139,9 +144,9 @@ private void InitializeComponent() { this.lbExtendedDownloaderDownloadingThumbnail.Font = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.lbExtendedDownloaderDownloadingThumbnail.Location = new System.Drawing.Point(20, 20); this.lbExtendedDownloaderDownloadingThumbnail.Name = "lbExtendedDownloaderDownloadingThumbnail"; - this.lbExtendedDownloaderDownloadingThumbnail.Size = new System.Drawing.Size(155, 17); + this.lbExtendedDownloaderDownloadingThumbnail.Size = new System.Drawing.Size(281, 17); this.lbExtendedDownloaderDownloadingThumbnail.TabIndex = 12; - this.lbExtendedDownloaderDownloadingThumbnail.Text = "Downloading thumbnail..."; + this.lbExtendedDownloaderDownloadingThumbnail.Text = "lbExtendedDownloaderDownloadingThumbnail"; this.lbExtendedDownloaderDownloadingThumbnail.Visible = false; // // btnExtendedDownloaderDownloadThumbnail @@ -151,7 +156,7 @@ private void InitializeComponent() { this.btnExtendedDownloaderDownloadThumbnail.Name = "btnExtendedDownloaderDownloadThumbnail"; this.btnExtendedDownloaderDownloadThumbnail.Size = new System.Drawing.Size(122, 23); this.btnExtendedDownloaderDownloadThumbnail.TabIndex = 13; - this.btnExtendedDownloaderDownloadThumbnail.Text = "Get thumbnail"; + this.btnExtendedDownloaderDownloadThumbnail.Text = "btnExtendedDownloaderDownloadThumbnail"; this.btnExtendedDownloaderDownloadThumbnail.UseVisualStyleBackColor = false; this.btnExtendedDownloaderDownloadThumbnail.Visible = false; this.btnExtendedDownloaderDownloadThumbnail.Click += new System.EventHandler(this.btnDownloadThumbnail_Click); @@ -186,42 +191,42 @@ private void InitializeComponent() { this.lbExtendedDownloaderViews.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.lbExtendedDownloaderViews.Location = new System.Drawing.Point(333, 156); this.lbExtendedDownloaderViews.Name = "lbExtendedDownloaderViews"; - this.lbExtendedDownloaderViews.Size = new System.Drawing.Size(34, 13); + this.lbExtendedDownloaderViews.Size = new System.Drawing.Size(143, 13); this.lbExtendedDownloaderViews.TabIndex = 15; - this.lbExtendedDownloaderViews.Text = "Views"; + this.lbExtendedDownloaderViews.Text = "lbExtendedDownloaderViews"; // // tcVideoData // this.tcVideoData.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.tcVideoData.Controls.Add(this.tpFormats); - this.tcVideoData.Controls.Add(this.tpDescription); - this.tcVideoData.Controls.Add(this.tpVerbose); - this.tcVideoData.Controls.Add(this.tpDebug); + this.tcVideoData.Controls.Add(this.tabExtendedDownloaderFormats); + this.tcVideoData.Controls.Add(this.tabExtendedDownloaderDescription); + this.tcVideoData.Controls.Add(this.tabExtendedDownloaderVerbose); + this.tcVideoData.Controls.Add(this.tabDebug); this.tcVideoData.Location = new System.Drawing.Point(12, 253); this.tcVideoData.Name = "tcVideoData"; this.tcVideoData.SelectedIndex = 0; this.tcVideoData.Size = new System.Drawing.Size(450, 201); this.tcVideoData.TabIndex = 17; // - // tpFormats + // tabExtendedDownloaderFormats // - this.tpFormats.Controls.Add(this.tcFormats); - this.tpFormats.Location = new System.Drawing.Point(4, 22); - this.tpFormats.Name = "tpFormats"; - this.tpFormats.Padding = new System.Windows.Forms.Padding(3); - this.tpFormats.Size = new System.Drawing.Size(442, 175); - this.tpFormats.TabIndex = 0; - this.tpFormats.Text = "Format"; - this.tpFormats.UseVisualStyleBackColor = true; + this.tabExtendedDownloaderFormats.Controls.Add(this.tcFormats); + this.tabExtendedDownloaderFormats.Location = new System.Drawing.Point(4, 22); + this.tabExtendedDownloaderFormats.Name = "tabExtendedDownloaderFormats"; + this.tabExtendedDownloaderFormats.Padding = new System.Windows.Forms.Padding(3); + this.tabExtendedDownloaderFormats.Size = new System.Drawing.Size(442, 175); + this.tabExtendedDownloaderFormats.TabIndex = 0; + this.tabExtendedDownloaderFormats.Text = "tabExtendedDownloaderFormats"; + this.tabExtendedDownloaderFormats.UseVisualStyleBackColor = true; // // tcFormats // this.tcFormats.Controls.Add(this.tabVideoFormats); this.tcFormats.Controls.Add(this.tabAudioFormats); this.tcFormats.Controls.Add(this.tabCustom); - this.tcFormats.Controls.Add(this.tpFormatOptions); + this.tcFormats.Controls.Add(this.tabFormatOptions); this.tcFormats.Dock = System.Windows.Forms.DockStyle.Fill; this.tcFormats.Location = new System.Drawing.Point(3, 3); this.tcFormats.Name = "tcFormats"; @@ -231,15 +236,26 @@ private void InitializeComponent() { // // tabVideoFormats // + this.tabVideoFormats.Controls.Add(this.lbExtendedDownloaderNoVideoFormatsAvailable); this.tabVideoFormats.Controls.Add(this.lvVideoFormats); this.tabVideoFormats.Location = new System.Drawing.Point(4, 22); this.tabVideoFormats.Name = "tabVideoFormats"; this.tabVideoFormats.Padding = new System.Windows.Forms.Padding(3); this.tabVideoFormats.Size = new System.Drawing.Size(428, 143); this.tabVideoFormats.TabIndex = 0; - this.tabVideoFormats.Text = "GenericVideo"; + this.tabVideoFormats.Text = "tabVideoFormats"; this.tabVideoFormats.UseVisualStyleBackColor = true; // + // lbExtendedDownloaderNoVideoFormatsAvailable + // + this.lbExtendedDownloaderNoVideoFormatsAvailable.AutoSize = true; + this.lbExtendedDownloaderNoVideoFormatsAvailable.Location = new System.Drawing.Point(11, 35); + this.lbExtendedDownloaderNoVideoFormatsAvailable.Name = "lbExtendedDownloaderNoVideoFormatsAvailable"; + this.lbExtendedDownloaderNoVideoFormatsAvailable.Size = new System.Drawing.Size(261, 13); + this.lbExtendedDownloaderNoVideoFormatsAvailable.TabIndex = 14; + this.lbExtendedDownloaderNoVideoFormatsAvailable.Text = "lbExtendedDownloaderNoVideoFormatsAvailable"; + this.lbExtendedDownloaderNoVideoFormatsAvailable.Visible = false; + // // lvVideoFormats // this.lvVideoFormats.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { @@ -252,6 +268,7 @@ private void InitializeComponent() { this.chVideoCodec, this.chVideoFormatId}); this.lvVideoFormats.Dock = System.Windows.Forms.DockStyle.Fill; + this.lvVideoFormats.Enabled = false; this.lvVideoFormats.FullRowSelect = true; this.lvVideoFormats.HideSelection = false; this.lvVideoFormats.Location = new System.Drawing.Point(3, 3); @@ -303,15 +320,26 @@ private void InitializeComponent() { // // tabAudioFormats // + this.tabAudioFormats.Controls.Add(this.lbExtendedDownloaderNoAudioFormatsAvailable); this.tabAudioFormats.Controls.Add(this.lvAudioFormats); this.tabAudioFormats.Location = new System.Drawing.Point(4, 22); this.tabAudioFormats.Name = "tabAudioFormats"; this.tabAudioFormats.Padding = new System.Windows.Forms.Padding(3); this.tabAudioFormats.Size = new System.Drawing.Size(428, 143); this.tabAudioFormats.TabIndex = 1; - this.tabAudioFormats.Text = "GenericAudio"; + this.tabAudioFormats.Text = "tabAudioFormats"; this.tabAudioFormats.UseVisualStyleBackColor = true; // + // lbExtendedDownloaderNoAudioFormatsAvailable + // + this.lbExtendedDownloaderNoAudioFormatsAvailable.AutoSize = true; + this.lbExtendedDownloaderNoAudioFormatsAvailable.Location = new System.Drawing.Point(11, 35); + this.lbExtendedDownloaderNoAudioFormatsAvailable.Name = "lbExtendedDownloaderNoAudioFormatsAvailable"; + this.lbExtendedDownloaderNoAudioFormatsAvailable.Size = new System.Drawing.Size(262, 13); + this.lbExtendedDownloaderNoAudioFormatsAvailable.TabIndex = 15; + this.lbExtendedDownloaderNoAudioFormatsAvailable.Text = "lbExtendedDownloaderNoAudioFormatsAvailable"; + this.lbExtendedDownloaderNoAudioFormatsAvailable.Visible = false; + // // lvAudioFormats // this.lvAudioFormats.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { @@ -322,6 +350,7 @@ private void InitializeComponent() { this.chAudioCodec, this.chAudioFormatId}); this.lvAudioFormats.Dock = System.Windows.Forms.DockStyle.Fill; + this.lvAudioFormats.Enabled = false; this.lvAudioFormats.FullRowSelect = true; this.lvAudioFormats.HideSelection = false; this.lvAudioFormats.Location = new System.Drawing.Point(3, 3); @@ -370,7 +399,7 @@ private void InitializeComponent() { this.tabCustom.Padding = new System.Windows.Forms.Padding(3); this.tabCustom.Size = new System.Drawing.Size(428, 143); this.tabCustom.TabIndex = 3; - this.tabCustom.Text = "GenericCustom"; + this.tabCustom.Text = "tabCustom"; this.tabCustom.UseVisualStyleBackColor = true; // // txtCustomArguments @@ -384,30 +413,33 @@ private void InitializeComponent() { this.txtCustomArguments.Size = new System.Drawing.Size(422, 137); this.txtCustomArguments.TabIndex = 15; // - // tpFormatOptions - // - this.tpFormatOptions.Controls.Add(this.chkVideoSeparateAudio); - this.tpFormatOptions.Controls.Add(this.cbVbrQualities); - this.tpFormatOptions.Controls.Add(this.chkAudioVBR); - this.tpFormatOptions.Controls.Add(this.chkVideoDownloadAudio); - this.tpFormatOptions.Controls.Add(this.lbSchema); - this.tpFormatOptions.Controls.Add(this.cbSchema); - this.tpFormatOptions.Controls.Add(this.lbAudioEncoder); - this.tpFormatOptions.Controls.Add(this.lbVideoEncoder); - this.tpFormatOptions.Controls.Add(this.cbAudioEncoders); - this.tpFormatOptions.Controls.Add(this.cbVideoEncoders); - this.tpFormatOptions.Location = new System.Drawing.Point(4, 22); - this.tpFormatOptions.Name = "tpFormatOptions"; - this.tpFormatOptions.Padding = new System.Windows.Forms.Padding(3); - this.tpFormatOptions.Size = new System.Drawing.Size(428, 143); - this.tpFormatOptions.TabIndex = 2; - this.tpFormatOptions.Text = "tpFormatOptions"; - this.tpFormatOptions.UseVisualStyleBackColor = true; + // tabFormatOptions + // + this.tabFormatOptions.Controls.Add(this.lbVideoRemux); + this.tabFormatOptions.Controls.Add(this.cbVideoRemux); + this.tabFormatOptions.Controls.Add(this.chkVideoSeparateAudio); + this.tabFormatOptions.Controls.Add(this.cbVbrQualities); + this.tabFormatOptions.Controls.Add(this.chkAudioVBR); + this.tabFormatOptions.Controls.Add(this.chkVideoDownloadAudio); + this.tabFormatOptions.Controls.Add(this.lbSchema); + this.tabFormatOptions.Controls.Add(this.cbSchema); + this.tabFormatOptions.Controls.Add(this.lbAudioEncoder); + this.tabFormatOptions.Controls.Add(this.lbVideoEncoder); + this.tabFormatOptions.Controls.Add(this.cbAudioEncoders); + this.tabFormatOptions.Controls.Add(this.cbVideoEncoders); + this.tabFormatOptions.Location = new System.Drawing.Point(4, 22); + this.tabFormatOptions.Name = "tabFormatOptions"; + this.tabFormatOptions.Padding = new System.Windows.Forms.Padding(3); + this.tabFormatOptions.Size = new System.Drawing.Size(428, 143); + this.tabFormatOptions.TabIndex = 2; + this.tabFormatOptions.Text = "tabFormatOptions"; + this.tabFormatOptions.UseVisualStyleBackColor = true; // // chkVideoSeparateAudio // this.chkVideoSeparateAudio.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.chkVideoSeparateAudio.AutoSize = true; + this.chkVideoSeparateAudio.Enabled = false; this.chkVideoSeparateAudio.Location = new System.Drawing.Point(6, 120); this.chkVideoSeparateAudio.Name = "chkVideoSeparateAudio"; this.chkVideoSeparateAudio.Size = new System.Drawing.Size(149, 17); @@ -421,7 +453,7 @@ private void InitializeComponent() { this.cbVbrQualities.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.cbVbrQualities.Enabled = false; this.cbVbrQualities.FormattingEnabled = true; - this.cbVbrQualities.Location = new System.Drawing.Point(348, 62); + this.cbVbrQualities.Location = new System.Drawing.Point(57, 72); this.cbVbrQualities.Name = "cbVbrQualities"; this.cbVbrQualities.Size = new System.Drawing.Size(74, 21); this.cbVbrQualities.TabIndex = 27; @@ -430,7 +462,8 @@ private void InitializeComponent() { // this.chkAudioVBR.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.chkAudioVBR.AutoSize = true; - this.chkAudioVBR.Location = new System.Drawing.Point(297, 64); + this.chkAudioVBR.Enabled = false; + this.chkAudioVBR.Location = new System.Drawing.Point(6, 74); this.chkAudioVBR.Name = "chkAudioVBR"; this.chkAudioVBR.Size = new System.Drawing.Size(45, 17); this.chkAudioVBR.TabIndex = 26; @@ -444,6 +477,7 @@ private void InitializeComponent() { this.chkVideoDownloadAudio.AutoSize = true; this.chkVideoDownloadAudio.Checked = true; this.chkVideoDownloadAudio.CheckState = System.Windows.Forms.CheckState.Checked; + this.chkVideoDownloadAudio.Enabled = false; this.chkVideoDownloadAudio.Location = new System.Drawing.Point(6, 97); this.chkVideoDownloadAudio.Name = "chkVideoDownloadAudio"; this.chkVideoDownloadAudio.Size = new System.Drawing.Size(158, 17); @@ -455,7 +489,7 @@ private void InitializeComponent() { // lbSchema // this.lbSchema.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.lbSchema.Location = new System.Drawing.Point(140, 37); + this.lbSchema.Location = new System.Drawing.Point(140, 8); this.lbSchema.Name = "lbSchema"; this.lbSchema.Size = new System.Drawing.Size(113, 15); this.lbSchema.TabIndex = 25; @@ -465,8 +499,9 @@ private void InitializeComponent() { // cbSchema // this.cbSchema.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.cbSchema.Enabled = false; this.cbSchema.FormattingEnabled = true; - this.cbSchema.Location = new System.Drawing.Point(255, 35); + this.cbSchema.Location = new System.Drawing.Point(255, 6); this.cbSchema.Name = "cbSchema"; this.cbSchema.Size = new System.Drawing.Size(167, 21); this.cbSchema.TabIndex = 24; @@ -475,9 +510,9 @@ private void InitializeComponent() { // lbAudioEncoder // this.lbAudioEncoder.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.lbAudioEncoder.Location = new System.Drawing.Point(236, 116); + this.lbAudioEncoder.Location = new System.Drawing.Point(180, 116); this.lbAudioEncoder.Name = "lbAudioEncoder"; - this.lbAudioEncoder.Size = new System.Drawing.Size(61, 21); + this.lbAudioEncoder.Size = new System.Drawing.Size(109, 21); this.lbAudioEncoder.TabIndex = 20; this.lbAudioEncoder.Text = "lbAudioEncoder"; this.lbAudioEncoder.TextAlign = System.Drawing.ContentAlignment.MiddleRight; @@ -485,9 +520,9 @@ private void InitializeComponent() { // lbVideoEncoder // this.lbVideoEncoder.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.lbVideoEncoder.Location = new System.Drawing.Point(236, 89); + this.lbVideoEncoder.Location = new System.Drawing.Point(180, 89); this.lbVideoEncoder.Name = "lbVideoEncoder"; - this.lbVideoEncoder.Size = new System.Drawing.Size(61, 21); + this.lbVideoEncoder.Size = new System.Drawing.Size(109, 21); this.lbVideoEncoder.TabIndex = 19; this.lbVideoEncoder.Text = "lbVideoEncoder"; this.lbVideoEncoder.TextAlign = System.Drawing.ContentAlignment.MiddleRight; @@ -496,58 +531,46 @@ private void InitializeComponent() { // this.cbAudioEncoders.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.cbAudioEncoders.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.cbAudioEncoders.Enabled = false; this.cbAudioEncoders.FormattingEnabled = true; - this.cbAudioEncoders.Items.AddRange(new object[] { - "(do not re-encode)"}); - this.cbAudioEncoders.Location = new System.Drawing.Point(303, 116); + this.cbAudioEncoders.Location = new System.Drawing.Point(295, 116); this.cbAudioEncoders.Name = "cbAudioEncoders"; - this.cbAudioEncoders.Size = new System.Drawing.Size(119, 21); + this.cbAudioEncoders.Size = new System.Drawing.Size(127, 21); this.cbAudioEncoders.TabIndex = 18; // // cbVideoEncoders // this.cbVideoEncoders.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.cbVideoEncoders.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.cbVideoEncoders.Enabled = false; this.cbVideoEncoders.FormattingEnabled = true; - this.cbVideoEncoders.Items.AddRange(new object[] { - "(do not re-encode)"}); - this.cbVideoEncoders.Location = new System.Drawing.Point(303, 89); + this.cbVideoEncoders.Location = new System.Drawing.Point(295, 89); this.cbVideoEncoders.Name = "cbVideoEncoders"; - this.cbVideoEncoders.Size = new System.Drawing.Size(119, 21); + this.cbVideoEncoders.Size = new System.Drawing.Size(127, 21); this.cbVideoEncoders.TabIndex = 16; // - // tpDescription - // - this.tpDescription.Controls.Add(this.rtbMediaDescription); - this.tpDescription.Location = new System.Drawing.Point(4, 22); - this.tpDescription.Name = "tpDescription"; - this.tpDescription.Padding = new System.Windows.Forms.Padding(3); - this.tpDescription.Size = new System.Drawing.Size(442, 175); - this.tpDescription.TabIndex = 1; - this.tpDescription.Text = "Description"; - this.tpDescription.UseVisualStyleBackColor = true; - // - // rtbMediaDescription - // - this.rtbMediaDescription.Dock = System.Windows.Forms.DockStyle.Fill; - this.rtbMediaDescription.Location = new System.Drawing.Point(3, 3); - this.rtbMediaDescription.Name = "rtbMediaDescription"; - this.rtbMediaDescription.ReadOnly = true; - this.rtbMediaDescription.Size = new System.Drawing.Size(436, 169); - this.rtbMediaDescription.TabIndex = 2; - this.rtbMediaDescription.Text = ""; - // - // tpVerbose - // - this.tpVerbose.Controls.Add(this.txtGeneratedArguments); - this.tpVerbose.Controls.Add(this.rtbVerbose); - this.tpVerbose.Location = new System.Drawing.Point(4, 22); - this.tpVerbose.Name = "tpVerbose"; - this.tpVerbose.Padding = new System.Windows.Forms.Padding(3); - this.tpVerbose.Size = new System.Drawing.Size(442, 175); - this.tpVerbose.TabIndex = 3; - this.tpVerbose.Text = "Verbose"; - this.tpVerbose.UseVisualStyleBackColor = true; + // tabExtendedDownloaderDescription + // + this.tabExtendedDownloaderDescription.Controls.Add(this.rtbMediaDescription); + this.tabExtendedDownloaderDescription.Location = new System.Drawing.Point(4, 22); + this.tabExtendedDownloaderDescription.Name = "tabExtendedDownloaderDescription"; + this.tabExtendedDownloaderDescription.Padding = new System.Windows.Forms.Padding(3); + this.tabExtendedDownloaderDescription.Size = new System.Drawing.Size(442, 175); + this.tabExtendedDownloaderDescription.TabIndex = 1; + this.tabExtendedDownloaderDescription.Text = "tabExtendedDownloaderDescription"; + this.tabExtendedDownloaderDescription.UseVisualStyleBackColor = true; + // + // tabExtendedDownloaderVerbose + // + this.tabExtendedDownloaderVerbose.Controls.Add(this.txtGeneratedArguments); + this.tabExtendedDownloaderVerbose.Controls.Add(this.rtbVerbose); + this.tabExtendedDownloaderVerbose.Location = new System.Drawing.Point(4, 22); + this.tabExtendedDownloaderVerbose.Name = "tabExtendedDownloaderVerbose"; + this.tabExtendedDownloaderVerbose.Padding = new System.Windows.Forms.Padding(3); + this.tabExtendedDownloaderVerbose.Size = new System.Drawing.Size(442, 175); + this.tabExtendedDownloaderVerbose.TabIndex = 3; + this.tabExtendedDownloaderVerbose.Text = "tabExtendedDownloaderVerbose"; + this.tabExtendedDownloaderVerbose.UseVisualStyleBackColor = true; // // txtGeneratedArguments // @@ -559,32 +582,20 @@ private void InitializeComponent() { this.txtGeneratedArguments.Size = new System.Drawing.Size(430, 22); this.txtGeneratedArguments.TabIndex = 1; // - // rtbVerbose - // - this.rtbVerbose.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.rtbVerbose.Location = new System.Drawing.Point(3, 3); - this.rtbVerbose.Name = "rtbVerbose"; - this.rtbVerbose.ReadOnly = true; - this.rtbVerbose.Size = new System.Drawing.Size(436, 140); - this.rtbVerbose.TabIndex = 0; - this.rtbVerbose.Text = ""; - // - // tpDebug - // - this.tpDebug.Controls.Add(this.btnKill); - this.tpDebug.Controls.Add(this.chkPbTaskbar); - this.tpDebug.Controls.Add(this.btnPbRemove); - this.tpDebug.Controls.Add(this.btnPbAdd); - this.tpDebug.Controls.Add(this.btnCreateArgs); - this.tpDebug.Location = new System.Drawing.Point(4, 22); - this.tpDebug.Name = "tpDebug"; - this.tpDebug.Padding = new System.Windows.Forms.Padding(3); - this.tpDebug.Size = new System.Drawing.Size(442, 175); - this.tpDebug.TabIndex = 2; - this.tpDebug.Text = "Debug"; - this.tpDebug.UseVisualStyleBackColor = true; + // tabDebug + // + this.tabDebug.Controls.Add(this.btnKill); + this.tabDebug.Controls.Add(this.chkPbTaskbar); + this.tabDebug.Controls.Add(this.btnPbRemove); + this.tabDebug.Controls.Add(this.btnPbAdd); + this.tabDebug.Controls.Add(this.btnCreateArgs); + this.tabDebug.Location = new System.Drawing.Point(4, 22); + this.tabDebug.Name = "tabDebug"; + this.tabDebug.Padding = new System.Windows.Forms.Padding(3); + this.tabDebug.Size = new System.Drawing.Size(442, 175); + this.tabDebug.TabIndex = 2; + this.tabDebug.Text = "Debug"; + this.tabDebug.UseVisualStyleBackColor = true; // // btnKill // @@ -643,12 +654,11 @@ private void InitializeComponent() { // rbVideo // this.rbVideo.Appearance = System.Windows.Forms.Appearance.Button; - this.rbVideo.Checked = true; + this.rbVideo.Enabled = false; this.rbVideo.Location = new System.Drawing.Point(12, 224); this.rbVideo.Name = "rbVideo"; this.rbVideo.Size = new System.Drawing.Size(120, 23); this.rbVideo.TabIndex = 10; - this.rbVideo.TabStop = true; this.rbVideo.Text = "rbVideo"; this.rbVideo.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; this.rbVideo.UseVisualStyleBackColor = true; @@ -658,11 +668,11 @@ private void InitializeComponent() { // this.rbAudio.Anchor = System.Windows.Forms.AnchorStyles.Top; this.rbAudio.Appearance = System.Windows.Forms.Appearance.Button; + this.rbAudio.Enabled = false; this.rbAudio.Location = new System.Drawing.Point(177, 224); this.rbAudio.Name = "rbAudio"; this.rbAudio.Size = new System.Drawing.Size(120, 23); this.rbAudio.TabIndex = 11; - this.rbAudio.TabStop = true; this.rbAudio.Text = "rbAudio"; this.rbAudio.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; this.rbAudio.UseVisualStyleBackColor = true; @@ -672,11 +682,11 @@ private void InitializeComponent() { // this.rbCustom.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.rbCustom.Appearance = System.Windows.Forms.Appearance.Button; + this.rbCustom.Enabled = false; this.rbCustom.Location = new System.Drawing.Point(342, 224); this.rbCustom.Name = "rbCustom"; this.rbCustom.Size = new System.Drawing.Size(120, 23); this.rbCustom.TabIndex = 12; - this.rbCustom.TabStop = true; this.rbCustom.Text = "rbCustom"; this.rbCustom.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; this.rbCustom.UseVisualStyleBackColor = true; @@ -716,19 +726,6 @@ private void InitializeComponent() { this.chkDownloaderCloseAfterDownload.Text = "chkDownloaderCloseAfterDownload"; this.chkDownloaderCloseAfterDownload.UseVisualStyleBackColor = true; // - // pbStatus - // - this.pbStatus.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.pbStatus.ContainerParent = this; - this.pbStatus.FastValueUpdate = true; - this.pbStatus.Location = new System.Drawing.Point(12, 461); - this.pbStatus.Name = "pbStatus"; - this.pbStatus.ShowText = true; - this.pbStatus.Size = new System.Drawing.Size(193, 21); - this.pbStatus.TabIndex = 20; - this.pbStatus.Text = ". . ."; - // // txtLink // this.txtLink.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) @@ -747,9 +744,65 @@ private void InitializeComponent() { this.lbExtendedDownloaderLink.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.lbExtendedDownloaderLink.Location = new System.Drawing.Point(333, 58); this.lbExtendedDownloaderLink.Name = "lbExtendedDownloaderLink"; - this.lbExtendedDownloaderLink.Size = new System.Drawing.Size(26, 13); + this.lbExtendedDownloaderLink.Size = new System.Drawing.Size(135, 13); this.lbExtendedDownloaderLink.TabIndex = 22; - this.lbExtendedDownloaderLink.Text = "Link"; + this.lbExtendedDownloaderLink.Text = "lbExtendedDownloaderLink"; + // + // lbVideoRemux + // + this.lbVideoRemux.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.lbVideoRemux.Location = new System.Drawing.Point(180, 62); + this.lbVideoRemux.Name = "lbVideoRemux"; + this.lbVideoRemux.Size = new System.Drawing.Size(109, 21); + this.lbVideoRemux.TabIndex = 31; + this.lbVideoRemux.Text = "lbVideoRemux"; + this.lbVideoRemux.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // cbVideoRemux + // + this.cbVideoRemux.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.cbVideoRemux.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.cbVideoRemux.Enabled = false; + this.cbVideoRemux.FormattingEnabled = true; + this.cbVideoRemux.Location = new System.Drawing.Point(295, 62); + this.cbVideoRemux.Name = "cbVideoRemux"; + this.cbVideoRemux.Size = new System.Drawing.Size(127, 21); + this.cbVideoRemux.TabIndex = 29; + // + // pbStatus + // + this.pbStatus.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.pbStatus.ContainerParent = this; + this.pbStatus.FastValueUpdate = true; + this.pbStatus.Location = new System.Drawing.Point(12, 461); + this.pbStatus.Name = "pbStatus"; + this.pbStatus.ShowText = true; + this.pbStatus.Size = new System.Drawing.Size(193, 21); + this.pbStatus.TabIndex = 20; + this.pbStatus.Text = ". . ."; + // + // rtbMediaDescription + // + this.rtbMediaDescription.Dock = System.Windows.Forms.DockStyle.Fill; + this.rtbMediaDescription.Location = new System.Drawing.Point(3, 3); + this.rtbMediaDescription.Name = "rtbMediaDescription"; + this.rtbMediaDescription.ReadOnly = true; + this.rtbMediaDescription.Size = new System.Drawing.Size(436, 169); + this.rtbMediaDescription.TabIndex = 2; + this.rtbMediaDescription.Text = ""; + // + // rtbVerbose + // + this.rtbVerbose.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.rtbVerbose.Location = new System.Drawing.Point(3, 3); + this.rtbVerbose.Name = "rtbVerbose"; + this.rtbVerbose.ReadOnly = true; + this.rtbVerbose.Size = new System.Drawing.Size(436, 140); + this.rtbVerbose.TabIndex = 0; + this.rtbVerbose.Text = ""; // // frmExtendedDownload // @@ -773,7 +826,7 @@ private void InitializeComponent() { this.Controls.Add(this.btnExtendedDownloaderDownloadThumbnail); this.Controls.Add(this.lbExtendedDownloaderDownloadingThumbnail); this.Controls.Add(this.lbExtendedDownloaderUploader); - this.Controls.Add(this.txtMediaTitle); + this.Controls.Add(this.txtExtendedDownloaderMediaTitle); this.Controls.Add(this.pbThumbnail); this.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.Icon = global::youtube_dl_gui.Properties.Resources.ProgramIcon; @@ -784,19 +837,21 @@ private void InitializeComponent() { this.Text = "frmExtendedDownload"; ((System.ComponentModel.ISupportInitialize)(this.pbThumbnail)).EndInit(); this.tcVideoData.ResumeLayout(false); - this.tpFormats.ResumeLayout(false); + this.tabExtendedDownloaderFormats.ResumeLayout(false); this.tcFormats.ResumeLayout(false); this.tabVideoFormats.ResumeLayout(false); + this.tabVideoFormats.PerformLayout(); this.tabAudioFormats.ResumeLayout(false); + this.tabAudioFormats.PerformLayout(); this.tabCustom.ResumeLayout(false); this.tabCustom.PerformLayout(); - this.tpFormatOptions.ResumeLayout(false); - this.tpFormatOptions.PerformLayout(); - this.tpDescription.ResumeLayout(false); - this.tpVerbose.ResumeLayout(false); - this.tpVerbose.PerformLayout(); - this.tpDebug.ResumeLayout(false); - this.tpDebug.PerformLayout(); + this.tabFormatOptions.ResumeLayout(false); + this.tabFormatOptions.PerformLayout(); + this.tabExtendedDownloaderDescription.ResumeLayout(false); + this.tabExtendedDownloaderVerbose.ResumeLayout(false); + this.tabExtendedDownloaderVerbose.PerformLayout(); + this.tabDebug.ResumeLayout(false); + this.tabDebug.PerformLayout(); this.ResumeLayout(false); this.PerformLayout(); @@ -806,7 +861,7 @@ private void InitializeComponent() { private System.Windows.Forms.PictureBox pbThumbnail; private murrty.controls.ExtendedRichTextBox rtbMediaDescription; - private System.Windows.Forms.TextBox txtMediaTitle; + private System.Windows.Forms.TextBox txtExtendedDownloaderMediaTitle; private System.Windows.Forms.Label lbExtendedDownloaderUploader; private System.Windows.Forms.TextBox txtUploader; private System.Windows.Forms.Label lbExtendedDownloaderDownloadingThumbnail; @@ -815,7 +870,7 @@ private void InitializeComponent() { private System.Windows.Forms.TextBox txtViews; private System.Windows.Forms.Label lbExtendedDownloaderViews; private System.Windows.Forms.TabControl tcVideoData; - private System.Windows.Forms.TabPage tpFormats; + private System.Windows.Forms.TabPage tabExtendedDownloaderFormats; private System.Windows.Forms.ListView lvVideoFormats; private System.Windows.Forms.ColumnHeader chVideoDimension; private System.Windows.Forms.ColumnHeader chVideoBitrate; @@ -826,14 +881,14 @@ private void InitializeComponent() { private System.Windows.Forms.RadioButton rbCustom; private System.Windows.Forms.RadioButton rbAudio; private System.Windows.Forms.RadioButton rbVideo; - private System.Windows.Forms.TabPage tpDescription; + private System.Windows.Forms.TabPage tabExtendedDownloaderDescription; private System.Windows.Forms.ListView lvAudioFormats; private System.Windows.Forms.ColumnHeader chAudioBitrate; private System.Windows.Forms.ColumnHeader chAudioSampleRate; private System.Windows.Forms.ColumnHeader chAudioContainer; private System.Windows.Forms.ColumnHeader chAudioCodec; private System.Windows.Forms.TextBox txtCustomArguments; - private System.Windows.Forms.TabPage tpDebug; + private System.Windows.Forms.TabPage tabDebug; private System.Windows.Forms.Button btnCreateArgs; private System.Windows.Forms.ColumnHeader chVideoFileSize; private System.Windows.Forms.ColumnHeader chAudioSize; @@ -843,7 +898,7 @@ private void InitializeComponent() { private System.Windows.Forms.TabControl tcFormats; private System.Windows.Forms.TabPage tabVideoFormats; private System.Windows.Forms.TabPage tabAudioFormats; - private System.Windows.Forms.TabPage tpFormatOptions; + private System.Windows.Forms.TabPage tabFormatOptions; private System.Windows.Forms.Label lbAudioEncoder; private System.Windows.Forms.Label lbVideoEncoder; private System.Windows.Forms.Button btnDownloadAbortClose; @@ -852,7 +907,7 @@ private void InitializeComponent() { private System.Windows.Forms.CheckBox chkPbTaskbar; private System.Windows.Forms.Button btnPbRemove; private System.Windows.Forms.Button btnPbAdd; - private System.Windows.Forms.TabPage tpVerbose; + private System.Windows.Forms.TabPage tabExtendedDownloaderVerbose; private murrty.controls.ExtendedRichTextBox rtbVerbose; private System.Windows.Forms.Button btnKill; private System.Windows.Forms.TextBox txtGeneratedArguments; @@ -867,5 +922,9 @@ private void InitializeComponent() { private System.Windows.Forms.ColumnHeader chAudioFormatId; private System.Windows.Forms.TextBox txtLink; private System.Windows.Forms.Label lbExtendedDownloaderLink; + private System.Windows.Forms.Label lbExtendedDownloaderNoVideoFormatsAvailable; + private System.Windows.Forms.Label lbExtendedDownloaderNoAudioFormatsAvailable; + private System.Windows.Forms.Label lbVideoRemux; + private System.Windows.Forms.ComboBox cbVideoRemux; } } \ No newline at end of file diff --git a/youtube-dl-gui/Forms/frmExtendedDownload.cs b/youtube-dl-gui/Forms/frmExtendedDownload.cs index d5087171..a6b5f9c1 100644 --- a/youtube-dl-gui/Forms/frmExtendedDownload.cs +++ b/youtube-dl-gui/Forms/frmExtendedDownload.cs @@ -8,7 +8,6 @@ namespace youtube_dl_gui { public partial class frmExtendedDownload : Form { // Download specific times: yt-dlp -i --download-sections "*00:00:00-00:00:10" - // Download from archive: yt-dlp ytarchive: (needs filtering) private DownloaderData Information; private DownloaderData.Format VideoFormat; @@ -21,18 +20,18 @@ public partial class frmExtendedDownload : Form { private string URL { get; } - private readonly Thread InformationThread; + private Thread InformationThread; private Thread ThumbnailThread; private Thread DownloadThread; - public frmExtendedDownload(string URL) { + public frmExtendedDownload(string URL, bool Archived) { InitializeComponent(); LoadLanguage(); this.URL = URL; - txtLink.Text = URL; + txtLink.Text = Archived ? URL.Split(':')[1] : URL; if (!Program.DebugMode) { - tcVideoData.TabPages.Remove(tpDebug); + tcVideoData.TabPages.Remove(tabDebug); } lvVideoFormats.SelectedIndexChanged += (s, e) => { @@ -51,22 +50,26 @@ public frmExtendedDownload(string URL) { if (LastSelectedAudioFormat is not null) { LastSelectedAudioFormat.ImageIndex = LastSelectedAudioFormat.Index == 0 ? 0 : -1; } - lvAudioFormats.SelectedItems[0].ImageIndex = 1; LastSelectedAudioFormat = lvAudioFormats.SelectedItems[0]; - AudioFormat = LastSelectedVideoFormat.Tag as DownloaderData.Format; + AudioFormat = LastSelectedAudioFormat.Tag as DownloaderData.Format; } }; + cbVideoRemux.Items.AddRange( + new[] { "avi", "flv", "mkv", "mov", "mp4", "webm" }); + cbVideoRemux.SelectedIndex = 0; cbVideoEncoders.Items.AddRange( - new[] { "avi", "flv", "mkv", "mp4", "ogg", "webm" }); + new[] { "avi", "flv", "mkv", "mov", "mp4", "webm" }); cbVideoEncoders.SelectedIndex = 0; cbAudioEncoders.Items.AddRange( - new[] { "aac", "flac", "mp3", "m4v", "opus", "vorbis", "wav" }); + new[] { "aac", "aiff", "alac", "flac", "mp3", "m4a", "ogg", "opus", "vorbis", "wav" }); cbAudioEncoders.SelectedIndex = 0; cbVbrQualities.Items.AddRange(Formats.VbrQualities); + cbVbrQualities.SelectedIndex = 0; + cbSchema.Text = Config.Settings.Downloads.fileNameSchema; if (!string.IsNullOrEmpty(Config.Settings.Saved.FileNameSchemaHistory)) { cbSchema.Items.AddRange(Config.Settings.Saved.FileNameSchemaHistory.Split('|')); @@ -74,20 +77,91 @@ public frmExtendedDownload(string URL) { lvVideoFormats.SmallImageList = Program.ExtendedDownloaderSelectedImages; lvAudioFormats.SmallImageList = Program.ExtendedDownloaderSelectedImages; - rbVideo.Checked = true; + this.Load += (s, e) => { + if (Config.ValidPoint(Config.Settings.Saved.ExtendedDownloaderLocation)) { + this.StartPosition = FormStartPosition.Manual; + this.Location = Config.Settings.Saved.ExtendedDownloaderLocation; + } + if (Config.ValidSize(Config.Settings.Saved.ExtendedDownloaderSize)) { + this.Size = Config.Settings.Saved.ExtendedDownloaderSize; + } + }; + this.Shown += (s, e) => { + DownloadInfo(); + lbExtendedDownloaderUploader.Focus(); + }; + this.FormClosing += (s, e) => { + switch (Status) { + case DownloadStatus.Downloading: { + Status = DownloadStatus.Aborted; + e.Cancel = true; + } break; + default: { + if (InformationThread is not null && InformationThread.IsAlive) { + InformationThread.Abort(); + } + if (ThumbnailThread is not null && ThumbnailThread.IsAlive) { + ThumbnailThread.Abort(); + } + Config.Settings.Saved.ExtendedDownloaderLocation = this.Location; + Config.Settings.Saved.ExtendedDownloaderSize = this.Size; + Config.Settings.Saved.Save(); + this.Dispose(); + } break; + } + }; + } + + private void LoadLanguage() { + this.Text = Language.frmExtendedDownloaderRetrieving.Format(Language.ApplicationName); + lbExtendedDownloaderLink.Text = Language.lbExtendedDownloaderLink; + lbExtendedDownloaderUploader.Text = Language.lbExtendedDownloaderUploader; + lbExtendedDownloaderViews.Text = Language.lbExtendedDownloaderViews; + btnExtendedDownloaderDownloadThumbnail.Text = Language.btnExtendedDownloaderDownloadThumbnail; + rbVideo.Text = Language.GenericVideo; + rbAudio.Text = Language.GenericAudio; + rbCustom.Text = Language.GenericCustom; + chkVideoDownloadAudio.Text = Language.GenericSound; + tabExtendedDownloaderFormats.Text = Language.lbFormat; + tabExtendedDownloaderDescription.Text = Language.tabExtendedDownloaderDescription; + tabExtendedDownloaderVerbose.Text = Language.tabExtendedDownloaderVerbose; + tabVideoFormats.Text = Language.GenericVideo; + lbExtendedDownloaderNoVideoFormatsAvailable.Text = Language.lbExtendedDownloaderNoVideoFormatsAvailable; + tabAudioFormats.Text = Language.GenericAudio; + lbExtendedDownloaderNoAudioFormatsAvailable.Text = Language.lbExtendedDownloaderNoAudioFormatsAvailable; + tabCustom.Text = Language.GenericCustom; + tabFormatOptions.Text = Language.tabExtendedDownloaderFormatOptions; + lbVideoEncoder.Text = Language.GenericVideo; + lbAudioEncoder.Text = Language.GenericAudio; + btnDownloadAbortClose.Text = Language.sbDownload; + btnDownloadWithAuthentication.Text = Language.mDownloadWithAuthentication; + lbSchema.Text = Language.lbSettingsDownloadsFileNameSchema; + chkVideoSeparateAudio.Text = Language.chkExtendedDownloaderVideoSeparateAudio; + chkDownloaderCloseAfterDownload.Text = Language.chkDownloaderCloseAfterDownload; + lbVideoRemux.Text = Language.lbVideoRemux; + txtExtendedDownloaderMediaTitle.Text = Language.txtExtendedDownloaderMediaTitle; + cbVideoRemux.Items.Add(Language.GenericDoNotRemux); + cbVideoEncoders.Items.Add(Language.GenericDoNotReEncode); + cbAudioEncoders.Items.Add(Language.GenericDoNotReEncode); + } + private void DownloadInfo() { InformationThread = new(() => { string Retrieved = null; try { + if (URL.IsNullEmptyWhitespace()) { + throw new DownloadException(URL, "The media you are trying to access was not entered in correctly."); + } Information = DownloaderData.GenerateData(URL, out Retrieved); if (Information is null || Information.AvailableFormats.Length == 0) - throw new NullReferenceException("The video data is null, it may not be available for download."); + throw new DownloadException(URL, "The media you are trying to access may not be accessible at this time, or it may have been removed."); DownloaderData.Format Format; for (int i = Information.AvailableFormats.Length; i > 0; i--) { Format = Information.AvailableFormats[i - 1]; - if (Format.VideoWidth > 0 && Format.VideoHeight > 0 && Format.ValidVideoFormat) { + // Some formats don't report width or height, so if either of them are greater than 0 then it's defined as a video. + if (Format.VideoWidth > 0 || Format.VideoHeight > 0 && Format.ValidVideoFormat) { string LegibleQualityName = Format.QualityName.IsNotNullEmptyWhitespace() ? Format.QualityName : "?"; string Dimensions = $"{Format.VideoWidth}x{Format.VideoHeight}"; string Bitrate = Format.VideoBitrate is not null && Format.VideoBitrate > 0 ? $"{Format.VideoBitrate}Kbps" : "?"; @@ -115,7 +189,7 @@ public frmExtendedDownload(string URL) { lvVideoFormats.Invoke(() => lvVideoFormats.Items.Add(NewFormat)); } - else if (Format.AudioCodec.IsNotNullEmptyWhitespace() && Format.AudioCodec != "none") { + else if ((Format.AudioCodec.IsNotNullEmptyWhitespace() && Format.AudioCodec != "none") || Format.VideoCodec == "none") { string Codec = Format.AudioCodec ?? "Unknown"; string Container = Format.Extension ?? "Unknown"; string SampleRate = $"{(Format.AudioSampleRate is not null && Format.AudioSampleRate > 0 ? $"{Format.AudioSampleRate}" : "?")}Hz"; @@ -123,7 +197,7 @@ public frmExtendedDownload(string URL) { string FileSize = Format.FileSize is not null ? ((long)Format.FileSize).SizeToString() : Format.ApproximateFileSize is not null ? ((long)Format.ApproximateFileSize).SizeToString() : "?B"; - + ListViewItem NewFormat = new(Bitrate); NewFormat.SubItems.Add(Container); NewFormat.SubItems.Add(FileSize); @@ -143,7 +217,7 @@ public frmExtendedDownload(string URL) { this.Invoke(() => { this.Text = $"{Information.Title} - {Language.ApplicationName}"; - txtMediaTitle.Text = Information.Title; + txtExtendedDownloaderMediaTitle.Text = Information.Title; rtbMediaDescription.Text = Information.Description; txtUploader.Text = Information.Uploader; txtViews.Text = $"{(Information.Views is not null ? Information.Views.Value.ToString("#,000") : "Unknown")}"; @@ -164,12 +238,44 @@ public frmExtendedDownload(string URL) { btnDownloadAbortClose.Enabled = true; btnDownloadWithAuthentication.Enabled = true; + rbCustom.Enabled = true; + cbSchema.Enabled = true; - if (lvVideoFormats.Items.Count > 0) + if (lvVideoFormats.Items.Count > 0) { + rbVideo.Enabled = true; lvVideoFormats.Items[0].Selected = true; + } + else { + rbVideo.Enabled = false; + lbExtendedDownloaderNoVideoFormatsAvailable.Visible = true; + } - if (lvAudioFormats.Items.Count > 0) + if (lvAudioFormats.Items.Count > 0) { + rbAudio.Enabled = true; lvAudioFormats.Items[0].Selected = true; + } + else { + rbAudio.Enabled = false; + lbExtendedDownloaderNoAudioFormatsAvailable.Visible = true; + } + + if (rbVideo.Enabled) { + rbVideo.Checked = true; + } + else if (rbAudio.Enabled) { + rbAudio.Checked = true; + tcFormats.SelectedTab = tabAudioFormats; + } + else { + rbCustom.Checked = true; + tcFormats.SelectedTab = tabCustom; + } + + //chkVideoDownloadAudio.Enabled = chkVideoSeparateAudio.Enabled = + // rbVideo.Checked && lvAudioFormats.Items.Count > 0 && LastSelectedAudioFormat is not null; + + //chkAudioVBR.Enabled = cbVbrQualities.Enabled = cbAudioEncoders.Enabled = + // lvAudioFormats.Items.Count > 0 && LastSelectedAudioFormat is not null; }); } catch (ThreadAbortException) { } @@ -181,65 +287,7 @@ public frmExtendedDownload(string URL) { IsBackground = true, Priority = ThreadPriority.BelowNormal }; - - this.Load += (s, e) => { - if (Config.ValidPoint(Config.Settings.Saved.ExtendedDownloaderLocation)) { - this.StartPosition = FormStartPosition.Manual; - this.Location = Config.Settings.Saved.ExtendedDownloaderLocation; - } - if (Config.ValidSize(Config.Settings.Saved.ExtendedDownloaderSize)) { - this.Size = Config.Settings.Saved.ExtendedDownloaderSize; - } - }; - this.Shown += (s, e) => { - InformationThread.Start(); - lbExtendedDownloaderUploader.Focus(); - }; - this.FormClosing += (s, e) => { - switch (Status) { - case DownloadStatus.Downloading: { - Status = DownloadStatus.Aborted; - e.Cancel = true; - } break; - - default: { - if (InformationThread is not null && InformationThread.IsAlive) { - InformationThread.Abort(); - } - if (ThumbnailThread is not null && ThumbnailThread.IsAlive) { - ThumbnailThread.Abort(); - } - Config.Settings.Saved.ExtendedDownloaderLocation = this.Location; - Config.Settings.Saved.ExtendedDownloaderSize = this.Size; - Config.Settings.Saved.Save(); - this.Dispose(); - } break; - } - }; - } - - private void LoadLanguage() { - this.Text = Language.frmExtendedDownloaderRetrieving.Format(Language.ApplicationName); - lbExtendedDownloaderLink.Text = Language.lbExtendedDownloaderLink; - lbExtendedDownloaderUploader.Text = Language.lbExtendedDownloaderUploader; - lbExtendedDownloaderViews.Text = Language.lbExtendedDownloaderViews; - btnExtendedDownloaderDownloadThumbnail.Text = Language.btnExtendedDownloaderDownloadThumbnail; - rbVideo.Text = Language.GenericVideo; - rbAudio.Text = Language.GenericAudio; - rbCustom.Text = Language.GenericCustom; - chkVideoDownloadAudio.Text = Language.GenericSound; - tabVideoFormats.Text = Language.GenericVideo; - tabAudioFormats.Text = Language.GenericAudio; - tabCustom.Text = Language.GenericCustom; - tpFormats.Text = Language.lbFormat; - lbVideoEncoder.Text = Language.GenericVideo; - lbAudioEncoder.Text = Language.GenericAudio; - btnDownloadAbortClose.Text = Language.sbDownload; - btnDownloadWithAuthentication.Text = Language.mDownloadWithAuthentication; - tpFormatOptions.Text = Language.tpExtendedDownloaderFormatOptions; - lbSchema.Text = Language.lbSettingsDownloadsFileNameSchema; - chkVideoSeparateAudio.Text = Language.chkExtendedDownloaderVideoSeparateAudio; - chkDownloaderCloseAfterDownload.Text = Language.chkDownloaderCloseAfterDownload; + InformationThread.Start(); } private void DownloadThumbnail() { if (ThumbnailThread is null || !ThumbnailThread.IsAlive) { @@ -325,7 +373,10 @@ public string GenerateArguments(bool Authentication = false) { ArgumentBuffer.Append("/best"); } - if (cbVideoEncoders.SelectedIndex > 0) { + if (cbVideoRemux.SelectedIndex > 0) { + ArgumentBuffer.Append($" --remux-video {cbVideoRemux.GetItemText(cbVideoRemux.SelectedItem)}"); + } + else if (cbVideoEncoders.SelectedIndex > 0) { ArgumentBuffer.Append($" --recode-video {cbVideoEncoders.GetItemText(cbVideoEncoders.SelectedItem)}"); } } @@ -334,7 +385,7 @@ public string GenerateArguments(bool Authentication = false) { ArgumentBuffer.Append($" -f {AudioFormat.Identifier}/best"); if (cbAudioEncoders.SelectedIndex > 0) { - ArgumentBuffer.Append($" --audio-format {cbAudioEncoders.GetItemText(cbAudioEncoders.SelectedItem)}"); + ArgumentBuffer.Append($" -x --audio-format {cbAudioEncoders.GetItemText(cbAudioEncoders.SelectedItem)}"); } } else { @@ -488,12 +539,22 @@ public void BeginDownload(bool Auth) { } break; default: { + Msg = e.Data.ToLower(); + if (Msg.StartsWith("[merger]")) { + pbStatus.Invoke(() => { + pbStatus.Style = ProgressBarStyle.Marquee; + pbStatus.Value = pbStatus.Maximum; + pbStatus.Text = "Merging formats..."; + }); + } + else if (Msg.StartsWith("[videoconvertor]")) { // Converter? + pbStatus.Invoke(() => { + pbStatus.Style = ProgressBarStyle.Marquee; + pbStatus.Value = pbStatus.Maximum; + pbStatus.Text = "Converting video..."; + }); + } Msg = null; - /* - [youtube] TXRiWW7pb5E: Downloading webpage - [youtube] TXRiWW7pb5E: Downloading android player API JSON - [info] TXRiWW7pb5E: Downloading 1 format(s): 303+251 - */ rtbVerbose.Invoke(() => rtbVerbose.AppendText(e.Data + "\n")); } break; } @@ -556,10 +617,11 @@ public void BeginDownload(bool Auth) { Status = DownloadProcess.ExitCode == 0 ? DownloadStatus.Finished : DownloadStatus.YtdlError; this.Invoke(() => { - if (chkDownloaderCloseAfterDownload.Checked) { + if (chkDownloaderCloseAfterDownload.Checked && Status == DownloadStatus.Finished) { this.Dispose(); } else { + pbStatus.Style = ProgressBarStyle.Continuous; pbStatus.ShowInTaskbar = false; btnDownloadAbortClose.Enabled = true; btnDownloadWithAuthentication.Enabled = true; @@ -568,12 +630,14 @@ public void BeginDownload(bool Auth) { pbStatus.Text = "Aborted"; pbStatus.Value = pbStatus.Minimum; btnDownloadAbortClose.Text = Language.GenericRetry; + System.Media.SystemSounds.Exclamation.Play(); } break; case DownloadStatus.Finished: { pbStatus.Text = "Completed"; pbStatus.Value = pbStatus.Maximum; btnDownloadAbortClose.Text = Language.sbDownload; + System.Media.SystemSounds.Asterisk.Play(); } break; case DownloadStatus.AbortForClose: { } break; @@ -582,7 +646,8 @@ public void BeginDownload(bool Auth) { pbStatus.Text = "Downlod error"; pbStatus.Value = pbStatus.Minimum; btnDownloadAbortClose.Text = Language.GenericRetry; - tcVideoData.SelectedTab = tpVerbose; + tcVideoData.SelectedTab = tabExtendedDownloaderVerbose; + System.Media.SystemSounds.Hand.Play(); } break; } } @@ -599,40 +664,101 @@ public void BeginDownload(bool Auth) { } } + private void chkAudioVBR_CheckedChanged(object sender, EventArgs e) { + cbVbrQualities.Enabled = + chkAudioVBR.Checked && (rbAudio.Checked || (rbVideo.Checked && chkVideoDownloadAudio.Checked)); + } + private void chkVideoDownloadAudio_CheckedChanged(object sender, EventArgs e) { + chkAudioVBR.Enabled = cbAudioEncoders.Enabled = lvAudioFormats.Enabled = chkVideoSeparateAudio.Enabled = + chkVideoDownloadAudio.Checked; + + cbVbrQualities.Enabled = chkVideoDownloadAudio.Checked && chkAudioVBR.Checked; + + if (LastSelectedAudioFormat is not null) { + if (chkVideoDownloadAudio.Checked) { + if (LastSelectedAudioFormat.Index != 0) { + lvAudioFormats.Items[0].ImageIndex = 0; + } + LastSelectedAudioFormat.ImageIndex = 1; + } + else { + if (LastSelectedAudioFormat.Index != 0) { + lvAudioFormats.Items[0].ImageIndex = 2; + } + LastSelectedAudioFormat.ImageIndex = 3; + } + } + } private void btnDownloadThumbnail_Click(object sender, EventArgs e) { DownloadThumbnail(); lbExtendedDownloaderUploader.Focus(); } + private void btnDownloadWithAuthentication_Click(object sender, EventArgs e) { + switch (Status) { + case DownloadStatus.Finished: { + this.Dispose(); + } break; + + default: { + BeginDownload(true); + } break; + } + } + private void btnDownloadAbortClose_Click(object sender, EventArgs e) { + //BeginDownload(false); + switch (Status) { + //case DownloadStatus.Finished: { + // this.Dispose(); + //} break; + + case DownloadStatus.Downloading: { + Status = DownloadStatus.Aborted; + } break; + + default: { + BeginDownload(false); + } break; + } + } private void rbVideo_CheckedChanged(object sender, EventArgs e) { if (rbVideo.Checked) { lvVideoFormats.Enabled = true; + cbVideoRemux.Enabled = true; cbVideoEncoders.Enabled = true; chkVideoDownloadAudio.Enabled = true; txtCustomArguments.Enabled = false; - lvAudioFormats.Enabled = cbAudioEncoders.Enabled = chkAudioVBR.Enabled = chkVideoSeparateAudio.Enabled = + // Does this work with videos? + cbAudioEncoders.Enabled = false; + + lvAudioFormats.Enabled = chkAudioVBR.Enabled = chkVideoSeparateAudio.Enabled = chkVideoDownloadAudio.Checked; + cbVbrQualities.Enabled = chkAudioVBR.Checked && chkVideoDownloadAudio.Checked; - if (LastSelectedVideoFormat.Index != 0) { - lvVideoFormats.Items[0].ImageIndex = 0; + if (LastSelectedVideoFormat is not null) { + if (LastSelectedVideoFormat.Index != 0) { + lvVideoFormats.Items[0].ImageIndex = 0; + } + LastSelectedVideoFormat.ImageIndex = 1; } - LastSelectedVideoFormat.ImageIndex = 1; - if (chkVideoDownloadAudio.Checked) { - if (LastSelectedAudioFormat.Index != 0) { - lvAudioFormats.Items[0].ImageIndex = 0; + if (LastSelectedAudioFormat is not null) { + if (chkVideoDownloadAudio.Checked) { + if (LastSelectedAudioFormat.Index != 0) { + lvAudioFormats.Items[0].ImageIndex = 0; + } + LastSelectedAudioFormat.ImageIndex = 1; } - LastSelectedAudioFormat.ImageIndex = 1; - } - else { - if (LastSelectedAudioFormat.Index != 0) { - lvAudioFormats.Items[0].ImageIndex = 2; + else { + if (LastSelectedAudioFormat.Index != 0) { + lvAudioFormats.Items[0].ImageIndex = 2; + } + LastSelectedAudioFormat.ImageIndex = 3; } - LastSelectedAudioFormat.ImageIndex = 3; } } } @@ -640,6 +766,7 @@ private void rbAudio_CheckedChanged(object sender, EventArgs e) { if (rbAudio.Checked) { lvVideoFormats.Enabled = false; chkVideoDownloadAudio.Enabled = false; + cbVideoRemux.Enabled = false; cbVideoEncoders.Enabled = false; chkVideoSeparateAudio.Enabled = false; txtCustomArguments.Enabled = false; @@ -650,15 +777,19 @@ private void rbAudio_CheckedChanged(object sender, EventArgs e) { cbVbrQualities.Enabled = chkAudioVBR.Checked; - if (LastSelectedVideoFormat.Index != 0) { - lvVideoFormats.Items[0].ImageIndex = 2; + if (LastSelectedVideoFormat is not null) { + if (LastSelectedVideoFormat.Index != 0) { + lvVideoFormats.Items[0].ImageIndex = 2; + } + LastSelectedVideoFormat.ImageIndex = 3; } - LastSelectedVideoFormat.ImageIndex = 3; - if (LastSelectedAudioFormat.Index != 0) { - lvAudioFormats.Items[0].ImageIndex = 0; + if (LastSelectedAudioFormat is not null) { + if (LastSelectedAudioFormat.Index != 0) { + lvAudioFormats.Items[0].ImageIndex = 0; + } + LastSelectedAudioFormat.ImageIndex = 1; } - LastSelectedAudioFormat.ImageIndex = 1; } } private void rbCustom_CheckedChanged(object sender, EventArgs e) { @@ -669,100 +800,46 @@ private void rbCustom_CheckedChanged(object sender, EventArgs e) { cbVbrQualities.Enabled = false; chkVideoDownloadAudio.Enabled = false; chkVideoSeparateAudio.Enabled = false; + cbVideoRemux.Enabled = false; cbVideoEncoders.Enabled = false; cbAudioEncoders.Enabled = false; txtCustomArguments.Enabled = true; - if (LastSelectedVideoFormat.Index != 0) { - lvVideoFormats.Items[0].ImageIndex = 2; + if (LastSelectedVideoFormat is not null) { + if (LastSelectedVideoFormat.Index != 0) { + lvVideoFormats.Items[0].ImageIndex = 2; + } + LastSelectedVideoFormat.ImageIndex = 3; } - LastSelectedVideoFormat.ImageIndex = 3; - if (LastSelectedAudioFormat.Index != 0) { - lvAudioFormats.Items[0].ImageIndex = 2; + if (LastSelectedAudioFormat is not null) { + if (LastSelectedAudioFormat.Index != 0) { + lvAudioFormats.Items[0].ImageIndex = 2; + } + LastSelectedAudioFormat.ImageIndex = 3; } - LastSelectedAudioFormat.ImageIndex = 3; } } private void btnCreateArgs_Click(object sender, EventArgs e) { MessageBox.Show(GenerateArguments(false) ?? "No args"); } - private void btnPbAdd_Click(object sender, EventArgs e) { if (pbStatus.Value < pbStatus.Maximum) pbStatus.Value++; } - private void btnPbRemove_Click(object sender, EventArgs e) { if (pbStatus.Value > pbStatus.Minimum) pbStatus.Value--; } - private void chkPbTaskbar_CheckedChanged(object sender, EventArgs e) { pbStatus.ShowInTaskbar = chkPbTaskbar.Checked; } - - private void btnDownloadAbortClose_Click(object sender, EventArgs e) { - //BeginDownload(false); - switch (Status) { - //case DownloadStatus.Finished: { - // this.Dispose(); - //} break; - - case DownloadStatus.Downloading: { - Status = DownloadStatus.Aborted; - } break; - - default: { - BeginDownload(false); - } break; - } - } - - private void btnDownloadWithAuthentication_Click(object sender, EventArgs e) { - switch (Status) { - case DownloadStatus.Finished: { - this.Dispose(); - } break; - - default: { - BeginDownload(true); - } break; - } - } - private void btnKill_Click(object sender, EventArgs e) { if (DownloadProcess is not null && !DownloadProcess.HasExited) { Program.KillProcessTree((uint)DownloadProcess.Id); DownloadProcess.Kill(); } } - - private void chkVideoDownloadAudio_CheckedChanged(object sender, EventArgs e) { - chkAudioVBR.Enabled = cbAudioEncoders.Enabled = lvAudioFormats.Enabled = chkVideoSeparateAudio.Enabled = - chkVideoDownloadAudio.Checked; - - cbVbrQualities.Enabled = chkVideoDownloadAudio.Checked && chkAudioVBR.Checked; - - if (chkVideoDownloadAudio.Checked) { - if (LastSelectedAudioFormat.Index != 0) { - lvAudioFormats.Items[0].ImageIndex = 0; - } - LastSelectedAudioFormat.ImageIndex = 1; - } - else { - if (LastSelectedAudioFormat.Index != 0) { - lvAudioFormats.Items[0].ImageIndex = 2; - } - LastSelectedAudioFormat.ImageIndex = 3; - } - } - - private void chkAudioVBR_CheckedChanged(object sender, EventArgs e) { - cbVbrQualities.Enabled = - chkAudioVBR.Checked && (rbAudio.Checked || (rbVideo.Checked && chkVideoDownloadAudio.Checked)); - } - } -} +} \ No newline at end of file diff --git a/youtube-dl-gui/Forms/frmGenericDownloadProgress.Designer.cs b/youtube-dl-gui/Forms/frmGenericDownloadProgress.Designer.cs new file mode 100644 index 00000000..ae8bffb8 --- /dev/null +++ b/youtube-dl-gui/Forms/frmGenericDownloadProgress.Designer.cs @@ -0,0 +1,57 @@ +namespace youtube_dl_gui { + partial class frmGenericDownloadProgress { + private System.ComponentModel.IContainer components = null; + + protected override void Dispose(bool disposing) { + if (disposing && (components != null)) { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + private void InitializeComponent() { + this.pbProgress = new murrty.controls.ExtendedProgressBar(); + this.SuspendLayout(); + // + // pbProgress + // + this.pbProgress.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.pbProgress.ContainerParent = this; + this.pbProgress.FastValueUpdate = true; + this.pbProgress.Location = new System.Drawing.Point(12, 12); + this.pbProgress.Name = "pbProgress"; + this.pbProgress.ShowText = true; + this.pbProgress.Size = new System.Drawing.Size(200, 21); + this.pbProgress.TabIndex = 0; + this.pbProgress.Text = "0% (0B / 0B)"; + // + // frmGenericDownloadProgress + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.ClientSize = new System.Drawing.Size(224, 45); + this.Controls.Add(this.pbProgress); + this.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Icon = global::youtube_dl_gui.Properties.Resources.ProgramIcon; + this.MaximizeBox = false; + this.MaximumSize = new System.Drawing.Size(240, 80); + this.MinimizeBox = false; + this.MinimumSize = new System.Drawing.Size(240, 80); + this.Name = "frmGenericDownloadProgress"; + this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + this.Text = "frmGenericDownloadProgress"; + this.ResumeLayout(false); + + } + + #endregion + + private murrty.controls.ExtendedProgressBar pbProgress; + } +} \ No newline at end of file diff --git a/youtube-dl-gui/Forms/frmGenericDownloadProgress.cs b/youtube-dl-gui/Forms/frmGenericDownloadProgress.cs new file mode 100644 index 00000000..ad1948d7 --- /dev/null +++ b/youtube-dl-gui/Forms/frmGenericDownloadProgress.cs @@ -0,0 +1,90 @@ +using System.Net; +using System.Threading; +using System.Windows.Forms; + +namespace youtube_dl_gui; +public partial class frmGenericDownloadProgress : Form { + public string URL { get; private set; } + public string Output { get; private set; } + private readonly Thread DownloadThread; + private WebClient DownloadClient; + private int ThrottleCount; + private bool Cancelled = false; + public frmGenericDownloadProgress(string URL, string Output) { + InitializeComponent(); + this.Text = Language.frmGenericDownloadProgress; + this.URL = URL; + this.Output = Output; + DownloadThread = new(async() => { + using (DownloadClient = new()) { + DownloadClient.DownloadProgressChanged += (s, e) => { + ThrottleCount++; + switch (ThrottleCount % 40) { + case 0: { + if (DownloadClient.IsBusy) { + pbProgress.BeginInvoke(() => { + pbProgress.Value = e.ProgressPercentage; + pbProgress.Text = $"{e.ProgressPercentage}% ({e.BytesReceived.SizeToString()} / {e.TotalBytesToReceive.SizeToString()})"; + }); + ThrottleCount = 0; + } + } break; + } + }; + DownloadClient.DownloadFileCompleted += (s, e) => { + this.DialogResult = Cancelled ? DialogResult.Abort : DialogResult.OK; + }; + DownloadClient.Headers.Add("user-agent", Program.UserAgent); + + bool CanRetry = true; + do { + pbProgress.Invoke(() => { + pbProgress.ProgressState = murrty.controls.ProgressBarState.Normal; + pbProgress.Value = 0; + }); + try { + await DownloadClient.DownloadFileTaskAsync(URL, Output); + CanRetry = false; + } + catch (ThreadAbortException) { } + catch (Exception ex) { + if (Cancelled) { + CanRetry = false; + } + else if (Log.ReportRetriableException(ex, URL) != DialogResult.Retry) { + CanRetry = false; + pbProgress.Invoke(() => { + pbProgress.ProgressState = murrty.controls.ProgressBarState.Error; + pbProgress.Text = "An error occurred."; + }); + System.Media.SystemSounds.Hand.Play(); + return; + } + } + } while (CanRetry); + } + }); + this.Shown += (s, e) => { + DownloadThread.Start(); + }; + this.FormClosing += (s, e) => { + Cancelled = true; + if (DownloadClient is not null && DownloadClient.IsBusy) { + DownloadClient.CancelAsync(); + e.Cancel = true; + } + if (DownloadThread is not null && DownloadThread.IsAlive) { + DownloadThread.Abort(); + e.Cancel = true; + } + }; + } + public frmGenericDownloadProgress(string URL, string Output, System.Drawing.Point Location) : this(URL, Output) { + this.Load += (s, e) => { + if (Config.ValidPoint(Location)) { + this.StartPosition = FormStartPosition.Manual; + this.Location = Location; + } + }; + } +} \ No newline at end of file diff --git a/youtube-dl-gui/Forms/frmGenericDownloadProgress.resx b/youtube-dl-gui/Forms/frmGenericDownloadProgress.resx new file mode 100644 index 00000000..0586bbfd --- /dev/null +++ b/youtube-dl-gui/Forms/frmGenericDownloadProgress.resx @@ -0,0 +1,126 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + True + + + True + + \ No newline at end of file diff --git a/youtube-dl-gui/Forms/frmMain.cs b/youtube-dl-gui/Forms/frmMain.cs index fc5349cd..9e1b4d7e 100644 --- a/youtube-dl-gui/Forms/frmMain.cs +++ b/youtube-dl-gui/Forms/frmMain.cs @@ -111,7 +111,7 @@ private void frmMain_Load(object sender, EventArgs e) { YtdlUpdateCheckThread = new(() => { try { if (updater.UpdateChecker.CheckForYoutubeDlUpdate()) { - updater.UpdateChecker.UpdateYoutubeDl(); + updater.UpdateChecker.UpdateYoutubeDl(this.Location); } } catch (ThreadAbortException) { @@ -436,7 +436,7 @@ private void ToggleClipboardScanning() { } else { if (!Config.Settings.General.ClipboardAutoDownloadNoticeRead) { - if (MessageBox.Show(Language.dlgClipboardAutoDownloadNotice, "youtube-dl-gui", MessageBoxButtons.OKCancel) == DialogResult.Cancel) { + if (MessageBox.Show(Language.dlgClipboardAutoDownloadNotice, Language.ApplicationName, MessageBoxButtons.OKCancel) == DialogResult.Cancel) { return; } Config.Settings.General.ClipboardAutoDownloadNoticeRead = true; @@ -600,11 +600,11 @@ private void cmTrayDownloadCustomTxtBox_Click(object sender, EventArgs e) { private void cmTrayDownloadCustomTxt_Click(object sender, EventArgs e) { if (!Clipboard.ContainsText()) { if (!System.IO.File.Exists(Environment.CurrentDirectory + "\\args.txt")) { - MessageBox.Show(Language.dlgMainArgsTxtDoesntExist, "youtube-dl-gui"); + MessageBox.Show(Language.dlgMainArgsTxtDoesntExist, Language.ApplicationName); return; } else if (string.IsNullOrEmpty(System.IO.File.ReadAllText(Environment.CurrentDirectory + "\\args.txt"))) { - MessageBox.Show(Language.dlgMainArgsTxtIsEmpty, "youtube-dl-gui"); + MessageBox.Show(Language.dlgMainArgsTxtIsEmpty, Language.ApplicationName); return; } else { @@ -621,7 +621,7 @@ private void cmTrayDownloadCustomTxt_Click(object sender, EventArgs e) { private void cmTrayDownloadCustomSettings_Click(object sender, EventArgs e) { if (!Clipboard.ContainsText() && Config.Settings.Saved.CustomArgumentsIndex < 0) { if (string.IsNullOrEmpty(Config.Settings.Saved.DownloadCustomArguments)) { - MessageBox.Show(Language.dlgMainArgsNoneSaved, "youtube-dl-gui"); + MessageBox.Show(Language.dlgMainArgsNoneSaved, Language.ApplicationName); return; } else @@ -880,7 +880,7 @@ private void mDownloadWithAuthentication_Click(object sender, EventArgs e) { } private void mBatchDownloadFromFile_Click(object sender, EventArgs e) { if (!Config.Settings.Downloads.SkipBatchTip) { - switch (MessageBox.Show(Language.msgBatchDownloadFromFile, "youtube-dl-gui", MessageBoxButtons.YesNoCancel)) { + switch (MessageBox.Show(Language.msgBatchDownloadFromFile, Language.ApplicationName, MessageBoxButtons.YesNoCancel)) { case DialogResult.Cancel: return; case DialogResult.Yes: @@ -1135,7 +1135,7 @@ private void StartDownloadExtended() { switch (Config.Settings.Downloads.YtdlType) { case 0: case 2: { if (txtUrl.Text.IsNotNullEmptyWhitespace()) { - frmExtendedDownload Extended = new(txtUrl.Text); + frmExtendedDownload Extended = new(txtUrl.Text, false); Extended.Show(); if (Config.Settings.General.ClearURLOnDownload) { txtUrl.Clear(); diff --git a/youtube-dl-gui/Forms/frmSettings.Designer.cs b/youtube-dl-gui/Forms/frmSettings.Designer.cs index 9d35b7f8..178672a4 100644 --- a/youtube-dl-gui/Forms/frmSettings.Designer.cs +++ b/youtube-dl-gui/Forms/frmSettings.Designer.cs @@ -36,16 +36,22 @@ private void InitializeComponent() { this.rbSettingsGeneralCustomArgumentsSaveInSettings = new System.Windows.Forms.RadioButton(); this.rbSettingsGeneralCustomArgumentsSaveAsArgsText = new System.Windows.Forms.RadioButton(); this.rbSettingsGeneralCustomArgumentsDontSave = new System.Windows.Forms.RadioButton(); - this.lbSepGeneral = new System.Windows.Forms.Label(); - this.btnSettingsGeneralBrowseFFmpeg = new System.Windows.Forms.Button(); - this.btnSettingsGeneralBrowseYoutubeDl = new System.Windows.Forms.Button(); - this.chkSettingsGeneralUseStaticYoutubeDl = new System.Windows.Forms.CheckBox(); - this.chkSettingsGeneralUseStaticFFmpeg = new System.Windows.Forms.CheckBox(); - this.lbSettingsGeneralFFmpegDirectory = new System.Windows.Forms.Label(); - this.lbSettingsGeneralYoutubeDlPath = new System.Windows.Forms.Label(); this.chkSettingsGeneralClearUrlOnDownload = new System.Windows.Forms.CheckBox(); this.chkSettingsGeneralHoverOverUrlToPasteClipboard = new System.Windows.Forms.CheckBox(); this.chkSettingsGeneralCheckForUpdatesOnLaunch = new System.Windows.Forms.CheckBox(); + this.tcExternalApplications = new System.Windows.Forms.TabControl(); + this.tabSettingsGeneralYoutubeDl = new System.Windows.Forms.TabPage(); + this.btnSettingsGeneralBrowseFFmpeg = new System.Windows.Forms.Button(); + this.lbSettingsGeneralYoutubeDlPath = new System.Windows.Forms.Label(); + this.txtSettingsGeneralYoutubeDlPath = new murrty.controls.ExtendedTextBox(); + this.lbSettingsGeneralFFmpegDirectory = new System.Windows.Forms.Label(); + this.txtSettingsGeneralFFmpegPath = new murrty.controls.ExtendedTextBox(); + this.chkSettingsGeneralUseStaticFFmpeg = new System.Windows.Forms.CheckBox(); + this.chkSettingsGeneralUseStaticYoutubeDl = new System.Windows.Forms.CheckBox(); + this.btnSettingsGeneralBrowseYoutubeDl = new System.Windows.Forms.Button(); + this.tabSettingsGeneralFfmpeg = new System.Windows.Forms.TabPage(); + this.btnSettingsRedownloadFfmpeg = new System.Windows.Forms.Button(); + this.btnSettingsRedownloadYoutubeDl = new System.Windows.Forms.Button(); this.tabSettingsDownloads = new System.Windows.Forms.TabPage(); this.chkSettingsDownloadsDownloadPathUseRelativePath = new System.Windows.Forms.CheckBox(); this.tabDownloads = new System.Windows.Forms.TabControl(); @@ -79,6 +85,8 @@ private void InitializeComponent() { this.numSettingsDownloadsLimitDownload = new System.Windows.Forms.NumericUpDown(); this.lbSettingsDownloadsIpPort = new System.Windows.Forms.Label(); this.chkSettingsDownloadsLimitDownload = new System.Windows.Forms.CheckBox(); + this.txtSettingsDownloadsProxyPort = new murrty.controls.ExtendedTextBox(); + this.txtSettingsDownloadsProxyIp = new murrty.controls.ExtendedTextBox(); this.tabDownloadsUpdating = new System.Windows.Forms.TabPage(); this.llbSettingsDownloadsYtdlTypeViewRepo = new System.Windows.Forms.LinkLabel(); this.lbSettingsDownloadsUpdatingYtdlType = new System.Windows.Forms.Label(); @@ -87,8 +95,12 @@ private void InitializeComponent() { this.tabDownloadsBatch = new System.Windows.Forms.TabPage(); this.chkSettingsDownloadsAddDateToBatchDownloadFolders = new System.Windows.Forms.CheckBox(); this.chkSettingsDownloadsSeparateBatchDownloads = new System.Windows.Forms.CheckBox(); + this.tabYtdlpExtendedOptions = new System.Windows.Forms.TabPage(); + this.chkYtdlpExtendedAutomaticallyDownloadThumbnail = new System.Windows.Forms.CheckBox(); + this.chkYtdlpPreferExtendedDialog = new System.Windows.Forms.CheckBox(); this.llSettingsDownloadsSchemaHelp = new System.Windows.Forms.LinkLabel(); this.lbSettingsDownloadsDownloadPath = new System.Windows.Forms.Label(); + this.txtSettingsDownloadsSavePath = new murrty.controls.ExtendedTextBox(); this.btnSettingsDownloadsBrowseSavePath = new System.Windows.Forms.Button(); this.lbSepDownloads = new System.Windows.Forms.Label(); this.lbSettingsDownloadsFileNameSchema = new System.Windows.Forms.Label(); @@ -119,6 +131,7 @@ private void InitializeComponent() { this.lbConvertAudioThousands = new System.Windows.Forms.Label(); this.lbSettingsConverterAudioBitrate = new System.Windows.Forms.Label(); this.tcSettingsConverterCustom = new System.Windows.Forms.TabPage(); + this.txtSettingsConverterCustomArguments = new murrty.controls.ExtendedTextBox(); this.lbSettingsConverterCustomHeader = new System.Windows.Forms.Label(); this.chkSettingsConverterClearInputAfterConverting = new System.Windows.Forms.CheckBox(); this.chkSettingsConverterClearOutputAfterConverting = new System.Windows.Forms.CheckBox(); @@ -130,28 +143,21 @@ private void InitializeComponent() { this.lbSettingsExtensionsExtensionShort = new System.Windows.Forms.Label(); this.lbSettingsExtensionsExtensionFullName = new System.Windows.Forms.Label(); this.lbSettingsExtensionsHeader = new System.Windows.Forms.Label(); + this.txtSettingsExtensionsExtensionShort = new murrty.controls.ExtendedTextBox(); + this.txtSettingsExtensionsExtensionFullName = new murrty.controls.ExtendedTextBox(); this.tabSettingsErrors = new System.Windows.Forms.TabPage(); this.chkSettingsErrorsSaveErrorsAsErrorLog = new System.Windows.Forms.CheckBox(); this.chkSettingsErrorsShowDetailedErrors = new System.Windows.Forms.CheckBox(); this.chkSettingsErrorsSuppressErrors = new System.Windows.Forms.CheckBox(); - this.btnSettingsRedownloadYoutubeDl = new System.Windows.Forms.Button(); this.btnSettingsCancel = new System.Windows.Forms.Button(); this.btnSettingsSave = new System.Windows.Forms.Button(); this.tipSettings = new System.Windows.Forms.ToolTip(this.components); - this.tabYtdlpExtendedOptions = new System.Windows.Forms.TabPage(); - this.chkYtdlpPreferExtendedDialog = new System.Windows.Forms.CheckBox(); - this.chkYtdlpExtendedAutomaticallyDownloadThumbnail = new System.Windows.Forms.CheckBox(); - this.txtSettingsGeneralFFmpegPath = new murrty.controls.ExtendedTextBox(); - this.txtSettingsGeneralYoutubeDlPath = new murrty.controls.ExtendedTextBox(); - this.txtSettingsDownloadsProxyPort = new murrty.controls.ExtendedTextBox(); - this.txtSettingsDownloadsProxyIp = new murrty.controls.ExtendedTextBox(); - this.txtSettingsDownloadsSavePath = new murrty.controls.ExtendedTextBox(); - this.txtSettingsConverterCustomArguments = new murrty.controls.ExtendedTextBox(); - this.txtSettingsExtensionsExtensionShort = new murrty.controls.ExtendedTextBox(); - this.txtSettingsExtensionsExtensionFullName = new murrty.controls.ExtendedTextBox(); this.tcMain.SuspendLayout(); this.tabSettingsGeneral.SuspendLayout(); this.gbSettingsGeneralCustomArguments.SuspendLayout(); + this.tcExternalApplications.SuspendLayout(); + this.tabSettingsGeneralYoutubeDl.SuspendLayout(); + this.tabSettingsGeneralFfmpeg.SuspendLayout(); this.tabSettingsDownloads.SuspendLayout(); this.tabDownloads.SuspendLayout(); this.tabDownloadsGeneral.SuspendLayout(); @@ -162,6 +168,7 @@ private void InitializeComponent() { ((System.ComponentModel.ISupportInitialize)(this.numSettingsDownloadsLimitDownload)).BeginInit(); this.tabDownloadsUpdating.SuspendLayout(); this.tabDownloadsBatch.SuspendLayout(); + this.tabYtdlpExtendedOptions.SuspendLayout(); this.tabSettingsConverter.SuspendLayout(); this.tcConverter.SuspendLayout(); this.tcSettingsConverterVideo.SuspendLayout(); @@ -172,7 +179,6 @@ private void InitializeComponent() { this.tcSettingsConverterCustom.SuspendLayout(); this.tabSettingsExtensions.SuspendLayout(); this.tabSettingsErrors.SuspendLayout(); - this.tabYtdlpExtendedOptions.SuspendLayout(); this.SuspendLayout(); // // tcMain @@ -200,18 +206,10 @@ private void InitializeComponent() { this.tabSettingsGeneral.Controls.Add(this.chkSettingsGeneralAutoUpdateYoutubeDl); this.tabSettingsGeneral.Controls.Add(this.chkSettingsGeneralClearClipboardOnDownload); this.tabSettingsGeneral.Controls.Add(this.gbSettingsGeneralCustomArguments); - this.tabSettingsGeneral.Controls.Add(this.lbSepGeneral); - this.tabSettingsGeneral.Controls.Add(this.btnSettingsGeneralBrowseFFmpeg); - this.tabSettingsGeneral.Controls.Add(this.btnSettingsGeneralBrowseYoutubeDl); - this.tabSettingsGeneral.Controls.Add(this.chkSettingsGeneralUseStaticYoutubeDl); - this.tabSettingsGeneral.Controls.Add(this.chkSettingsGeneralUseStaticFFmpeg); - this.tabSettingsGeneral.Controls.Add(this.txtSettingsGeneralFFmpegPath); - this.tabSettingsGeneral.Controls.Add(this.lbSettingsGeneralFFmpegDirectory); - this.tabSettingsGeneral.Controls.Add(this.txtSettingsGeneralYoutubeDlPath); - this.tabSettingsGeneral.Controls.Add(this.lbSettingsGeneralYoutubeDlPath); this.tabSettingsGeneral.Controls.Add(this.chkSettingsGeneralClearUrlOnDownload); this.tabSettingsGeneral.Controls.Add(this.chkSettingsGeneralHoverOverUrlToPasteClipboard); this.tabSettingsGeneral.Controls.Add(this.chkSettingsGeneralCheckForUpdatesOnLaunch); + this.tabSettingsGeneral.Controls.Add(this.tcExternalApplications); this.tabSettingsGeneral.Location = new System.Drawing.Point(4, 22); this.tabSettingsGeneral.Name = "tabSettingsGeneral"; this.tabSettingsGeneral.Padding = new System.Windows.Forms.Padding(3); @@ -236,7 +234,7 @@ private void InitializeComponent() { // this.chkSettingsGeneralDeleteUpdaterAfterUpdating.Anchor = System.Windows.Forms.AnchorStyles.None; this.chkSettingsGeneralDeleteUpdaterAfterUpdating.AutoSize = true; - this.chkSettingsGeneralDeleteUpdaterAfterUpdating.Location = new System.Drawing.Point(23, 166); + this.chkSettingsGeneralDeleteUpdaterAfterUpdating.Location = new System.Drawing.Point(23, 168); this.chkSettingsGeneralDeleteUpdaterAfterUpdating.Name = "chkSettingsGeneralDeleteUpdaterAfterUpdating"; this.chkSettingsGeneralDeleteUpdaterAfterUpdating.Size = new System.Drawing.Size(274, 17); this.chkSettingsGeneralDeleteUpdaterAfterUpdating.TabIndex = 17; @@ -248,7 +246,7 @@ private void InitializeComponent() { // this.chkSettingsGeneralCheckForBetaUpdates.Anchor = System.Windows.Forms.AnchorStyles.None; this.chkSettingsGeneralCheckForBetaUpdates.AutoSize = true; - this.chkSettingsGeneralCheckForBetaUpdates.Location = new System.Drawing.Point(41, 143); + this.chkSettingsGeneralCheckForBetaUpdates.Location = new System.Drawing.Point(41, 147); this.chkSettingsGeneralCheckForBetaUpdates.Name = "chkSettingsGeneralCheckForBetaUpdates"; this.chkSettingsGeneralCheckForBetaUpdates.Size = new System.Drawing.Size(238, 17); this.chkSettingsGeneralCheckForBetaUpdates.TabIndex = 16; @@ -260,7 +258,7 @@ private void InitializeComponent() { // this.chkSettingsGeneralAutoUpdateYoutubeDl.Anchor = System.Windows.Forms.AnchorStyles.None; this.chkSettingsGeneralAutoUpdateYoutubeDl.AutoSize = true; - this.chkSettingsGeneralAutoUpdateYoutubeDl.Location = new System.Drawing.Point(53, 281); + this.chkSettingsGeneralAutoUpdateYoutubeDl.Location = new System.Drawing.Point(53, 273); this.chkSettingsGeneralAutoUpdateYoutubeDl.Name = "chkSettingsGeneralAutoUpdateYoutubeDl"; this.chkSettingsGeneralAutoUpdateYoutubeDl.Size = new System.Drawing.Size(241, 17); this.chkSettingsGeneralAutoUpdateYoutubeDl.TabIndex = 15; @@ -272,7 +270,7 @@ private void InitializeComponent() { // this.chkSettingsGeneralClearClipboardOnDownload.Anchor = System.Windows.Forms.AnchorStyles.None; this.chkSettingsGeneralClearClipboardOnDownload.AutoSize = true; - this.chkSettingsGeneralClearClipboardOnDownload.Location = new System.Drawing.Point(36, 258); + this.chkSettingsGeneralClearClipboardOnDownload.Location = new System.Drawing.Point(36, 252); this.chkSettingsGeneralClearClipboardOnDownload.Name = "chkSettingsGeneralClearClipboardOnDownload"; this.chkSettingsGeneralClearClipboardOnDownload.Size = new System.Drawing.Size(272, 17); this.chkSettingsGeneralClearClipboardOnDownload.TabIndex = 13; @@ -287,9 +285,9 @@ private void InitializeComponent() { this.gbSettingsGeneralCustomArguments.Controls.Add(this.rbSettingsGeneralCustomArgumentsSaveInSettings); this.gbSettingsGeneralCustomArguments.Controls.Add(this.rbSettingsGeneralCustomArgumentsSaveAsArgsText); this.gbSettingsGeneralCustomArguments.Controls.Add(this.rbSettingsGeneralCustomArgumentsDontSave); - this.gbSettingsGeneralCustomArguments.Location = new System.Drawing.Point(6, 305); + this.gbSettingsGeneralCustomArguments.Location = new System.Drawing.Point(4, 305); this.gbSettingsGeneralCustomArguments.Name = "gbSettingsGeneralCustomArguments"; - this.gbSettingsGeneralCustomArguments.Size = new System.Drawing.Size(308, 46); + this.gbSettingsGeneralCustomArguments.Size = new System.Drawing.Size(308, 44); this.gbSettingsGeneralCustomArguments.TabIndex = 14; this.gbSettingsGeneralCustomArguments.TabStop = false; this.gbSettingsGeneralCustomArguments.Text = "gbSettingsGeneralCustomArguments"; @@ -300,7 +298,7 @@ private void InitializeComponent() { this.rbSettingsGeneralCustomArgumentsSaveInSettings.Anchor = System.Windows.Forms.AnchorStyles.Bottom; this.rbSettingsGeneralCustomArgumentsSaveInSettings.AutoSize = true; this.rbSettingsGeneralCustomArgumentsSaveInSettings.Checked = true; - this.rbSettingsGeneralCustomArgumentsSaveInSettings.Location = new System.Drawing.Point(200, 20); + this.rbSettingsGeneralCustomArgumentsSaveInSettings.Location = new System.Drawing.Point(200, 18); this.rbSettingsGeneralCustomArgumentsSaveInSettings.Name = "rbSettingsGeneralCustomArgumentsSaveInSettings"; this.rbSettingsGeneralCustomArgumentsSaveInSettings.Size = new System.Drawing.Size(287, 17); this.rbSettingsGeneralCustomArgumentsSaveInSettings.TabIndex = 17; @@ -313,7 +311,7 @@ private void InitializeComponent() { // this.rbSettingsGeneralCustomArgumentsSaveAsArgsText.Anchor = System.Windows.Forms.AnchorStyles.Bottom; this.rbSettingsGeneralCustomArgumentsSaveAsArgsText.AutoSize = true; - this.rbSettingsGeneralCustomArgumentsSaveAsArgsText.Location = new System.Drawing.Point(89, 20); + this.rbSettingsGeneralCustomArgumentsSaveAsArgsText.Location = new System.Drawing.Point(89, 18); this.rbSettingsGeneralCustomArgumentsSaveAsArgsText.Name = "rbSettingsGeneralCustomArgumentsSaveAsArgsText"; this.rbSettingsGeneralCustomArgumentsSaveAsArgsText.Size = new System.Drawing.Size(290, 17); this.rbSettingsGeneralCustomArgumentsSaveAsArgsText.TabIndex = 16; @@ -325,7 +323,7 @@ private void InitializeComponent() { // this.rbSettingsGeneralCustomArgumentsDontSave.Anchor = System.Windows.Forms.AnchorStyles.Bottom; this.rbSettingsGeneralCustomArgumentsDontSave.AutoSize = true; - this.rbSettingsGeneralCustomArgumentsDontSave.Location = new System.Drawing.Point(8, 20); + this.rbSettingsGeneralCustomArgumentsDontSave.Location = new System.Drawing.Point(8, 18); this.rbSettingsGeneralCustomArgumentsDontSave.Name = "rbSettingsGeneralCustomArgumentsDontSave"; this.rbSettingsGeneralCustomArgumentsDontSave.Size = new System.Drawing.Size(261, 17); this.rbSettingsGeneralCustomArgumentsDontSave.TabIndex = 15; @@ -333,21 +331,75 @@ private void InitializeComponent() { this.tipSettings.SetToolTip(this.rbSettingsGeneralCustomArgumentsDontSave, "rbSettingsGeneralCustomArgumentsDontSave"); this.rbSettingsGeneralCustomArgumentsDontSave.UseVisualStyleBackColor = true; // - // lbSepGeneral + // chkSettingsGeneralClearUrlOnDownload + // + this.chkSettingsGeneralClearUrlOnDownload.Anchor = System.Windows.Forms.AnchorStyles.None; + this.chkSettingsGeneralClearUrlOnDownload.AutoSize = true; + this.chkSettingsGeneralClearUrlOnDownload.Location = new System.Drawing.Point(52, 231); + this.chkSettingsGeneralClearUrlOnDownload.Name = "chkSettingsGeneralClearUrlOnDownload"; + this.chkSettingsGeneralClearUrlOnDownload.Size = new System.Drawing.Size(236, 17); + this.chkSettingsGeneralClearUrlOnDownload.TabIndex = 12; + this.chkSettingsGeneralClearUrlOnDownload.Text = "chkSettingsGeneralClearUrlOnDownload"; + this.tipSettings.SetToolTip(this.chkSettingsGeneralClearUrlOnDownload, "chkSettingsGeneralClearUrlOnDownloadHint"); + this.chkSettingsGeneralClearUrlOnDownload.UseVisualStyleBackColor = true; + // + // chkSettingsGeneralHoverOverUrlToPasteClipboard + // + this.chkSettingsGeneralHoverOverUrlToPasteClipboard.Anchor = System.Windows.Forms.AnchorStyles.None; + this.chkSettingsGeneralHoverOverUrlToPasteClipboard.AutoSize = true; + this.chkSettingsGeneralHoverOverUrlToPasteClipboard.Checked = true; + this.chkSettingsGeneralHoverOverUrlToPasteClipboard.CheckState = System.Windows.Forms.CheckState.Checked; + this.chkSettingsGeneralHoverOverUrlToPasteClipboard.Location = new System.Drawing.Point(27, 210); + this.chkSettingsGeneralHoverOverUrlToPasteClipboard.Name = "chkSettingsGeneralHoverOverUrlToPasteClipboard"; + this.chkSettingsGeneralHoverOverUrlToPasteClipboard.Size = new System.Drawing.Size(284, 17); + this.chkSettingsGeneralHoverOverUrlToPasteClipboard.TabIndex = 11; + this.chkSettingsGeneralHoverOverUrlToPasteClipboard.Text = "chkSettingsGeneralHoverOverUrlToPasteClipboard"; + this.tipSettings.SetToolTip(this.chkSettingsGeneralHoverOverUrlToPasteClipboard, "chkSettingsGeneralHoverOverUrlToPasteClipboard"); + this.chkSettingsGeneralHoverOverUrlToPasteClipboard.UseVisualStyleBackColor = true; + // + // chkSettingsGeneralCheckForUpdatesOnLaunch + // + this.chkSettingsGeneralCheckForUpdatesOnLaunch.Anchor = System.Windows.Forms.AnchorStyles.None; + this.chkSettingsGeneralCheckForUpdatesOnLaunch.AutoSize = true; + this.chkSettingsGeneralCheckForUpdatesOnLaunch.Location = new System.Drawing.Point(33, 126); + this.chkSettingsGeneralCheckForUpdatesOnLaunch.Name = "chkSettingsGeneralCheckForUpdatesOnLaunch"; + this.chkSettingsGeneralCheckForUpdatesOnLaunch.Size = new System.Drawing.Size(269, 17); + this.chkSettingsGeneralCheckForUpdatesOnLaunch.TabIndex = 10; + this.chkSettingsGeneralCheckForUpdatesOnLaunch.Text = "chkSettingsGeneralCheckForUpdatesOnLaunch"; + this.tipSettings.SetToolTip(this.chkSettingsGeneralCheckForUpdatesOnLaunch, "chkSettingsGeneralCheckForUpdatesOnLaunch"); + this.chkSettingsGeneralCheckForUpdatesOnLaunch.UseVisualStyleBackColor = true; // - this.lbSepGeneral.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + // tcExternalApplications + // + this.tcExternalApplications.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.lbSepGeneral.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; - this.lbSepGeneral.Location = new System.Drawing.Point(25, 107); - this.lbSepGeneral.Name = "lbSepGeneral"; - this.lbSepGeneral.Size = new System.Drawing.Size(270, 2); - this.lbSepGeneral.TabIndex = 9; - this.lbSepGeneral.Text = "HELLO WORLD"; + this.tcExternalApplications.Controls.Add(this.tabSettingsGeneralYoutubeDl); + this.tcExternalApplications.Controls.Add(this.tabSettingsGeneralFfmpeg); + this.tcExternalApplications.Location = new System.Drawing.Point(6, 2); + this.tcExternalApplications.Name = "tcExternalApplications"; + this.tcExternalApplications.SelectedIndex = 0; + this.tcExternalApplications.Size = new System.Drawing.Size(306, 110); + this.tcExternalApplications.TabIndex = 19; + // + // tabSettingsGeneralYoutubeDl + // + this.tabSettingsGeneralYoutubeDl.Controls.Add(this.chkSettingsGeneralUseStaticYoutubeDl); + this.tabSettingsGeneralYoutubeDl.Controls.Add(this.lbSettingsGeneralYoutubeDlPath); + this.tabSettingsGeneralYoutubeDl.Controls.Add(this.btnSettingsRedownloadYoutubeDl); + this.tabSettingsGeneralYoutubeDl.Controls.Add(this.txtSettingsGeneralYoutubeDlPath); + this.tabSettingsGeneralYoutubeDl.Controls.Add(this.btnSettingsGeneralBrowseYoutubeDl); + this.tabSettingsGeneralYoutubeDl.Location = new System.Drawing.Point(4, 22); + this.tabSettingsGeneralYoutubeDl.Name = "tabSettingsGeneralYoutubeDl"; + this.tabSettingsGeneralYoutubeDl.Padding = new System.Windows.Forms.Padding(3); + this.tabSettingsGeneralYoutubeDl.Size = new System.Drawing.Size(298, 84); + this.tabSettingsGeneralYoutubeDl.TabIndex = 0; + this.tabSettingsGeneralYoutubeDl.Text = "tabSettingsGeneralYoutubeDl"; + this.tabSettingsGeneralYoutubeDl.UseVisualStyleBackColor = true; // // btnSettingsGeneralBrowseFFmpeg // this.btnSettingsGeneralBrowseFFmpeg.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.btnSettingsGeneralBrowseFFmpeg.Location = new System.Drawing.Point(269, 77); + this.btnSettingsGeneralBrowseFFmpeg.Location = new System.Drawing.Point(252, 25); this.btnSettingsGeneralBrowseFFmpeg.Name = "btnSettingsGeneralBrowseFFmpeg"; this.btnSettingsGeneralBrowseFFmpeg.Size = new System.Drawing.Size(33, 23); this.btnSettingsGeneralBrowseFFmpeg.TabIndex = 8; @@ -356,34 +408,68 @@ private void InitializeComponent() { this.btnSettingsGeneralBrowseFFmpeg.UseVisualStyleBackColor = true; this.btnSettingsGeneralBrowseFFmpeg.Click += new System.EventHandler(this.btnSettingsGeneralBrowseFFmpeg_Click); // - // btnSettingsGeneralBrowseYoutubeDl + // lbSettingsGeneralYoutubeDlPath // - this.btnSettingsGeneralBrowseYoutubeDl.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.btnSettingsGeneralBrowseYoutubeDl.Location = new System.Drawing.Point(269, 30); - this.btnSettingsGeneralBrowseYoutubeDl.Name = "btnSettingsGeneralBrowseYoutubeDl"; - this.btnSettingsGeneralBrowseYoutubeDl.Size = new System.Drawing.Size(33, 23); - this.btnSettingsGeneralBrowseYoutubeDl.TabIndex = 4; - this.btnSettingsGeneralBrowseYoutubeDl.Text = "..."; - this.tipSettings.SetToolTip(this.btnSettingsGeneralBrowseYoutubeDl, "btnBrwsYtdl"); - this.btnSettingsGeneralBrowseYoutubeDl.UseVisualStyleBackColor = true; - this.btnSettingsGeneralBrowseYoutubeDl.Click += new System.EventHandler(this.btnSettingsGeneralBrowseYoutubeDl_Click); + this.lbSettingsGeneralYoutubeDlPath.AutoSize = true; + this.lbSettingsGeneralYoutubeDlPath.Location = new System.Drawing.Point(2, 7); + this.lbSettingsGeneralYoutubeDlPath.Name = "lbSettingsGeneralYoutubeDlPath"; + this.lbSettingsGeneralYoutubeDlPath.Size = new System.Drawing.Size(175, 13); + this.lbSettingsGeneralYoutubeDlPath.TabIndex = 1; + this.lbSettingsGeneralYoutubeDlPath.Text = "lbSettingsGeneralYoutubeDlPath"; + this.tipSettings.SetToolTip(this.lbSettingsGeneralYoutubeDlPath, "lbSettingsGeneralYoutubeDlPath"); // - // chkSettingsGeneralUseStaticYoutubeDl + // txtSettingsGeneralYoutubeDlPath // - this.chkSettingsGeneralUseStaticYoutubeDl.AutoSize = true; - this.chkSettingsGeneralUseStaticYoutubeDl.Location = new System.Drawing.Point(122, 11); - this.chkSettingsGeneralUseStaticYoutubeDl.Name = "chkSettingsGeneralUseStaticYoutubeDl"; - this.chkSettingsGeneralUseStaticYoutubeDl.Size = new System.Drawing.Size(225, 17); - this.chkSettingsGeneralUseStaticYoutubeDl.TabIndex = 2; - this.chkSettingsGeneralUseStaticYoutubeDl.Text = "chkSettingsGeneralUseStaticYoutubeDl"; - this.tipSettings.SetToolTip(this.chkSettingsGeneralUseStaticYoutubeDl, "chkSettingsGeneralUseStaticYoutubeDl"); - this.chkSettingsGeneralUseStaticYoutubeDl.UseVisualStyleBackColor = true; - this.chkSettingsGeneralUseStaticYoutubeDl.CheckedChanged += new System.EventHandler(this.chkSettingsGeneralUseStaticYoutubeDl_CheckedChanged); + this.txtSettingsGeneralYoutubeDlPath.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.txtSettingsGeneralYoutubeDlPath.ButtonAlignment = murrty.controls.ButtonAlignment.Left; + this.txtSettingsGeneralYoutubeDlPath.ButtonCursor = System.Windows.Forms.Cursors.Default; + this.txtSettingsGeneralYoutubeDlPath.ButtonFont = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtSettingsGeneralYoutubeDlPath.ButtonImageIndex = -1; + this.txtSettingsGeneralYoutubeDlPath.ButtonSize = new System.Drawing.Size(22, 21); + this.txtSettingsGeneralYoutubeDlPath.ButtonText = ""; + this.txtSettingsGeneralYoutubeDlPath.ButtonTextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.txtSettingsGeneralYoutubeDlPath.Location = new System.Drawing.Point(13, 27); + this.txtSettingsGeneralYoutubeDlPath.Name = "txtSettingsGeneralYoutubeDlPath"; + this.txtSettingsGeneralYoutubeDlPath.ReadOnly = true; + this.txtSettingsGeneralYoutubeDlPath.RegexPatterns = null; + this.txtSettingsGeneralYoutubeDlPath.Size = new System.Drawing.Size(233, 22); + this.txtSettingsGeneralYoutubeDlPath.TabIndex = 3; + this.tipSettings.SetToolTip(this.txtSettingsGeneralYoutubeDlPath, "txtYtdl"); + // + // lbSettingsGeneralFFmpegDirectory + // + this.lbSettingsGeneralFFmpegDirectory.AutoSize = true; + this.lbSettingsGeneralFFmpegDirectory.Location = new System.Drawing.Point(2, 7); + this.lbSettingsGeneralFFmpegDirectory.Name = "lbSettingsGeneralFFmpegDirectory"; + this.lbSettingsGeneralFFmpegDirectory.Size = new System.Drawing.Size(186, 13); + this.lbSettingsGeneralFFmpegDirectory.TabIndex = 2; + this.lbSettingsGeneralFFmpegDirectory.Text = "lbSettingsGeneralFFmpegDirectory"; + this.tipSettings.SetToolTip(this.lbSettingsGeneralFFmpegDirectory, "lbSettingsGeneralFFmpegDirectory"); + // + // txtSettingsGeneralFFmpegPath + // + this.txtSettingsGeneralFFmpegPath.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.txtSettingsGeneralFFmpegPath.ButtonAlignment = murrty.controls.ButtonAlignment.Left; + this.txtSettingsGeneralFFmpegPath.ButtonCursor = System.Windows.Forms.Cursors.Default; + this.txtSettingsGeneralFFmpegPath.ButtonFont = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtSettingsGeneralFFmpegPath.ButtonImageIndex = -1; + this.txtSettingsGeneralFFmpegPath.ButtonSize = new System.Drawing.Size(22, 21); + this.txtSettingsGeneralFFmpegPath.ButtonText = ""; + this.txtSettingsGeneralFFmpegPath.ButtonTextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.txtSettingsGeneralFFmpegPath.Location = new System.Drawing.Point(13, 27); + this.txtSettingsGeneralFFmpegPath.Name = "txtSettingsGeneralFFmpegPath"; + this.txtSettingsGeneralFFmpegPath.ReadOnly = true; + this.txtSettingsGeneralFFmpegPath.RegexPatterns = null; + this.txtSettingsGeneralFFmpegPath.Size = new System.Drawing.Size(233, 22); + this.txtSettingsGeneralFFmpegPath.TabIndex = 7; + this.tipSettings.SetToolTip(this.txtSettingsGeneralFFmpegPath, "txtFFmpeg"); // // chkSettingsGeneralUseStaticFFmpeg // this.chkSettingsGeneralUseStaticFFmpeg.AutoSize = true; - this.chkSettingsGeneralUseStaticFFmpeg.Location = new System.Drawing.Point(122, 58); + this.chkSettingsGeneralUseStaticFFmpeg.Location = new System.Drawing.Point(105, 6); this.chkSettingsGeneralUseStaticFFmpeg.Name = "chkSettingsGeneralUseStaticFFmpeg"; this.chkSettingsGeneralUseStaticFFmpeg.Size = new System.Drawing.Size(213, 17); this.chkSettingsGeneralUseStaticFFmpeg.TabIndex = 6; @@ -392,63 +478,68 @@ private void InitializeComponent() { this.chkSettingsGeneralUseStaticFFmpeg.UseVisualStyleBackColor = true; this.chkSettingsGeneralUseStaticFFmpeg.CheckedChanged += new System.EventHandler(this.chkSettingsGeneralUseStaticFFmpeg_CheckedChanged); // - // lbSettingsGeneralFFmpegDirectory - // - this.lbSettingsGeneralFFmpegDirectory.AutoSize = true; - this.lbSettingsGeneralFFmpegDirectory.Location = new System.Drawing.Point(19, 59); - this.lbSettingsGeneralFFmpegDirectory.Name = "lbSettingsGeneralFFmpegDirectory"; - this.lbSettingsGeneralFFmpegDirectory.Size = new System.Drawing.Size(186, 13); - this.lbSettingsGeneralFFmpegDirectory.TabIndex = 2; - this.lbSettingsGeneralFFmpegDirectory.Text = "lbSettingsGeneralFFmpegDirectory"; - this.tipSettings.SetToolTip(this.lbSettingsGeneralFFmpegDirectory, "lbSettingsGeneralFFmpegDirectory"); - // - // lbSettingsGeneralYoutubeDlPath - // - this.lbSettingsGeneralYoutubeDlPath.AutoSize = true; - this.lbSettingsGeneralYoutubeDlPath.Location = new System.Drawing.Point(19, 12); - this.lbSettingsGeneralYoutubeDlPath.Name = "lbSettingsGeneralYoutubeDlPath"; - this.lbSettingsGeneralYoutubeDlPath.Size = new System.Drawing.Size(175, 13); - this.lbSettingsGeneralYoutubeDlPath.TabIndex = 1; - this.lbSettingsGeneralYoutubeDlPath.Text = "lbSettingsGeneralYoutubeDlPath"; - this.tipSettings.SetToolTip(this.lbSettingsGeneralYoutubeDlPath, "lbSettingsGeneralYoutubeDlPath"); + // chkSettingsGeneralUseStaticYoutubeDl // - // chkSettingsGeneralClearUrlOnDownload + this.chkSettingsGeneralUseStaticYoutubeDl.AutoSize = true; + this.chkSettingsGeneralUseStaticYoutubeDl.Location = new System.Drawing.Point(105, 6); + this.chkSettingsGeneralUseStaticYoutubeDl.Name = "chkSettingsGeneralUseStaticYoutubeDl"; + this.chkSettingsGeneralUseStaticYoutubeDl.Size = new System.Drawing.Size(225, 17); + this.chkSettingsGeneralUseStaticYoutubeDl.TabIndex = 2; + this.chkSettingsGeneralUseStaticYoutubeDl.Text = "chkSettingsGeneralUseStaticYoutubeDl"; + this.tipSettings.SetToolTip(this.chkSettingsGeneralUseStaticYoutubeDl, "chkSettingsGeneralUseStaticYoutubeDl"); + this.chkSettingsGeneralUseStaticYoutubeDl.UseVisualStyleBackColor = true; + this.chkSettingsGeneralUseStaticYoutubeDl.CheckedChanged += new System.EventHandler(this.chkSettingsGeneralUseStaticYoutubeDl_CheckedChanged); // - this.chkSettingsGeneralClearUrlOnDownload.Anchor = System.Windows.Forms.AnchorStyles.None; - this.chkSettingsGeneralClearUrlOnDownload.AutoSize = true; - this.chkSettingsGeneralClearUrlOnDownload.Location = new System.Drawing.Point(52, 235); - this.chkSettingsGeneralClearUrlOnDownload.Name = "chkSettingsGeneralClearUrlOnDownload"; - this.chkSettingsGeneralClearUrlOnDownload.Size = new System.Drawing.Size(236, 17); - this.chkSettingsGeneralClearUrlOnDownload.TabIndex = 12; - this.chkSettingsGeneralClearUrlOnDownload.Text = "chkSettingsGeneralClearUrlOnDownload"; - this.tipSettings.SetToolTip(this.chkSettingsGeneralClearUrlOnDownload, "chkSettingsGeneralClearUrlOnDownloadHint"); - this.chkSettingsGeneralClearUrlOnDownload.UseVisualStyleBackColor = true; + // btnSettingsGeneralBrowseYoutubeDl // - // chkSettingsGeneralHoverOverUrlToPasteClipboard + this.btnSettingsGeneralBrowseYoutubeDl.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.btnSettingsGeneralBrowseYoutubeDl.Location = new System.Drawing.Point(252, 25); + this.btnSettingsGeneralBrowseYoutubeDl.Name = "btnSettingsGeneralBrowseYoutubeDl"; + this.btnSettingsGeneralBrowseYoutubeDl.Size = new System.Drawing.Size(33, 23); + this.btnSettingsGeneralBrowseYoutubeDl.TabIndex = 4; + this.btnSettingsGeneralBrowseYoutubeDl.Text = "..."; + this.tipSettings.SetToolTip(this.btnSettingsGeneralBrowseYoutubeDl, "btnBrwsYtdl"); + this.btnSettingsGeneralBrowseYoutubeDl.UseVisualStyleBackColor = true; + this.btnSettingsGeneralBrowseYoutubeDl.Click += new System.EventHandler(this.btnSettingsGeneralBrowseYoutubeDl_Click); // - this.chkSettingsGeneralHoverOverUrlToPasteClipboard.Anchor = System.Windows.Forms.AnchorStyles.None; - this.chkSettingsGeneralHoverOverUrlToPasteClipboard.AutoSize = true; - this.chkSettingsGeneralHoverOverUrlToPasteClipboard.Checked = true; - this.chkSettingsGeneralHoverOverUrlToPasteClipboard.CheckState = System.Windows.Forms.CheckState.Checked; - this.chkSettingsGeneralHoverOverUrlToPasteClipboard.Location = new System.Drawing.Point(27, 212); - this.chkSettingsGeneralHoverOverUrlToPasteClipboard.Name = "chkSettingsGeneralHoverOverUrlToPasteClipboard"; - this.chkSettingsGeneralHoverOverUrlToPasteClipboard.Size = new System.Drawing.Size(284, 17); - this.chkSettingsGeneralHoverOverUrlToPasteClipboard.TabIndex = 11; - this.chkSettingsGeneralHoverOverUrlToPasteClipboard.Text = "chkSettingsGeneralHoverOverUrlToPasteClipboard"; - this.tipSettings.SetToolTip(this.chkSettingsGeneralHoverOverUrlToPasteClipboard, "chkSettingsGeneralHoverOverUrlToPasteClipboard"); - this.chkSettingsGeneralHoverOverUrlToPasteClipboard.UseVisualStyleBackColor = true; + // tabSettingsGeneralFfmpeg + // + this.tabSettingsGeneralFfmpeg.Controls.Add(this.chkSettingsGeneralUseStaticFFmpeg); + this.tabSettingsGeneralFfmpeg.Controls.Add(this.btnSettingsGeneralBrowseFFmpeg); + this.tabSettingsGeneralFfmpeg.Controls.Add(this.btnSettingsRedownloadFfmpeg); + this.tabSettingsGeneralFfmpeg.Controls.Add(this.txtSettingsGeneralFFmpegPath); + this.tabSettingsGeneralFfmpeg.Controls.Add(this.lbSettingsGeneralFFmpegDirectory); + this.tabSettingsGeneralFfmpeg.Location = new System.Drawing.Point(4, 22); + this.tabSettingsGeneralFfmpeg.Name = "tabSettingsGeneralFfmpeg"; + this.tabSettingsGeneralFfmpeg.Padding = new System.Windows.Forms.Padding(3); + this.tabSettingsGeneralFfmpeg.Size = new System.Drawing.Size(298, 84); + this.tabSettingsGeneralFfmpeg.TabIndex = 1; + this.tabSettingsGeneralFfmpeg.Text = "tabSettingsGeneralFfmpeg"; + this.tabSettingsGeneralFfmpeg.UseVisualStyleBackColor = true; + // + // btnSettingsRedownloadFfmpeg + // + this.btnSettingsRedownloadFfmpeg.Anchor = System.Windows.Forms.AnchorStyles.None; + this.btnSettingsRedownloadFfmpeg.Location = new System.Drawing.Point(46, 55); + this.btnSettingsRedownloadFfmpeg.Name = "btnSettingsRedownloadFfmpeg"; + this.btnSettingsRedownloadFfmpeg.Size = new System.Drawing.Size(207, 23); + this.btnSettingsRedownloadFfmpeg.TabIndex = 2; + this.btnSettingsRedownloadFfmpeg.Text = "btnSettingsRedownloadFfmpeg"; + this.tipSettings.SetToolTip(this.btnSettingsRedownloadFfmpeg, "btnSettingsRedownloadYoutubeDl"); + this.btnSettingsRedownloadFfmpeg.UseVisualStyleBackColor = true; + this.btnSettingsRedownloadFfmpeg.Click += new System.EventHandler(this.btnSettingsRedownloadFfmpeg_Click); // - // chkSettingsGeneralCheckForUpdatesOnLaunch + // btnSettingsRedownloadYoutubeDl // - this.chkSettingsGeneralCheckForUpdatesOnLaunch.Anchor = System.Windows.Forms.AnchorStyles.None; - this.chkSettingsGeneralCheckForUpdatesOnLaunch.AutoSize = true; - this.chkSettingsGeneralCheckForUpdatesOnLaunch.Location = new System.Drawing.Point(33, 120); - this.chkSettingsGeneralCheckForUpdatesOnLaunch.Name = "chkSettingsGeneralCheckForUpdatesOnLaunch"; - this.chkSettingsGeneralCheckForUpdatesOnLaunch.Size = new System.Drawing.Size(269, 17); - this.chkSettingsGeneralCheckForUpdatesOnLaunch.TabIndex = 10; - this.chkSettingsGeneralCheckForUpdatesOnLaunch.Text = "chkSettingsGeneralCheckForUpdatesOnLaunch"; - this.tipSettings.SetToolTip(this.chkSettingsGeneralCheckForUpdatesOnLaunch, "chkSettingsGeneralCheckForUpdatesOnLaunch"); - this.chkSettingsGeneralCheckForUpdatesOnLaunch.UseVisualStyleBackColor = true; + this.btnSettingsRedownloadYoutubeDl.Anchor = System.Windows.Forms.AnchorStyles.None; + this.btnSettingsRedownloadYoutubeDl.Location = new System.Drawing.Point(46, 55); + this.btnSettingsRedownloadYoutubeDl.Name = "btnSettingsRedownloadYoutubeDl"; + this.btnSettingsRedownloadYoutubeDl.Size = new System.Drawing.Size(207, 23); + this.btnSettingsRedownloadYoutubeDl.TabIndex = 1; + this.btnSettingsRedownloadYoutubeDl.Text = "btnSettingsRedownloadYoutubeDl"; + this.tipSettings.SetToolTip(this.btnSettingsRedownloadYoutubeDl, "btnSettingsRedownloadYoutubeDl"); + this.btnSettingsRedownloadYoutubeDl.UseVisualStyleBackColor = true; + this.btnSettingsRedownloadYoutubeDl.Click += new System.EventHandler(this.btnSettingsRedownloadYoutubeDl_Click); // // tabSettingsDownloads // @@ -866,6 +957,46 @@ private void InitializeComponent() { this.tipSettings.SetToolTip(this.chkSettingsDownloadsLimitDownload, "chkSettingsDownloadsLimitDownloadHint"); this.chkSettingsDownloadsLimitDownload.UseVisualStyleBackColor = true; // + // txtSettingsDownloadsProxyPort + // + this.txtSettingsDownloadsProxyPort.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.txtSettingsDownloadsProxyPort.ButtonAlignment = murrty.controls.ButtonAlignment.Left; + this.txtSettingsDownloadsProxyPort.ButtonCursor = System.Windows.Forms.Cursors.Default; + this.txtSettingsDownloadsProxyPort.ButtonFont = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtSettingsDownloadsProxyPort.ButtonImageIndex = -1; + this.txtSettingsDownloadsProxyPort.ButtonSize = new System.Drawing.Size(22, 21); + this.txtSettingsDownloadsProxyPort.ButtonText = ""; + this.txtSettingsDownloadsProxyPort.ButtonTextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.txtSettingsDownloadsProxyPort.Location = new System.Drawing.Point(189, 162); + this.txtSettingsDownloadsProxyPort.MaxLength = 5; + this.txtSettingsDownloadsProxyPort.Name = "txtSettingsDownloadsProxyPort"; + this.txtSettingsDownloadsProxyPort.RegexPatterns = null; + this.txtSettingsDownloadsProxyPort.Size = new System.Drawing.Size(44, 22); + this.txtSettingsDownloadsProxyPort.TabIndex = 12; + this.txtSettingsDownloadsProxyPort.TextHint = "12345"; + this.tipSettings.SetToolTip(this.txtSettingsDownloadsProxyPort, "txtSettingsDownloadsProxyPortHint"); + this.txtSettingsDownloadsProxyPort.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.txtSettingsDownloadsProxyPort_KeyPress); + // + // txtSettingsDownloadsProxyIp + // + this.txtSettingsDownloadsProxyIp.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.txtSettingsDownloadsProxyIp.ButtonAlignment = murrty.controls.ButtonAlignment.Left; + this.txtSettingsDownloadsProxyIp.ButtonCursor = System.Windows.Forms.Cursors.Default; + this.txtSettingsDownloadsProxyIp.ButtonFont = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtSettingsDownloadsProxyIp.ButtonImageIndex = -1; + this.txtSettingsDownloadsProxyIp.ButtonSize = new System.Drawing.Size(22, 21); + this.txtSettingsDownloadsProxyIp.ButtonText = ""; + this.txtSettingsDownloadsProxyIp.ButtonTextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.txtSettingsDownloadsProxyIp.Location = new System.Drawing.Point(92, 162); + this.txtSettingsDownloadsProxyIp.MaxLength = 15; + this.txtSettingsDownloadsProxyIp.Name = "txtSettingsDownloadsProxyIp"; + this.txtSettingsDownloadsProxyIp.RegexPatterns = null; + this.txtSettingsDownloadsProxyIp.Size = new System.Drawing.Size(89, 22); + this.txtSettingsDownloadsProxyIp.TabIndex = 10; + this.txtSettingsDownloadsProxyIp.TextHint = "255.255.255.255"; + this.tipSettings.SetToolTip(this.txtSettingsDownloadsProxyIp, "txtSettingsDownloadsProxyIpHint"); + this.txtSettingsDownloadsProxyIp.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.txtSettingsDownloadsProxyIp_KeyPress); + // // tabDownloadsUpdating // this.tabDownloadsUpdating.Controls.Add(this.llbSettingsDownloadsYtdlTypeViewRepo); @@ -907,9 +1038,9 @@ private void InitializeComponent() { this.cbSettingsDownloadsUpdatingYtdlType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.cbSettingsDownloadsUpdatingYtdlType.FormattingEnabled = true; this.cbSettingsDownloadsUpdatingYtdlType.Items.AddRange(new object[] { + "yt-dlp/yt-dlp", "ytdl-org/youtube-dl", - "blackjack4494/youtube-dlc", - "yt-dlp/yt-dlp"}); + "blackjack4494/youtube-dlc"}); this.cbSettingsDownloadsUpdatingYtdlType.Location = new System.Drawing.Point(9, 51); this.cbSettingsDownloadsUpdatingYtdlType.Name = "cbSettingsDownloadsUpdatingYtdlType"; this.cbSettingsDownloadsUpdatingYtdlType.Size = new System.Drawing.Size(179, 21); @@ -963,10 +1094,44 @@ private void InitializeComponent() { this.tipSettings.SetToolTip(this.chkSettingsDownloadsSeparateBatchDownloads, "chkSettingsDownloadsSeparateBatchDownloadsHint"); this.chkSettingsDownloadsSeparateBatchDownloads.UseVisualStyleBackColor = true; // - // llSettingsDownloadsSchemaHelp + // tabYtdlpExtendedOptions // - this.llSettingsDownloadsSchemaHelp.AutoSize = true; - this.llSettingsDownloadsSchemaHelp.Location = new System.Drawing.Point(210, 59); + this.tabYtdlpExtendedOptions.Controls.Add(this.chkYtdlpExtendedAutomaticallyDownloadThumbnail); + this.tabYtdlpExtendedOptions.Controls.Add(this.chkYtdlpPreferExtendedDialog); + this.tabYtdlpExtendedOptions.Location = new System.Drawing.Point(4, 22); + this.tabYtdlpExtendedOptions.Name = "tabYtdlpExtendedOptions"; + this.tabYtdlpExtendedOptions.Padding = new System.Windows.Forms.Padding(3); + this.tabYtdlpExtendedOptions.Size = new System.Drawing.Size(300, 197); + this.tabYtdlpExtendedOptions.TabIndex = 6; + this.tabYtdlpExtendedOptions.Text = "tabYtdlpExtendedOptions"; + this.tabYtdlpExtendedOptions.UseVisualStyleBackColor = true; + // + // chkYtdlpExtendedAutomaticallyDownloadThumbnail + // + this.chkYtdlpExtendedAutomaticallyDownloadThumbnail.AutoSize = true; + this.chkYtdlpExtendedAutomaticallyDownloadThumbnail.Location = new System.Drawing.Point(6, 29); + this.chkYtdlpExtendedAutomaticallyDownloadThumbnail.Name = "chkYtdlpExtendedAutomaticallyDownloadThumbnail"; + this.chkYtdlpExtendedAutomaticallyDownloadThumbnail.Size = new System.Drawing.Size(295, 17); + this.chkYtdlpExtendedAutomaticallyDownloadThumbnail.TabIndex = 1; + this.chkYtdlpExtendedAutomaticallyDownloadThumbnail.Text = "chkYtdlpExtendedAutomaticallyDownloadThumbnail"; + this.tipSettings.SetToolTip(this.chkYtdlpExtendedAutomaticallyDownloadThumbnail, "chkYtdlpExtendedAutomaticallyDownloadThumbnailHint"); + this.chkYtdlpExtendedAutomaticallyDownloadThumbnail.UseVisualStyleBackColor = true; + // + // chkYtdlpPreferExtendedDialog + // + this.chkYtdlpPreferExtendedDialog.AutoSize = true; + this.chkYtdlpPreferExtendedDialog.Location = new System.Drawing.Point(6, 6); + this.chkYtdlpPreferExtendedDialog.Name = "chkYtdlpPreferExtendedDialog"; + this.chkYtdlpPreferExtendedDialog.Size = new System.Drawing.Size(181, 17); + this.chkYtdlpPreferExtendedDialog.TabIndex = 0; + this.chkYtdlpPreferExtendedDialog.Text = "chkYtdlpPreferExtendedDialog"; + this.tipSettings.SetToolTip(this.chkYtdlpPreferExtendedDialog, "chkYtdlpPreferExtendedDialogHint"); + this.chkYtdlpPreferExtendedDialog.UseVisualStyleBackColor = true; + // + // llSettingsDownloadsSchemaHelp + // + this.llSettingsDownloadsSchemaHelp.AutoSize = true; + this.llSettingsDownloadsSchemaHelp.Location = new System.Drawing.Point(210, 59); this.llSettingsDownloadsSchemaHelp.Name = "llSettingsDownloadsSchemaHelp"; this.llSettingsDownloadsSchemaHelp.Size = new System.Drawing.Size(12, 13); this.llSettingsDownloadsSchemaHelp.TabIndex = 5; @@ -985,6 +1150,25 @@ private void InitializeComponent() { this.lbSettingsDownloadsDownloadPath.Text = "lbSettingsDownloadsDownloadPath"; this.tipSettings.SetToolTip(this.lbSettingsDownloadsDownloadPath, "lbSettingsDownloadsDownloadPath"); // + // txtSettingsDownloadsSavePath + // + this.txtSettingsDownloadsSavePath.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.txtSettingsDownloadsSavePath.ButtonAlignment = murrty.controls.ButtonAlignment.Left; + this.txtSettingsDownloadsSavePath.ButtonCursor = System.Windows.Forms.Cursors.Default; + this.txtSettingsDownloadsSavePath.ButtonFont = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtSettingsDownloadsSavePath.ButtonImageIndex = -1; + this.txtSettingsDownloadsSavePath.ButtonSize = new System.Drawing.Size(22, 21); + this.txtSettingsDownloadsSavePath.ButtonText = ""; + this.txtSettingsDownloadsSavePath.ButtonTextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.txtSettingsDownloadsSavePath.Location = new System.Drawing.Point(30, 32); + this.txtSettingsDownloadsSavePath.Name = "txtSettingsDownloadsSavePath"; + this.txtSettingsDownloadsSavePath.ReadOnly = true; + this.txtSettingsDownloadsSavePath.RegexPatterns = null; + this.txtSettingsDownloadsSavePath.Size = new System.Drawing.Size(233, 22); + this.txtSettingsDownloadsSavePath.TabIndex = 2; + this.tipSettings.SetToolTip(this.txtSettingsDownloadsSavePath, "txtSaveto"); + // // btnSettingsDownloadsBrowseSavePath // this.btnSettingsDownloadsBrowseSavePath.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); @@ -1389,6 +1573,23 @@ private void InitializeComponent() { this.tcSettingsConverterCustom.Text = "tcSettingsConverterCustom"; this.tcSettingsConverterCustom.UseVisualStyleBackColor = true; // + // txtSettingsConverterCustomArguments + // + this.txtSettingsConverterCustomArguments.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); + this.txtSettingsConverterCustomArguments.ButtonAlignment = murrty.controls.ButtonAlignment.Left; + this.txtSettingsConverterCustomArguments.ButtonCursor = System.Windows.Forms.Cursors.Default; + this.txtSettingsConverterCustomArguments.ButtonFont = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtSettingsConverterCustomArguments.ButtonImageIndex = -1; + this.txtSettingsConverterCustomArguments.ButtonSize = new System.Drawing.Size(22, 21); + this.txtSettingsConverterCustomArguments.ButtonText = ""; + this.txtSettingsConverterCustomArguments.ButtonTextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.txtSettingsConverterCustomArguments.Location = new System.Drawing.Point(36, 97); + this.txtSettingsConverterCustomArguments.Name = "txtSettingsConverterCustomArguments"; + this.txtSettingsConverterCustomArguments.RegexPatterns = null; + this.txtSettingsConverterCustomArguments.Size = new System.Drawing.Size(228, 22); + this.txtSettingsConverterCustomArguments.TabIndex = 2; + this.tipSettings.SetToolTip(this.txtSettingsConverterCustomArguments, "txtSettingsConverterCustomArguments"); + // // lbSettingsConverterCustomHeader // this.lbSettingsConverterCustomHeader.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); @@ -1515,6 +1716,39 @@ private void InitializeComponent() { this.lbSettingsExtensionsHeader.Text = "lbSettingsExtensionsHeader"; this.lbSettingsExtensionsHeader.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; // + // txtSettingsExtensionsExtensionShort + // + this.txtSettingsExtensionsExtensionShort.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.txtSettingsExtensionsExtensionShort.ButtonAlignment = murrty.controls.ButtonAlignment.Left; + this.txtSettingsExtensionsExtensionShort.ButtonCursor = System.Windows.Forms.Cursors.Default; + this.txtSettingsExtensionsExtensionShort.ButtonFont = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtSettingsExtensionsExtensionShort.ButtonImageIndex = -1; + this.txtSettingsExtensionsExtensionShort.ButtonSize = new System.Drawing.Size(22, 21); + this.txtSettingsExtensionsExtensionShort.ButtonText = ""; + this.txtSettingsExtensionsExtensionShort.ButtonTextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.txtSettingsExtensionsExtensionShort.Location = new System.Drawing.Point(166, 65); + this.txtSettingsExtensionsExtensionShort.Name = "txtSettingsExtensionsExtensionShort"; + this.txtSettingsExtensionsExtensionShort.RegexPatterns = null; + this.txtSettingsExtensionsExtensionShort.Size = new System.Drawing.Size(57, 22); + this.txtSettingsExtensionsExtensionShort.TabIndex = 5; + // + // txtSettingsExtensionsExtensionFullName + // + this.txtSettingsExtensionsExtensionFullName.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.txtSettingsExtensionsExtensionFullName.ButtonAlignment = murrty.controls.ButtonAlignment.Left; + this.txtSettingsExtensionsExtensionFullName.ButtonCursor = System.Windows.Forms.Cursors.Default; + this.txtSettingsExtensionsExtensionFullName.ButtonFont = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtSettingsExtensionsExtensionFullName.ButtonImageIndex = -1; + this.txtSettingsExtensionsExtensionFullName.ButtonSize = new System.Drawing.Size(22, 21); + this.txtSettingsExtensionsExtensionFullName.ButtonText = ""; + this.txtSettingsExtensionsExtensionFullName.ButtonTextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.txtSettingsExtensionsExtensionFullName.Location = new System.Drawing.Point(31, 65); + this.txtSettingsExtensionsExtensionFullName.Name = "txtSettingsExtensionsExtensionFullName"; + this.txtSettingsExtensionsExtensionFullName.RegexPatterns = null; + this.txtSettingsExtensionsExtensionFullName.Size = new System.Drawing.Size(129, 22); + this.txtSettingsExtensionsExtensionFullName.TabIndex = 4; + // // tabSettingsErrors // this.tabSettingsErrors.Controls.Add(this.chkSettingsErrorsSaveErrorsAsErrorLog); @@ -1563,18 +1797,6 @@ private void InitializeComponent() { this.tipSettings.SetToolTip(this.chkSettingsErrorsSuppressErrors, "chkSettingsErrorsSuppressErrors"); this.chkSettingsErrorsSuppressErrors.UseVisualStyleBackColor = true; // - // btnSettingsRedownloadYoutubeDl - // - this.btnSettingsRedownloadYoutubeDl.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.btnSettingsRedownloadYoutubeDl.Location = new System.Drawing.Point(12, 398); - this.btnSettingsRedownloadYoutubeDl.Name = "btnSettingsRedownloadYoutubeDl"; - this.btnSettingsRedownloadYoutubeDl.Size = new System.Drawing.Size(132, 23); - this.btnSettingsRedownloadYoutubeDl.TabIndex = 1; - this.btnSettingsRedownloadYoutubeDl.Text = "btnSettingsRedownloadYoutubeDl"; - this.tipSettings.SetToolTip(this.btnSettingsRedownloadYoutubeDl, "btnSettingsRedownloadYoutubeDl"); - this.btnSettingsRedownloadYoutubeDl.UseVisualStyleBackColor = true; - this.btnSettingsRedownloadYoutubeDl.Click += new System.EventHandler(this.btnSettingsRedownloadYoutubeDl_Click); - // // btnSettingsCancel // this.btnSettingsCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); @@ -1606,187 +1828,6 @@ private void InitializeComponent() { this.tipSettings.ReshowDelay = 100; this.tipSettings.ToolTipIcon = System.Windows.Forms.ToolTipIcon.Info; // - // tabYtdlpExtendedOptions - // - this.tabYtdlpExtendedOptions.Controls.Add(this.chkYtdlpExtendedAutomaticallyDownloadThumbnail); - this.tabYtdlpExtendedOptions.Controls.Add(this.chkYtdlpPreferExtendedDialog); - this.tabYtdlpExtendedOptions.Location = new System.Drawing.Point(4, 22); - this.tabYtdlpExtendedOptions.Name = "tabYtdlpExtendedOptions"; - this.tabYtdlpExtendedOptions.Padding = new System.Windows.Forms.Padding(3); - this.tabYtdlpExtendedOptions.Size = new System.Drawing.Size(300, 197); - this.tabYtdlpExtendedOptions.TabIndex = 6; - this.tabYtdlpExtendedOptions.Text = "tabYtdlpExtendedOptions"; - this.tabYtdlpExtendedOptions.UseVisualStyleBackColor = true; - // - // chkYtdlpPreferExtendedDialog - // - this.chkYtdlpPreferExtendedDialog.AutoSize = true; - this.chkYtdlpPreferExtendedDialog.Location = new System.Drawing.Point(6, 6); - this.chkYtdlpPreferExtendedDialog.Name = "chkYtdlpPreferExtendedDialog"; - this.chkYtdlpPreferExtendedDialog.Size = new System.Drawing.Size(181, 17); - this.chkYtdlpPreferExtendedDialog.TabIndex = 0; - this.chkYtdlpPreferExtendedDialog.Text = "chkYtdlpPreferExtendedDialog"; - this.tipSettings.SetToolTip(this.chkYtdlpPreferExtendedDialog, "chkYtdlpPreferExtendedDialogHint"); - this.chkYtdlpPreferExtendedDialog.UseVisualStyleBackColor = true; - // - // chkYtdlpExtendedAutomaticallyDownloadThumbnail - // - this.chkYtdlpExtendedAutomaticallyDownloadThumbnail.AutoSize = true; - this.chkYtdlpExtendedAutomaticallyDownloadThumbnail.Location = new System.Drawing.Point(6, 29); - this.chkYtdlpExtendedAutomaticallyDownloadThumbnail.Name = "chkYtdlpExtendedAutomaticallyDownloadThumbnail"; - this.chkYtdlpExtendedAutomaticallyDownloadThumbnail.Size = new System.Drawing.Size(295, 17); - this.chkYtdlpExtendedAutomaticallyDownloadThumbnail.TabIndex = 1; - this.chkYtdlpExtendedAutomaticallyDownloadThumbnail.Text = "chkYtdlpExtendedAutomaticallyDownloadThumbnail"; - this.tipSettings.SetToolTip(this.chkYtdlpExtendedAutomaticallyDownloadThumbnail, "chkYtdlpExtendedAutomaticallyDownloadThumbnailHint"); - this.chkYtdlpExtendedAutomaticallyDownloadThumbnail.UseVisualStyleBackColor = true; - // - // txtSettingsGeneralFFmpegPath - // - this.txtSettingsGeneralFFmpegPath.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.txtSettingsGeneralFFmpegPath.ButtonAlignment = murrty.controls.ButtonAlignment.Left; - this.txtSettingsGeneralFFmpegPath.ButtonCursor = System.Windows.Forms.Cursors.Default; - this.txtSettingsGeneralFFmpegPath.ButtonFont = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txtSettingsGeneralFFmpegPath.ButtonImageIndex = -1; - this.txtSettingsGeneralFFmpegPath.ButtonSize = new System.Drawing.Size(22, 21); - this.txtSettingsGeneralFFmpegPath.ButtonText = ""; - this.txtSettingsGeneralFFmpegPath.ButtonTextAlign = System.Drawing.ContentAlignment.MiddleCenter; - this.txtSettingsGeneralFFmpegPath.Location = new System.Drawing.Point(30, 79); - this.txtSettingsGeneralFFmpegPath.Name = "txtSettingsGeneralFFmpegPath"; - this.txtSettingsGeneralFFmpegPath.ReadOnly = true; - this.txtSettingsGeneralFFmpegPath.RegexPatterns = null; - this.txtSettingsGeneralFFmpegPath.Size = new System.Drawing.Size(233, 22); - this.txtSettingsGeneralFFmpegPath.TabIndex = 7; - this.tipSettings.SetToolTip(this.txtSettingsGeneralFFmpegPath, "txtFFmpeg"); - // - // txtSettingsGeneralYoutubeDlPath - // - this.txtSettingsGeneralYoutubeDlPath.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.txtSettingsGeneralYoutubeDlPath.ButtonAlignment = murrty.controls.ButtonAlignment.Left; - this.txtSettingsGeneralYoutubeDlPath.ButtonCursor = System.Windows.Forms.Cursors.Default; - this.txtSettingsGeneralYoutubeDlPath.ButtonFont = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txtSettingsGeneralYoutubeDlPath.ButtonImageIndex = -1; - this.txtSettingsGeneralYoutubeDlPath.ButtonSize = new System.Drawing.Size(22, 21); - this.txtSettingsGeneralYoutubeDlPath.ButtonText = ""; - this.txtSettingsGeneralYoutubeDlPath.ButtonTextAlign = System.Drawing.ContentAlignment.MiddleCenter; - this.txtSettingsGeneralYoutubeDlPath.Location = new System.Drawing.Point(30, 32); - this.txtSettingsGeneralYoutubeDlPath.Name = "txtSettingsGeneralYoutubeDlPath"; - this.txtSettingsGeneralYoutubeDlPath.ReadOnly = true; - this.txtSettingsGeneralYoutubeDlPath.RegexPatterns = null; - this.txtSettingsGeneralYoutubeDlPath.Size = new System.Drawing.Size(233, 22); - this.txtSettingsGeneralYoutubeDlPath.TabIndex = 3; - this.tipSettings.SetToolTip(this.txtSettingsGeneralYoutubeDlPath, "txtYtdl"); - // - // txtSettingsDownloadsProxyPort - // - this.txtSettingsDownloadsProxyPort.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.txtSettingsDownloadsProxyPort.ButtonAlignment = murrty.controls.ButtonAlignment.Left; - this.txtSettingsDownloadsProxyPort.ButtonCursor = System.Windows.Forms.Cursors.Default; - this.txtSettingsDownloadsProxyPort.ButtonFont = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txtSettingsDownloadsProxyPort.ButtonImageIndex = -1; - this.txtSettingsDownloadsProxyPort.ButtonSize = new System.Drawing.Size(22, 21); - this.txtSettingsDownloadsProxyPort.ButtonText = ""; - this.txtSettingsDownloadsProxyPort.ButtonTextAlign = System.Drawing.ContentAlignment.MiddleCenter; - this.txtSettingsDownloadsProxyPort.Location = new System.Drawing.Point(189, 162); - this.txtSettingsDownloadsProxyPort.MaxLength = 5; - this.txtSettingsDownloadsProxyPort.Name = "txtSettingsDownloadsProxyPort"; - this.txtSettingsDownloadsProxyPort.RegexPatterns = null; - this.txtSettingsDownloadsProxyPort.Size = new System.Drawing.Size(44, 22); - this.txtSettingsDownloadsProxyPort.TabIndex = 12; - this.txtSettingsDownloadsProxyPort.TextHint = "12345"; - this.tipSettings.SetToolTip(this.txtSettingsDownloadsProxyPort, "txtSettingsDownloadsProxyPortHint"); - this.txtSettingsDownloadsProxyPort.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.txtSettingsDownloadsProxyPort_KeyPress); - // - // txtSettingsDownloadsProxyIp - // - this.txtSettingsDownloadsProxyIp.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.txtSettingsDownloadsProxyIp.ButtonAlignment = murrty.controls.ButtonAlignment.Left; - this.txtSettingsDownloadsProxyIp.ButtonCursor = System.Windows.Forms.Cursors.Default; - this.txtSettingsDownloadsProxyIp.ButtonFont = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txtSettingsDownloadsProxyIp.ButtonImageIndex = -1; - this.txtSettingsDownloadsProxyIp.ButtonSize = new System.Drawing.Size(22, 21); - this.txtSettingsDownloadsProxyIp.ButtonText = ""; - this.txtSettingsDownloadsProxyIp.ButtonTextAlign = System.Drawing.ContentAlignment.MiddleCenter; - this.txtSettingsDownloadsProxyIp.Location = new System.Drawing.Point(92, 162); - this.txtSettingsDownloadsProxyIp.MaxLength = 15; - this.txtSettingsDownloadsProxyIp.Name = "txtSettingsDownloadsProxyIp"; - this.txtSettingsDownloadsProxyIp.RegexPatterns = null; - this.txtSettingsDownloadsProxyIp.Size = new System.Drawing.Size(89, 22); - this.txtSettingsDownloadsProxyIp.TabIndex = 10; - this.txtSettingsDownloadsProxyIp.TextHint = "255.255.255.255"; - this.tipSettings.SetToolTip(this.txtSettingsDownloadsProxyIp, "txtSettingsDownloadsProxyIpHint"); - this.txtSettingsDownloadsProxyIp.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.txtSettingsDownloadsProxyIp_KeyPress); - // - // txtSettingsDownloadsSavePath - // - this.txtSettingsDownloadsSavePath.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.txtSettingsDownloadsSavePath.ButtonAlignment = murrty.controls.ButtonAlignment.Left; - this.txtSettingsDownloadsSavePath.ButtonCursor = System.Windows.Forms.Cursors.Default; - this.txtSettingsDownloadsSavePath.ButtonFont = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txtSettingsDownloadsSavePath.ButtonImageIndex = -1; - this.txtSettingsDownloadsSavePath.ButtonSize = new System.Drawing.Size(22, 21); - this.txtSettingsDownloadsSavePath.ButtonText = ""; - this.txtSettingsDownloadsSavePath.ButtonTextAlign = System.Drawing.ContentAlignment.MiddleCenter; - this.txtSettingsDownloadsSavePath.Location = new System.Drawing.Point(30, 32); - this.txtSettingsDownloadsSavePath.Name = "txtSettingsDownloadsSavePath"; - this.txtSettingsDownloadsSavePath.ReadOnly = true; - this.txtSettingsDownloadsSavePath.RegexPatterns = null; - this.txtSettingsDownloadsSavePath.Size = new System.Drawing.Size(233, 22); - this.txtSettingsDownloadsSavePath.TabIndex = 2; - this.tipSettings.SetToolTip(this.txtSettingsDownloadsSavePath, "txtSaveto"); - // - // txtSettingsConverterCustomArguments - // - this.txtSettingsConverterCustomArguments.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); - this.txtSettingsConverterCustomArguments.ButtonAlignment = murrty.controls.ButtonAlignment.Left; - this.txtSettingsConverterCustomArguments.ButtonCursor = System.Windows.Forms.Cursors.Default; - this.txtSettingsConverterCustomArguments.ButtonFont = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txtSettingsConverterCustomArguments.ButtonImageIndex = -1; - this.txtSettingsConverterCustomArguments.ButtonSize = new System.Drawing.Size(22, 21); - this.txtSettingsConverterCustomArguments.ButtonText = ""; - this.txtSettingsConverterCustomArguments.ButtonTextAlign = System.Drawing.ContentAlignment.MiddleCenter; - this.txtSettingsConverterCustomArguments.Location = new System.Drawing.Point(36, 97); - this.txtSettingsConverterCustomArguments.Name = "txtSettingsConverterCustomArguments"; - this.txtSettingsConverterCustomArguments.RegexPatterns = null; - this.txtSettingsConverterCustomArguments.Size = new System.Drawing.Size(228, 22); - this.txtSettingsConverterCustomArguments.TabIndex = 2; - this.tipSettings.SetToolTip(this.txtSettingsConverterCustomArguments, "txtSettingsConverterCustomArguments"); - // - // txtSettingsExtensionsExtensionShort - // - this.txtSettingsExtensionsExtensionShort.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.txtSettingsExtensionsExtensionShort.ButtonAlignment = murrty.controls.ButtonAlignment.Left; - this.txtSettingsExtensionsExtensionShort.ButtonCursor = System.Windows.Forms.Cursors.Default; - this.txtSettingsExtensionsExtensionShort.ButtonFont = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txtSettingsExtensionsExtensionShort.ButtonImageIndex = -1; - this.txtSettingsExtensionsExtensionShort.ButtonSize = new System.Drawing.Size(22, 21); - this.txtSettingsExtensionsExtensionShort.ButtonText = ""; - this.txtSettingsExtensionsExtensionShort.ButtonTextAlign = System.Drawing.ContentAlignment.MiddleCenter; - this.txtSettingsExtensionsExtensionShort.Location = new System.Drawing.Point(166, 65); - this.txtSettingsExtensionsExtensionShort.Name = "txtSettingsExtensionsExtensionShort"; - this.txtSettingsExtensionsExtensionShort.RegexPatterns = null; - this.txtSettingsExtensionsExtensionShort.Size = new System.Drawing.Size(57, 22); - this.txtSettingsExtensionsExtensionShort.TabIndex = 5; - // - // txtSettingsExtensionsExtensionFullName - // - this.txtSettingsExtensionsExtensionFullName.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.txtSettingsExtensionsExtensionFullName.ButtonAlignment = murrty.controls.ButtonAlignment.Left; - this.txtSettingsExtensionsExtensionFullName.ButtonCursor = System.Windows.Forms.Cursors.Default; - this.txtSettingsExtensionsExtensionFullName.ButtonFont = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txtSettingsExtensionsExtensionFullName.ButtonImageIndex = -1; - this.txtSettingsExtensionsExtensionFullName.ButtonSize = new System.Drawing.Size(22, 21); - this.txtSettingsExtensionsExtensionFullName.ButtonText = ""; - this.txtSettingsExtensionsExtensionFullName.ButtonTextAlign = System.Drawing.ContentAlignment.MiddleCenter; - this.txtSettingsExtensionsExtensionFullName.Location = new System.Drawing.Point(31, 65); - this.txtSettingsExtensionsExtensionFullName.Name = "txtSettingsExtensionsExtensionFullName"; - this.txtSettingsExtensionsExtensionFullName.RegexPatterns = null; - this.txtSettingsExtensionsExtensionFullName.Size = new System.Drawing.Size(129, 22); - this.txtSettingsExtensionsExtensionFullName.TabIndex = 4; - // // frmSettings // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); @@ -1795,7 +1836,6 @@ private void InitializeComponent() { this.Controls.Add(this.btnSettingsSave); this.Controls.Add(this.btnSettingsCancel); this.Controls.Add(this.tcMain); - this.Controls.Add(this.btnSettingsRedownloadYoutubeDl); this.Icon = global::youtube_dl_gui.Properties.Resources.ProgramIcon; this.MaximizeBox = false; this.MinimumSize = new System.Drawing.Size(346, 470); @@ -1810,6 +1850,11 @@ private void InitializeComponent() { this.tabSettingsGeneral.PerformLayout(); this.gbSettingsGeneralCustomArguments.ResumeLayout(false); this.gbSettingsGeneralCustomArguments.PerformLayout(); + this.tcExternalApplications.ResumeLayout(false); + this.tabSettingsGeneralYoutubeDl.ResumeLayout(false); + this.tabSettingsGeneralYoutubeDl.PerformLayout(); + this.tabSettingsGeneralFfmpeg.ResumeLayout(false); + this.tabSettingsGeneralFfmpeg.PerformLayout(); this.tabSettingsDownloads.ResumeLayout(false); this.tabSettingsDownloads.PerformLayout(); this.tabDownloads.ResumeLayout(false); @@ -1827,6 +1872,8 @@ private void InitializeComponent() { this.tabDownloadsUpdating.PerformLayout(); this.tabDownloadsBatch.ResumeLayout(false); this.tabDownloadsBatch.PerformLayout(); + this.tabYtdlpExtendedOptions.ResumeLayout(false); + this.tabYtdlpExtendedOptions.PerformLayout(); this.tabSettingsConverter.ResumeLayout(false); this.tabSettingsConverter.PerformLayout(); this.tcConverter.ResumeLayout(false); @@ -1843,8 +1890,6 @@ private void InitializeComponent() { this.tabSettingsExtensions.PerformLayout(); this.tabSettingsErrors.ResumeLayout(false); this.tabSettingsErrors.PerformLayout(); - this.tabYtdlpExtendedOptions.ResumeLayout(false); - this.tabYtdlpExtendedOptions.PerformLayout(); this.ResumeLayout(false); } @@ -1853,7 +1898,6 @@ private void InitializeComponent() { private System.Windows.Forms.TabControl tcMain; private System.Windows.Forms.TabPage tabSettingsGeneral; - private System.Windows.Forms.Label lbSepGeneral; private System.Windows.Forms.Button btnSettingsGeneralBrowseFFmpeg; private System.Windows.Forms.Button btnSettingsGeneralBrowseYoutubeDl; private System.Windows.Forms.CheckBox chkSettingsGeneralUseStaticYoutubeDl; @@ -1975,5 +2019,9 @@ private void InitializeComponent() { private System.Windows.Forms.TabPage tabYtdlpExtendedOptions; private System.Windows.Forms.CheckBox chkYtdlpExtendedAutomaticallyDownloadThumbnail; private System.Windows.Forms.CheckBox chkYtdlpPreferExtendedDialog; + private System.Windows.Forms.TabControl tcExternalApplications; + private System.Windows.Forms.TabPage tabSettingsGeneralYoutubeDl; + private System.Windows.Forms.TabPage tabSettingsGeneralFfmpeg; + private System.Windows.Forms.Button btnSettingsRedownloadFfmpeg; } } \ No newline at end of file diff --git a/youtube-dl-gui/Forms/frmSettings.cs b/youtube-dl-gui/Forms/frmSettings.cs index dd74b9f2..696b5a6c 100644 --- a/youtube-dl-gui/Forms/frmSettings.cs +++ b/youtube-dl-gui/Forms/frmSettings.cs @@ -47,8 +47,6 @@ private void frmSettings_FormClosing(object sender, FormClosingEventArgs e) { private void LoadLanguage() { this.Text = Language.frmSettings; - btnSettingsRedownloadYoutubeDl.Text = Language.btnSettingsRedownloadYoutubeDl; - tipSettings.SetToolTip(btnSettingsRedownloadYoutubeDl, Language.btnSettingsRedownloadYoutubeDlHint); btnSettingsCancel.Text = Language.GenericCancel; tipSettings.SetToolTip(btnSettingsCancel, Language.btnSettingsCancelHint); btnSettingsSave.Text = Language.GenericSave; @@ -60,6 +58,8 @@ private void LoadLanguage() { tabSettingsExtensions.Text = Language.tabSettingsExtensions; tabSettingsErrors.Text = Language.tabSettingsErrors; + tabSettingsGeneralYoutubeDl.Text = Language.tabSettingsGeneralYoutubeDl; + tabSettingsGeneralFfmpeg.Text = Language.tabSettingsGeneralFfmpeg; lbSettingsGeneralYoutubeDlPath.Text = Language.lbSettingsGeneralYoutubeDlPath; tipSettings.SetToolTip(lbSettingsGeneralYoutubeDlPath, Language.lbSettingsGeneralYoutubeDlPathHint); chkSettingsGeneralUseStaticYoutubeDl.Text = Language.chkSettingsGeneralUseStaticYoutubeDl; @@ -72,6 +72,10 @@ private void LoadLanguage() { tipSettings.SetToolTip(chkSettingsGeneralUseStaticFFmpeg, Language.chkSettingsGeneralUseStaticFFmpegHint); tipSettings.SetToolTip(txtSettingsGeneralFFmpegPath, Language.txtSettingsGeneralFFmpegPathHint); tipSettings.SetToolTip(btnSettingsGeneralBrowseFFmpeg, Language.btnSettingsGeneralBrowseFFmpegHint); + btnSettingsRedownloadYoutubeDl.Text = Language.btnSettingsRedownloadYoutubeDl; + tipSettings.SetToolTip(btnSettingsRedownloadYoutubeDl, Language.btnSettingsRedownloadYoutubeDlHint); + btnSettingsRedownloadFfmpeg.Text = Language.btnSettingsRedownloadFfmpeg; + tipSettings.SetToolTip(btnSettingsRedownloadFfmpeg, Language.btnSettingsRedownloadFfmpegHint); chkSettingsGeneralCheckForUpdatesOnLaunch.Text = Language.chkSettingsGeneralCheckForUpdatesOnLaunch; tipSettings.SetToolTip(chkSettingsGeneralCheckForUpdatesOnLaunch, Language.chkSettingsGeneralCheckForUpdatesOnLaunchHint); chkSettingsGeneralCheckForBetaUpdates.Text = Language.chkSettingsGeneralCheckForBetaUpdates; @@ -569,28 +573,6 @@ private void saveSettings() { } } - private void btnSettingsRedownloadYoutubeDl_Click(object sender, EventArgs e) { - YtdlUpdateCheck = new(() => { - if (updater.UpdateChecker.CheckForYoutubeDlUpdate(true)) { - if (updater.UpdateChecker.UpdateYoutubeDl()) { - this.BeginInvoke(() => MessageBox.Show(Language.dlgUpdatedYoutubeDl, Language.ApplicationName, MessageBoxButtons.OK)); - System.Media.SystemSounds.Asterisk.Play(); - } - else { - System.Media.SystemSounds.Hand.Play(); - } - } - else { - this.BeginInvoke((Action)delegate { - MessageBox.Show(string.Format(Language.dlgUpateYoutubeDlNoUpdateRequired, Verification.YoutubeDlVersion, updater.UpdateChecker.LatestYoutubeDl.VersionTag), Language.ApplicationName, MessageBoxButtons.OK); - }); - } - }) { - IsBackground = true - }; - YtdlUpdateCheck.Start(); - } - private void btnSettingsSave_Click(object sender, EventArgs e) { saveSettings(); this.Dispose(); @@ -606,16 +588,11 @@ private void btnSettingsCancel_Click(object sender, EventArgs e) { private void chkSettingsGeneralUseStaticYoutubeDl_CheckedChanged(object sender, EventArgs e) { Config.Settings.General.UseStaticYtdl = chkSettingsGeneralUseStaticYoutubeDl.Checked; } - - private void chkSettingsGeneralUseStaticFFmpeg_CheckedChanged(object sender, EventArgs e) { - Config.Settings.General.UseStaticFFmpeg = chkSettingsGeneralUseStaticFFmpeg.Checked; - } - private void btnSettingsGeneralBrowseYoutubeDl_Click(object sender, EventArgs e) { using OpenFileDialog ofd = new() { Title = Language.ofdTitleYoutubeDl, Filter = Language.ofdFilterYoutubeDl + " (*.EXE)|*.exe", - FileName = "youtube-dl.exe" + FileName = "yt-dlp.exe" }; if (ofd.ShowDialog() == DialogResult.OK) { @@ -623,6 +600,9 @@ private void btnSettingsGeneralBrowseYoutubeDl_Click(object sender, EventArgs e) } } + private void chkSettingsGeneralUseStaticFFmpeg_CheckedChanged(object sender, EventArgs e) { + Config.Settings.General.UseStaticFFmpeg = chkSettingsGeneralUseStaticFFmpeg.Checked; + } private void btnSettingsGeneralBrowseFFmpeg_Click(object sender, EventArgs e) { using OpenFileDialog ofd = new() { Title = Language.ofdTitleFFmpeg, @@ -635,6 +615,31 @@ private void btnSettingsGeneralBrowseFFmpeg_Click(object sender, EventArgs e) { txtSettingsGeneralFFmpegPath.Text = ofd.FileName; } } + + private void btnSettingsRedownloadYoutubeDl_Click(object sender, EventArgs e) { + YtdlUpdateCheck = new(() => { + if (updater.UpdateChecker.CheckForYoutubeDlUpdate(true)) { + if (updater.UpdateChecker.UpdateYoutubeDl(new(this.Location.X + 8, this.Location.Y + 8))) { + this.BeginInvoke(() => MessageBox.Show(Language.dlgUpdatedYoutubeDl, Language.ApplicationName, MessageBoxButtons.OK)); + System.Media.SystemSounds.Asterisk.Play(); + } + else { + System.Media.SystemSounds.Hand.Play(); + } + } + else { + this.BeginInvoke((Action)delegate { + MessageBox.Show(string.Format(Language.dlgUpateYoutubeDlNoUpdateRequired, Verification.YoutubeDlVersion, updater.UpdateChecker.LatestYoutubeDl.VersionTag), Language.ApplicationName, MessageBoxButtons.OK); + }); + } + }) { + IsBackground = true + }; + YtdlUpdateCheck.Start(); + } + private void btnSettingsRedownloadFfmpeg_Click(object sender, EventArgs e) { + updater.UpdateChecker.UpdateFfmpeg(new(this.Location.X + 8, this.Location.Y + 8)); + } #endregion #region Downloads diff --git a/youtube-dl-gui/Program.cs b/youtube-dl-gui/Program.cs index 246606b7..722a6d8d 100644 --- a/youtube-dl-gui/Program.cs +++ b/youtube-dl-gui/Program.cs @@ -13,7 +13,7 @@ internal static class Program { /// /// Gets the curent version of the program. /// - public static Version CurrentVersion { get; } = new(3, 0, 0, 5); + public static Version CurrentVersion { get; } = new(3, 0, 0, 6); /// /// Gets whether the program is running in debug mode. @@ -137,26 +137,31 @@ public static int Main(string[] args) { return 1; } - if (MessageBox.Show(Language.dlgFirstTimeInitialMessage, "youtube-dl-gui", MessageBoxButtons.YesNo) == DialogResult.Yes) { - Config.Settings.Initialization.firstTime = false; - Config.Settings.Downloads.downloadPath = - Environment.GetFolderPath(Environment.SpecialFolder.UserProfile) + "\\Downloads\\youtube-dl"; - - if (MessageBox.Show(Language.dlgFirstTimeDownloadFolder, "youtube-dl-gui", MessageBoxButtons.YesNo) == DialogResult.Yes) { - using BetterFolderBrowserNS.BetterFolderBrowser fbd = new(); - fbd.Title = Language.dlgFindDownloadFolder; - fbd.RootFolder = Config.Settings.Downloads.downloadPath; - if (fbd.ShowDialog() == DialogResult.OK) { - Config.Settings.Downloads.downloadPath = fbd.SelectedPath; - } + if (MessageBox.Show(Language.dlgFirstTimeInitialMessage, Language.ApplicationName, MessageBoxButtons.YesNo) != DialogResult.Yes) + return 1; + + Config.Settings.Initialization.firstTime = false; + Config.Settings.Downloads.downloadPath = + Environment.GetFolderPath(Environment.SpecialFolder.UserProfile) + "\\Downloads\\youtube-dl"; + + if (MessageBox.Show(Language.dlgFirstTimeDownloadFolder, Language.ApplicationName, MessageBoxButtons.YesNo) == DialogResult.Yes) { + using BetterFolderBrowserNS.BetterFolderBrowser fbd = new(); + fbd.Title = Language.dlgFindDownloadFolder; + fbd.RootFolder = Config.Settings.Downloads.downloadPath; + if (fbd.ShowDialog() == DialogResult.OK) { + Config.Settings.Downloads.downloadPath = fbd.SelectedPath; } + } + + if (MessageBox.Show(Language.dlgFirstTimeDownloadYoutubeDl, Language.ApplicationName, MessageBoxButtons.YesNo) == DialogResult.Yes) { - Config.Settings.Initialization.Save(); - Config.Settings.Downloads.Save(); } - else { - return 1; + if (MessageBox.Show(Language.dlgFirstTimeDownloadFfmpeg, Language.ApplicationName, MessageBoxButtons.YesNo) == DialogResult.Yes) { + } + + Config.Settings.Initialization.Save(); + Config.Settings.Downloads.Save(); } else { Config.Settings.Load(ConfigType.All); @@ -179,7 +184,7 @@ public static int Main(string[] args) { } } else { - nint hwnd = CopyData.FindWindow(null, "youtube-dl-gui"); + nint hwnd = CopyData.FindWindow(null, Language.ApplicationName); if (hwnd == 0) { if (args.Length > 0) { SentData Data = new() { @@ -236,21 +241,26 @@ private static void AwaitActions() { Thread.Sleep(5000); } - internal static void KillProcessTree(uint ProcessId, bool KillParent = false) { + internal static void KillProcessTree(uint ProcessId) { ManagementObjectSearcher searcher = new("SELECT * FROM Win32_Process WHERE ParentProcessId=" + ProcessId); ManagementObjectCollection collection = searcher.Get(); if (collection.Count > 0) { foreach (var proc in collection) { uint id = (uint)proc["ProcessID"]; if ((int)id != ProcessId) { - Process.GetProcessById((int)id).Kill(); + try { + KillProcessTree(id); + Process.GetProcessById((int)id).Kill(); + } + catch (ArgumentException) { + // Not running? + } + catch (Exception ex) { + Log.ReportException(ex); + } } } } - - if (KillParent) { - Process.GetProcessById((int)ProcessId).Kill(); - } } internal static bool CheckArgs(string[] args, bool UseDialog) { @@ -268,7 +278,7 @@ internal static bool CheckArgs(string[] args, bool UseDialog) { if (++i >= args.Length) return false; - frmExtendedDownload ExtendedDownload = new(args[i]); + frmExtendedDownload ExtendedDownload = new(args[i], false); if (UseDialog) { ExtendedDownload.ShowDialog(); } @@ -283,34 +293,19 @@ internal static bool CheckArgs(string[] args, bool UseDialog) { if (++i >= args.Length) return false; - switch (Config.Settings.Downloads.YtdlType) { - case 0 when Config.Settings.Downloads.ExtendedDownloaderPreferExtendedForm: - case 2 when Config.Settings.Downloads.ExtendedDownloaderPreferExtendedForm: { - frmExtendedDownload ExtendedDownload = new(args[i]); - if (UseDialog) { - ExtendedDownload.ShowDialog(); - } - else { - ExtendedDownload.Show(); - } - } break; - - default: { - DownloadInfo NewVideo = new() { - DownloadURL = args[i], - Type = DownloadType.Video, - VideoQuality = (VideoQualityType)Config.Settings.Saved.videoQuality - }; - frmDownloader VideoDownloader = new(NewVideo); - if (UseDialog) { - VideoDownloader.ShowDialog(); - } - else { - VideoDownloader.Show(); - } - PassedCount++; - } break; + DownloadInfo NewVideo = new() { + DownloadURL = args[i], + Type = DownloadType.Video, + VideoQuality = (VideoQualityType)Config.Settings.Saved.videoQuality + }; + frmDownloader VideoDownloader = new(NewVideo); + if (UseDialog) { + VideoDownloader.ShowDialog(); } + else { + VideoDownloader.Show(); + } + PassedCount++; } break; @@ -318,34 +313,25 @@ internal static bool CheckArgs(string[] args, bool UseDialog) { if (++i >= args.Length) return false; - switch (Config.Settings.Downloads.YtdlType) { - case 0 when Config.Settings.Downloads.ExtendedDownloaderPreferExtendedForm: - case 2 when Config.Settings.Downloads.ExtendedDownloaderPreferExtendedForm: { - - } break; - - default: { - DownloadInfo NewAudio = new() { - DownloadURL = args[i], - Type = DownloadType.Audio - }; - if (Config.Settings.Downloads.AudioDownloadAsVBR) { - NewAudio.AudioVBRQuality = (AudioVBRQualityType)Config.Settings.Saved.audioQuality; - } - else { - NewAudio.AudioCBRQuality = (AudioCBRQualityType)Config.Settings.Saved.audioQuality; - } - - frmDownloader AudioDownloader = new(NewAudio); - if (UseDialog) { - AudioDownloader.ShowDialog(); - } - else { - AudioDownloader.Show(); - } - PassedCount++; - } break; + DownloadInfo NewAudio = new() { + DownloadURL = args[i], + Type = DownloadType.Audio + }; + if (Config.Settings.Downloads.AudioDownloadAsVBR) { + NewAudio.AudioVBRQuality = (AudioVBRQualityType)Config.Settings.Saved.audioQuality; + } + else { + NewAudio.AudioCBRQuality = (AudioCBRQualityType)Config.Settings.Saved.audioQuality; + } + + frmDownloader AudioDownloader = new(NewAudio); + if (UseDialog) { + AudioDownloader.ShowDialog(); + } + else { + AudioDownloader.Show(); } + PassedCount++; } break; } } break; diff --git a/youtube-dl-gui/Resources/BuildDate.txt b/youtube-dl-gui/Resources/BuildDate.txt index 5958d41d..b16b9dfa 100644 --- a/youtube-dl-gui/Resources/BuildDate.txt +++ b/youtube-dl-gui/Resources/BuildDate.txt @@ -1 +1 @@ -2022-09-10 \ No newline at end of file +2022-09-12 \ No newline at end of file diff --git a/youtube-dl-gui/Resources/youtube-dl-gui-updater.exe b/youtube-dl-gui/Resources/youtube-dl-gui-updater.exe index 8de822a8..3600d0a3 100644 Binary files a/youtube-dl-gui/Resources/youtube-dl-gui-updater.exe and b/youtube-dl-gui/Resources/youtube-dl-gui-updater.exe differ diff --git a/youtube-dl-gui/Updater/GitID.cs b/youtube-dl-gui/Updater/GitID.cs index c2ac97e9..05a6e6bc 100644 --- a/youtube-dl-gui/Updater/GitID.cs +++ b/youtube-dl-gui/Updater/GitID.cs @@ -1,7 +1,7 @@ namespace youtube_dl_gui.updater; public enum GitID : int { - YoutubeDl = 0, - YoutubeDlc = 1, - YoutubeDlp = 2 + YtDlp = 0, + YoutubeDl = 1, + YoutubeDlc = 2, } \ No newline at end of file diff --git a/youtube-dl-gui/Updater/GithubLinks.cs b/youtube-dl-gui/Updater/GithubLinks.cs index 555019f9..b1935de0 100644 --- a/youtube-dl-gui/Updater/GithubLinks.cs +++ b/youtube-dl-gui/Updater/GithubLinks.cs @@ -8,6 +8,6 @@ internal static class GithubLinks { public const string GithubAllReleasesJson = "https://api.github.com/repos/{0}/{1}/releases"; public const string ApplicationDownloadUrl = "https://github.com/{0}/{1}/releases/download/{2}/{1}.exe"; - public static readonly string[] Users = { "ytdl-org", "blackjack4494", "yt-dlp" }; - public static readonly string[] Repos = { "youtube-dl", "youtube-dlc", "yt-dlp" }; + public static readonly string[] Users = { "yt-dlp", "ytdl-org", "blackjack4494" }; + public static readonly string[] Repos = { "yt-dlp", "youtube-dl", "youtube-dlc" }; } \ No newline at end of file diff --git a/youtube-dl-gui/Updater/UpdateChecker.cs b/youtube-dl-gui/Updater/UpdateChecker.cs index 2d103e9e..74b04bf1 100644 --- a/youtube-dl-gui/Updater/UpdateChecker.cs +++ b/youtube-dl-gui/Updater/UpdateChecker.cs @@ -1,8 +1,10 @@ using System.Diagnostics; using System.IO; +using System.IO.Compression; using System.Net; using System.Threading; using System.Windows.Forms; +using System.Xml.Linq; namespace youtube_dl_gui { internal class UpdateChecker { @@ -52,6 +54,7 @@ namespace youtube_dl_gui.updater { internal class UpdateChecker { private const string KnownUpdaterHash = "6C3DE407491C863019280E7FE99BEA3CC1572B31B1A0AB04421876ABBDABF527"; + private const string FfmpegDownloadLink = "https://www.gyan.dev/ffmpeg/builds/ffmpeg-release-essentials.zip"; public static GithubData LastChecked { get; private set; } public static GithubData LastCheckedLatestRelease { get; private set; } public static GithubData LastCheckedAllRelease { get; private set; } @@ -97,7 +100,7 @@ public static void UpdateApplication() { File.WriteAllBytes(Environment.CurrentDirectory + "\\youtube-dl-gui-updater.exe", Properties.Resources.youtube_dl_gui_updater); // Sanity check the updater. - if (Program.CalculateSha256Hash(Environment.CurrentDirectory + "\\youtube-dl-gui-updater.exe") != KnownUpdaterHash.ToLowerInvariant() && MessageBox.Show(Language.dlgUpdaterHashNoMatch, "youtube-dl-gui", MessageBoxButtons.YesNo, MessageBoxIcon.Warning) == DialogResult.No) { + if (Program.CalculateSha256Hash(Environment.CurrentDirectory + "\\youtube-dl-gui-updater.exe") != KnownUpdaterHash.ToLowerInvariant() && MessageBox.Show(Language.dlgUpdaterHashNoMatch, Language.ApplicationName, MessageBoxButtons.YesNo, MessageBoxIcon.Warning) == DialogResult.No) { File.Delete(Environment.CurrentDirectory + "\\youtube-dl-gui-updater.exe"); return; } @@ -138,9 +141,9 @@ public static bool CheckForYoutubeDlUpdate(bool ForceCheck = false) { } else { string FileName = $"{Program.ProgramPath}\\" + Config.Settings.Downloads.YtdlType switch { - 1 => "youtube-dlc.exe", - 2 => "yt-dlp.exe", - _ => "youtube-dl.exe" + 1 => "youtube-dl.exe", + 2 => "youtube-dlc.exe", + _ => "yt-dlp.exe", }; if (File.Exists(FileName)) { @@ -148,7 +151,7 @@ public static bool CheckForYoutubeDlUpdate(bool ForceCheck = false) { FileName = null; } else { - MessageBox.Show(Language.dlgUpdateNoValidYoutubeDl, "youtube-dl-gui"); + MessageBox.Show(Language.dlgUpdateNoValidYoutubeDl, Language.ApplicationName); return false; } } @@ -195,7 +198,7 @@ public static bool CheckForYoutubeDlUpdate(bool ForceCheck = false) { /// /// Updates youtube-dl (or a fork) to their latest release. /// - public static bool UpdateYoutubeDl() { + public static bool UpdateYoutubeDl(System.Drawing.Point? Location) { if (Config.Settings.Downloads.useYtdlUpdater && (Config.Settings.General.UseStaticYtdl && !string.IsNullOrEmpty(Config.Settings.General.ytdlPath) && File.Exists(Config.Settings.General.ytdlPath) || File.Exists(Verification.YoutubeDlPath))) { Process UpdateYoutubeDl = new(); @@ -206,16 +209,16 @@ public static bool UpdateYoutubeDl() { } else { string FileName = $"{Program.ProgramPath}\\" + Config.Settings.Downloads.YtdlType switch { - 1 => "youtube-dlc.exe", - 2 => "yt-dlp.exe", - _ => "youtube-dl.exe" + 1 => "youtube-dl.exe", + 2 => "youtube-dlc.exe", + _ => "yt-dlp.exe", }; if (File.Exists(FileName)) { UpdateYoutubeDl.StartInfo.FileName = FileName; } else { - MessageBox.Show(Language.dlgUpdateNoValidYoutubeDl, "youtube-dl-gui"); + MessageBox.Show(Language.dlgUpdateNoValidYoutubeDl, Language.ApplicationName); return false; } } @@ -238,33 +241,16 @@ public static bool UpdateYoutubeDl() { string FullSavePath = Config.Settings.General.UseStaticYtdl && !string.IsNullOrEmpty(Config.Settings.General.ytdlPath) ? Config.Settings.General.ytdlPath : Program.ProgramPath + TypeIndex switch { - 1 => "\\youtube-dlc.exe", - 2 => "\\yt-dlp.exe", - _ => "\\youtube-dl.exe", + 1 => "\\youtube-dl.exe", + 2 => "\\youtube-dlc.exe", + _ => "\\yt-dlp.exe", }; - using WebClient wc = new(); - wc.Headers.Add("User-Agent", Program.UserAgent); - - try { - wc.DownloadFile(DownloadUrl, FullSavePath); - } - catch (WebException webex) { - Log.ReportException( - webex, - string.Format( - GithubLinks.ApplicationDownloadUrl, - GithubLinks.Users[TypeIndex], - GithubLinks.Repos[TypeIndex], - LatestYoutubeDl.VersionTag - ) - ); - } - catch (ThreadAbortException) { return false; } - catch (Exception ex) { - Log.ReportException(ex); + using frmGenericDownloadProgress Downloader = Location is not null ? + new(DownloadUrl, FullSavePath, Location.Value) : new(DownloadUrl, FullSavePath); + if (Downloader.ShowDialog() != DialogResult.OK) return false; - } + } else { return false; @@ -275,6 +261,53 @@ public static bool UpdateYoutubeDl() { return true; } + /// + /// Updates ffmpeg. + /// + /// if it was updated; otherwise, . + public static bool UpdateFfmpeg(System.Drawing.Point? Location) { + // Download the zip file. + string FfmpegZipPath = Environment.CurrentDirectory + "\\ffmpeg.zip"; + + using frmGenericDownloadProgress Downloader = + Location is not null ? new(FfmpegDownloadLink, FfmpegZipPath, Location.Value) : new(FfmpegDownloadLink, FfmpegZipPath); + if (Downloader.ShowDialog() != DialogResult.OK) + return false; + + bool CanRetry = true; + do { + try { + string FfmpegPath = Verification.FFmpegPath is null ? Environment.CurrentDirectory : Path.GetDirectoryName(Verification.FFmpegPath); + using ZipArchive archive = ZipFile.OpenRead(FfmpegZipPath); + ZipArchiveEntry[] Files = archive.Entries + .Where(e => e.Name.ToLower() switch { + "ffmpeg.exe" or "ffprobe.exe" => true, + _ => false + }) + .ToArray(); + + if (Files.Length > 0) { + for (int i = 0; i < Files.Length; i++) + Files[i].ExtractToFile($"{FfmpegPath}\\{Files[i].Name}", true); + } + else return false; + + CanRetry = false; + } + catch (Exception ex) { + if (Log.ReportRetriableException(ex) != DialogResult.Retry) { + CanRetry = false; + return false; + } + } + } while (CanRetry); + + // Delete the zip file. + File.Delete(FfmpegZipPath); + Verification.RefreshFFmpegLocation(); + return true; + } + public static GithubRepoContent[] GetAvailableLanguages() { string Url = "https://api.github.com/repos/murrty/youtube-dl-gui/contents/Languages"; var AvailableLanguages = GetJSON(Url).JsonDeserialize(); @@ -300,7 +333,7 @@ public static string GetJSON(string Url) { private static void RefreshRelease(Version oldVersion, bool PreReleases) { try { string Json = GetJSON( - string.Format(PreReleases ? GithubLinks.GithubAllReleasesJson : GithubLinks.GithubLatestJson, "murrty", "youtube-dl-gui")); + string.Format(PreReleases ? GithubLinks.GithubAllReleasesJson : GithubLinks.GithubLatestJson, "murrty", Language.ApplicationName)); if (string.IsNullOrWhiteSpace(Json)) throw new InvalidOperationException("JSON downloaded was empty"); GithubData CurrentCheck = null; diff --git a/youtube-dl-gui/youtube-dl-gui.csproj b/youtube-dl-gui/youtube-dl-gui.csproj index 5e1d2989..1919226a 100644 --- a/youtube-dl-gui/youtube-dl-gui.csproj +++ b/youtube-dl-gui/youtube-dl-gui.csproj @@ -61,7 +61,10 @@ + + + @@ -106,7 +109,14 @@ frmArchiveDownloader.cs + + Form + + + frmGenericDownloadProgress.cs + + @@ -310,6 +320,9 @@ frmDownloadLanguage.cs + + frmGenericDownloadProgress.cs + frmException.cs