diff --git a/ShareX.UploadersLib/FileUploaders/GfycatUploader.cs b/ShareX.UploadersLib/FileUploaders/GfycatUploader.cs index 46da15eb1..069394463 100644 --- a/ShareX.UploadersLib/FileUploaders/GfycatUploader.cs +++ b/ShareX.UploadersLib/FileUploaders/GfycatUploader.cs @@ -59,7 +59,8 @@ public override GenericUploader CreateUploader(UploadersConfig config, TaskRefer return new GfycatUploader(config.GfycatOAuth2Info) { UploadMethod = config.GfycatAccountType, - Private = !config.GfycatIsPublic + Private = !config.GfycatIsPublic, + KeepAudio = config.GfycatKeepAudio }; } @@ -111,7 +112,7 @@ public bool GetAccessToken(string code) client_secret = AuthInfo.Client_Secret, grant_type = "authorization_code", redirect_uri = Links.URL_CALLBACK, - code = code, + code = code }); string response = SendRequest(HttpMethod.POST, URL_API_TOKEN, request, UploadHelpers.ContentTypeJSON); @@ -140,7 +141,7 @@ public bool RefreshAccessToken() refresh_token = AuthInfo.Token.refresh_token, client_id = AuthInfo.Client_ID, client_secret = AuthInfo.Client_Secret, - grant_type = "refresh", + grant_type = "refresh" }); string response = SendRequest(HttpMethod.POST, URL_API_TOKEN, request, UploadHelpers.ContentTypeJSON); diff --git a/ShareX.UploadersLib/Forms/UploadersConfigForm.Designer.cs b/ShareX.UploadersLib/Forms/UploadersConfigForm.Designer.cs index d86700af8..225d86193 100644 --- a/ShareX.UploadersLib/Forms/UploadersConfigForm.Designer.cs +++ b/ShareX.UploadersLib/Forms/UploadersConfigForm.Designer.cs @@ -367,6 +367,9 @@ private void InitializeComponent() this.lblLambdaUploadURL = new System.Windows.Forms.Label(); this.cbLambdaUploadURL = new System.Windows.Forms.ComboBox(); this.tpTeknik = new System.Windows.Forms.TabPage(); + this.nudTeknikExpirationLength = new System.Windows.Forms.NumericUpDown(); + this.cbTeknikExpirationUnit = new System.Windows.Forms.ComboBox(); + this.lblTeknikExpiration = new System.Windows.Forms.Label(); this.lblTeknikUrlShortenerAPIUrl = new System.Windows.Forms.Label(); this.tbTeknikUrlShortenerAPIUrl = new System.Windows.Forms.TextBox(); this.lblTeknikPasteAPIUrl = new System.Windows.Forms.Label(); @@ -631,9 +634,7 @@ private void InitializeComponent() this.lblWidthHint = new System.Windows.Forms.Label(); this.ttlvMain = new ShareX.HelpersLib.TabToListView(); this.actRapidShareAccountType = new ShareX.UploadersLib.AccountTypeControl(); - this.lblTeknikExpiration = new System.Windows.Forms.Label(); - this.cbTeknikExpirationUnit = new System.Windows.Forms.ComboBox(); - this.nudTeknikExpirationLength = new System.Windows.Forms.NumericUpDown(); + this.cbGfycatKeepAudio = new System.Windows.Forms.CheckBox(); this.tpOtherUploaders.SuspendLayout(); this.tcOtherUploaders.SuspendLayout(); this.tpTwitter.SuspendLayout(); @@ -677,6 +678,7 @@ private void InitializeComponent() this.gbJiraServer.SuspendLayout(); this.tpLambda.SuspendLayout(); this.tpTeknik.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.nudTeknikExpirationLength)).BeginInit(); this.tpPomf.SuspendLayout(); this.tpSeafile.SuspendLayout(); this.grpSeafileShareSettings.SuspendLayout(); @@ -717,7 +719,6 @@ private void InitializeComponent() this.tpChevereto.SuspendLayout(); this.tpVgyme.SuspendLayout(); this.tcUploaders.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.nudTeknikExpirationLength)).BeginInit(); this.SuspendLayout(); // // txtRapidSharePremiumUserName @@ -2425,6 +2426,7 @@ private void InitializeComponent() // tpGfycat // this.tpGfycat.BackColor = System.Drawing.SystemColors.Window; + this.tpGfycat.Controls.Add(this.cbGfycatKeepAudio); this.tpGfycat.Controls.Add(this.cbGfycatIsPublic); this.tpGfycat.Controls.Add(this.atcGfycatAccountType); this.tpGfycat.Controls.Add(this.oauth2Gfycat); @@ -3023,6 +3025,30 @@ private void InitializeComponent() resources.ApplyResources(this.tpTeknik, "tpTeknik"); this.tpTeknik.Name = "tpTeknik"; // + // nudTeknikExpirationLength + // + resources.ApplyResources(this.nudTeknikExpirationLength, "nudTeknikExpirationLength"); + this.nudTeknikExpirationLength.Maximum = new decimal(new int[] { + 10000, + 0, + 0, + 0}); + this.nudTeknikExpirationLength.Name = "nudTeknikExpirationLength"; + this.nudTeknikExpirationLength.ValueChanged += new System.EventHandler(this.nudTeknikExpirationLength_ValueChanged); + // + // cbTeknikExpirationUnit + // + this.cbTeknikExpirationUnit.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.cbTeknikExpirationUnit.FormattingEnabled = true; + resources.ApplyResources(this.cbTeknikExpirationUnit, "cbTeknikExpirationUnit"); + this.cbTeknikExpirationUnit.Name = "cbTeknikExpirationUnit"; + this.cbTeknikExpirationUnit.SelectedIndexChanged += new System.EventHandler(this.cbTeknikExpirationUnit_SelectedIndexChanged); + // + // lblTeknikExpiration + // + resources.ApplyResources(this.lblTeknikExpiration, "lblTeknikExpiration"); + this.lblTeknikExpiration.Name = "lblTeknikExpiration"; + // // lblTeknikUrlShortenerAPIUrl // resources.ApplyResources(this.lblTeknikUrlShortenerAPIUrl, "lblTeknikUrlShortenerAPIUrl"); @@ -4941,29 +4967,12 @@ private void InitializeComponent() this.actRapidShareAccountType.Name = "actRapidShareAccountType"; this.actRapidShareAccountType.SelectedAccountType = ShareX.UploadersLib.AccountType.Anonymous; // - // lblTeknikExpiration + // cbGfycatKeepAudio // - resources.ApplyResources(this.lblTeknikExpiration, "lblTeknikExpiration"); - this.lblTeknikExpiration.Name = "lblTeknikExpiration"; - // - // cbTeknikExpirationUnit - // - this.cbTeknikExpirationUnit.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.cbTeknikExpirationUnit.FormattingEnabled = true; - resources.ApplyResources(this.cbTeknikExpirationUnit, "cbTeknikExpirationUnit"); - this.cbTeknikExpirationUnit.Name = "cbTeknikExpirationUnit"; - this.cbTeknikExpirationUnit.SelectedIndexChanged += new System.EventHandler(this.cbTeknikExpirationUnit_SelectedIndexChanged); - // - // nudTeknikExpirationLength - // - resources.ApplyResources(this.nudTeknikExpirationLength, "nudTeknikExpirationLength"); - this.nudTeknikExpirationLength.Maximum = new decimal(new int[] { - 10000, - 0, - 0, - 0}); - this.nudTeknikExpirationLength.Name = "nudTeknikExpirationLength"; - this.nudTeknikExpirationLength.ValueChanged += new System.EventHandler(this.nudTeknikExpirationLength_ValueChanged); + resources.ApplyResources(this.cbGfycatKeepAudio, "cbGfycatKeepAudio"); + this.cbGfycatKeepAudio.Name = "cbGfycatKeepAudio"; + this.cbGfycatKeepAudio.UseVisualStyleBackColor = true; + this.cbGfycatKeepAudio.CheckedChanged += new System.EventHandler(this.cbGfycatKeepAudio_CheckedChanged); // // UploadersConfigForm // @@ -5057,6 +5066,7 @@ private void InitializeComponent() this.tpLambda.PerformLayout(); this.tpTeknik.ResumeLayout(false); this.tpTeknik.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.nudTeknikExpirationLength)).EndInit(); this.tpPomf.ResumeLayout(false); this.tpPomf.PerformLayout(); this.tpSeafile.ResumeLayout(false); @@ -5127,7 +5137,6 @@ private void InitializeComponent() this.tpVgyme.ResumeLayout(false); this.tpVgyme.PerformLayout(); this.tcUploaders.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.nudTeknikExpirationLength)).EndInit(); this.ResumeLayout(false); } @@ -5714,5 +5723,6 @@ private void InitializeComponent() private System.Windows.Forms.Label lblTeknikExpiration; private System.Windows.Forms.ComboBox cbTeknikExpirationUnit; private System.Windows.Forms.NumericUpDown nudTeknikExpirationLength; + private System.Windows.Forms.CheckBox cbGfycatKeepAudio; } } \ No newline at end of file diff --git a/ShareX.UploadersLib/Forms/UploadersConfigForm.cs b/ShareX.UploadersLib/Forms/UploadersConfigForm.cs index c473b18cf..6cd24b0ec 100644 --- a/ShareX.UploadersLib/Forms/UploadersConfigForm.cs +++ b/ShareX.UploadersLib/Forms/UploadersConfigForm.cs @@ -733,6 +733,7 @@ private void LoadFileUploaderSettings() } cbGfycatIsPublic.Checked = Config.GfycatIsPublic; + cbGfycatKeepAudio.Checked = Config.GfycatKeepAudio; #endregion Gfycat @@ -3126,6 +3127,11 @@ private void cbGfycatIsPublic_CheckedChanged(object sender, EventArgs e) Config.GfycatIsPublic = cbGfycatIsPublic.Checked; } + private void cbGfycatKeepAudio_CheckedChanged(object sender, EventArgs e) + { + Config.GfycatKeepAudio = cbGfycatKeepAudio.Checked; + } + #endregion Gfycat #region YouTube diff --git a/ShareX.UploadersLib/Forms/UploadersConfigForm.resx b/ShareX.UploadersLib/Forms/UploadersConfigForm.resx index 4073c80f1..2fca0d7a6 100644 --- a/ShareX.UploadersLib/Forms/UploadersConfigForm.resx +++ b/ShareX.UploadersLib/Forms/UploadersConfigForm.resx @@ -3941,6 +3941,51 @@ when you made the application key. 9 + + True + + + 16, 328 + + + 80, 17 + + + 7 + + + Keep audio + + + cbGfycatKeepAudio + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tpGfycat + + + 0 + + + True + + + NoControl + + + 16, 304 + + + 90, 17 + + + 6 + + + Public upload + cbGfycatIsPublic @@ -3951,7 +3996,16 @@ when you made the application key. tpGfycat - 0 + 1 + + + 16, 16 + + + 208, 40 + + + 3 atcGfycatAccountType @@ -3963,7 +4017,16 @@ when you made the application key. tpGfycat - 1 + 2 + + + 16, 64 + + + 328, 240 + + + 2 oauth2Gfycat @@ -3975,16 +4038,16 @@ when you made the application key. tpGfycat - 2 + 3 - 4, 238 + 4, 40 3, 3, 3, 3 - 178, 0 + 972, 519 30 @@ -5021,18 +5084,6 @@ when you made the application key. 19 - - 144, 288 - - - 64, 20 - - - 34 - - - Center - nudTeknikExpirationLength @@ -5045,15 +5096,6 @@ when you made the application key. 0 - - 16, 288 - - - 121, 21 - - - 33 - cbTeknikExpirationUnit @@ -5066,21 +5108,6 @@ when you made the application key. 1 - - True - - - 13, 272 - - - 56, 13 - - - 32 - - - Expiration: - lblTeknikExpiration @@ -5093,24 +5120,6 @@ when you made the application key. 2 - - True - - - NoControl - - - 357, 160 - - - 126, 13 - - - 30 - - - URL Shortener API URL: - lblTeknikUrlShortenerAPIUrl @@ -5123,15 +5132,6 @@ when you made the application key. 3 - - 360, 176 - - - 320, 20 - - - 31 - tbTeknikUrlShortenerAPIUrl @@ -5144,24 +5144,6 @@ when you made the application key. 4 - - True - - - NoControl - - - 357, 112 - - - 82, 13 - - - 28 - - - Paste API URL: - lblTeknikPasteAPIUrl @@ -5174,15 +5156,6 @@ when you made the application key. 5 - - 360, 128 - - - 320, 20 - - - 29 - tbTeknikPasteAPIUrl @@ -5195,24 +5168,6 @@ when you made the application key. 6 - - True - - - NoControl - - - 357, 16 - - - 103, 13 - - - 26 - - - Authentication URL: - lblTeknikAuthUrl @@ -5225,15 +5180,6 @@ when you made the application key. 7 - - 360, 32 - - - 320, 20 - - - 27 - tbTeknikAuthUrl @@ -5246,24 +5192,6 @@ when you made the application key. 8 - - True - - - NoControl - - - 16, 248 - - - 130, 17 - - - 25 - - - Generate deletion key - cbTeknikGenDeleteKey @@ -5276,24 +5204,6 @@ when you made the application key. 9 - - True - - - NoControl - - - 16, 224 - - - 126, 17 - - - 24 - - - Client side encryption - cbTeknikEncrypt @@ -5306,24 +5216,6 @@ when you made the application key. 10 - - True - - - NoControl - - - 357, 64 - - - 89, 13 - - - 22 - - - Upload API URL: - lblTeknikUploadAPIUrl @@ -5336,15 +5228,6 @@ when you made the application key. 11 - - 360, 80 - - - 320, 20 - - - 23 - tbTeknikUploadAPIUrl @@ -5357,15 +5240,6 @@ when you made the application key. 12 - - 16, 16 - - - 328, 200 - - - 21 - oauthTeknik @@ -5379,13 +5253,13 @@ when you made the application key. 13 - 4, 40 + 4, 238 3, 3, 3, 3 - 972, 519 + 178, 0 34 @@ -5490,13 +5364,13 @@ when you made the application key. 6 - 4, 40 + 4, 238 3, 3, 3, 3 - 972, 519 + 178, 0 22 @@ -11270,78 +11144,6 @@ when you made the application key. 11 - - True - - - NoControl - - - 16, 304 - - - 106, 17 - - - 6 - - - Is public upload? - - - cbGfycatIsPublic - - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tpGfycat - - - 0 - - - 16, 16 - - - 208, 40 - - - 3 - - - atcGfycatAccountType - - - ShareX.UploadersLib.AccountTypeControl, ShareX.UploadersLib, Version=12.4.2.0, Culture=neutral, PublicKeyToken=null - - - tpGfycat - - - 1 - - - 16, 64 - - - 328, 240 - - - 2 - - - oauth2Gfycat - - - ShareX.UploadersLib.OAuthControl, ShareX.UploadersLib, Version=12.4.2.0, Culture=neutral, PublicKeyToken=null - - - tpGfycat - - - 2 - NoControl @@ -13181,6 +12983,363 @@ when you made the application key. 4 + + 144, 288 + + + 64, 20 + + + 34 + + + Center + + + nudTeknikExpirationLength + + + System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tpTeknik + + + 0 + + + 16, 288 + + + 121, 21 + + + 33 + + + cbTeknikExpirationUnit + + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tpTeknik + + + 1 + + + True + + + 13, 272 + + + 56, 13 + + + 32 + + + Expiration: + + + lblTeknikExpiration + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tpTeknik + + + 2 + + + True + + + NoControl + + + 357, 160 + + + 126, 13 + + + 30 + + + URL Shortener API URL: + + + lblTeknikUrlShortenerAPIUrl + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tpTeknik + + + 3 + + + 360, 176 + + + 320, 20 + + + 31 + + + tbTeknikUrlShortenerAPIUrl + + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tpTeknik + + + 4 + + + True + + + NoControl + + + 357, 112 + + + 82, 13 + + + 28 + + + Paste API URL: + + + lblTeknikPasteAPIUrl + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tpTeknik + + + 5 + + + 360, 128 + + + 320, 20 + + + 29 + + + tbTeknikPasteAPIUrl + + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tpTeknik + + + 6 + + + True + + + NoControl + + + 357, 16 + + + 103, 13 + + + 26 + + + Authentication URL: + + + lblTeknikAuthUrl + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tpTeknik + + + 7 + + + 360, 32 + + + 320, 20 + + + 27 + + + tbTeknikAuthUrl + + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tpTeknik + + + 8 + + + True + + + NoControl + + + 16, 248 + + + 130, 17 + + + 25 + + + Generate deletion key + + + cbTeknikGenDeleteKey + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tpTeknik + + + 9 + + + True + + + NoControl + + + 16, 224 + + + 126, 17 + + + 24 + + + Client side encryption + + + cbTeknikEncrypt + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tpTeknik + + + 10 + + + True + + + NoControl + + + 357, 64 + + + 89, 13 + + + 22 + + + Upload API URL: + + + lblTeknikUploadAPIUrl + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tpTeknik + + + 11 + + + 360, 80 + + + 320, 20 + + + 23 + + + tbTeknikUploadAPIUrl + + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tpTeknik + + + 12 + + + 16, 16 + + + 328, 200 + + + 21 + + + oauthTeknik + + + ShareX.UploadersLib.OAuthControl, ShareX.UploadersLib, Version=12.4.2.0, Culture=neutral, PublicKeyToken=null + + + tpTeknik + + + 13 + NoControl diff --git a/ShareX.UploadersLib/UploadersConfig.cs b/ShareX.UploadersLib/UploadersConfig.cs index 3efec8d94..90108c5d2 100644 --- a/ShareX.UploadersLib/UploadersConfig.cs +++ b/ShareX.UploadersLib/UploadersConfig.cs @@ -192,6 +192,7 @@ public class UploadersConfig : SettingsBase public OAuth2Info GfycatOAuth2Info = null; public AccountType GfycatAccountType = AccountType.Anonymous; public bool GfycatIsPublic = false; + public bool GfycatKeepAudio = true; #endregion Gfycat