Little changes about lithiio

This commit is contained in:
Jaex 2016-05-15 15:22:13 +03:00
parent ff0f45cd42
commit 75d0be62f9
5 changed files with 2463 additions and 7709 deletions

View file

@ -118,8 +118,6 @@ public enum FileDestination
Jira, Jira,
[Description("Lambda")] [Description("Lambda")]
Lambda, Lambda,
[Description("Lithiio")]
Lithiio,
[Description("VideoBin")] [Description("VideoBin")]
VideoBin, VideoBin,
[Description("Pomf")] [Description("Pomf")]
@ -132,10 +130,12 @@ public enum FileDestination
Up1, Up1,
[Description("Seafile")] [Description("Seafile")]
Seafile, Seafile,
[Description("s-ul")]
Sul,
[Description("Streamable")] [Description("Streamable")]
Streamable, Streamable,
[Description("s-ul")]
Sul,
[Description("Lithiio")]
Lithiio,
SharedFolder, // Localized SharedFolder, // Localized
Email, // Localized Email, // Localized
CustomFileUploader // Localized CustomFileUploader // Localized

View file

@ -23,10 +23,7 @@
#endregion License Information (GPL v3) #endregion License Information (GPL v3)
// Copied Lambda.cs FileUploader and modified it a little to work with https://lithi.io/. // Credits: https://github.com/lithium720
// To-do: add the other domains to the dropdown menu.
// Credits: https://github.com/mstojcevich
// Minor changes: https://github.com/lithium720
using Newtonsoft.Json; using Newtonsoft.Json;
using System.Collections.Generic; using System.Collections.Generic;
@ -63,6 +60,7 @@ public Lithiio(LithiioSettings config)
private const string uploadUrl = "http://api.lithi.io/upload.php"; private const string uploadUrl = "http://api.lithi.io/upload.php";
// TODO: Add the other domains to the dropdown menu.
public static string[] UploadURLs = new string[] { "https://lithi.io/" }; public static string[] UploadURLs = new string[] { "https://lithi.io/" };
public override UploadResult Upload(Stream stream, string fileName) public override UploadResult Upload(Stream stream, string fileName)
@ -99,7 +97,7 @@ internal class LithiioFile
public class LithiioSettings public class LithiioSettings
{ {
public string UserAPIKey = string.Empty; public string UserAPIKey { get; set; } = string.Empty;
public string UploadURL = "https://lithi.io/"; public string UploadURL { get; set; } = "https://lithi.io/";
} }
} }

View file

@ -313,12 +313,6 @@ private void InitializeComponent()
this.txtLambdaApiKey = new System.Windows.Forms.TextBox(); this.txtLambdaApiKey = new System.Windows.Forms.TextBox();
this.lblLambdaUploadURL = new System.Windows.Forms.Label(); this.lblLambdaUploadURL = new System.Windows.Forms.Label();
this.cbLambdaUploadURL = new System.Windows.Forms.ComboBox(); this.cbLambdaUploadURL = new System.Windows.Forms.ComboBox();
this.tpLithiio = new System.Windows.Forms.TabPage();
this.lblLithiioInfo = new System.Windows.Forms.Label();
this.lblLithiioApiKey = new System.Windows.Forms.Label();
this.txtLithiioApiKey = new System.Windows.Forms.TextBox();
this.lblLithiioUploadURL = new System.Windows.Forms.Label();
this.cbLithiioUploadURL = new System.Windows.Forms.ComboBox();
this.tpPomf = new System.Windows.Forms.TabPage(); this.tpPomf = new System.Windows.Forms.TabPage();
this.btnPomfTest = new System.Windows.Forms.Button(); this.btnPomfTest = new System.Windows.Forms.Button();
this.txtPomfResultURL = new System.Windows.Forms.TextBox(); this.txtPomfResultURL = new System.Windows.Forms.TextBox();
@ -371,9 +365,6 @@ private void InitializeComponent()
this.txtSeafileAuthToken = new System.Windows.Forms.TextBox(); this.txtSeafileAuthToken = new System.Windows.Forms.TextBox();
this.lblSeafileAuthToken = new System.Windows.Forms.Label(); this.lblSeafileAuthToken = new System.Windows.Forms.Label();
this.lblSeafileAPIURL = new System.Windows.Forms.Label(); this.lblSeafileAPIURL = new System.Windows.Forms.Label();
this.tpSul = new System.Windows.Forms.TabPage();
this.txtSulAPIKey = new System.Windows.Forms.TextBox();
this.lblSulAPIKey = new System.Windows.Forms.Label();
this.tpStreamable = new System.Windows.Forms.TabPage(); this.tpStreamable = new System.Windows.Forms.TabPage();
this.cbStreamableUseDirectURL = new System.Windows.Forms.CheckBox(); this.cbStreamableUseDirectURL = new System.Windows.Forms.CheckBox();
this.txtStreamablePassword = new System.Windows.Forms.TextBox(); this.txtStreamablePassword = new System.Windows.Forms.TextBox();
@ -381,6 +372,15 @@ private void InitializeComponent()
this.lblStreamableUsername = new System.Windows.Forms.Label(); this.lblStreamableUsername = new System.Windows.Forms.Label();
this.lblStreamablePassword = new System.Windows.Forms.Label(); this.lblStreamablePassword = new System.Windows.Forms.Label();
this.cbStreamableAnonymous = new System.Windows.Forms.CheckBox(); this.cbStreamableAnonymous = new System.Windows.Forms.CheckBox();
this.tpSul = new System.Windows.Forms.TabPage();
this.txtSulAPIKey = new System.Windows.Forms.TextBox();
this.lblSulAPIKey = new System.Windows.Forms.Label();
this.tpLithiio = new System.Windows.Forms.TabPage();
this.lblLithiioInfo = new System.Windows.Forms.Label();
this.lblLithiioApiKey = new System.Windows.Forms.Label();
this.txtLithiioApiKey = new System.Windows.Forms.TextBox();
this.lblLithiioUploadURL = new System.Windows.Forms.Label();
this.cbLithiioUploadURL = new System.Windows.Forms.ComboBox();
this.tpSharedFolder = new System.Windows.Forms.TabPage(); this.tpSharedFolder = new System.Windows.Forms.TabPage();
this.lblSharedFolderFiles = new System.Windows.Forms.Label(); this.lblSharedFolderFiles = new System.Windows.Forms.Label();
this.lblSharedFolderText = new System.Windows.Forms.Label(); this.lblSharedFolderText = new System.Windows.Forms.Label();
@ -578,7 +578,6 @@ private void InitializeComponent()
this.tpJira.SuspendLayout(); this.tpJira.SuspendLayout();
this.gpJiraServer.SuspendLayout(); this.gpJiraServer.SuspendLayout();
this.tpLambda.SuspendLayout(); this.tpLambda.SuspendLayout();
this.tpLithiio.SuspendLayout();
this.tpPomf.SuspendLayout(); this.tpPomf.SuspendLayout();
this.tpUp1.SuspendLayout(); this.tpUp1.SuspendLayout();
this.tpSeafile.SuspendLayout(); this.tpSeafile.SuspendLayout();
@ -586,8 +585,9 @@ private void InitializeComponent()
((System.ComponentModel.ISupportInitialize)(this.nudSeafileExpireDays)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.nudSeafileExpireDays)).BeginInit();
this.grpSeafileAccInfo.SuspendLayout(); this.grpSeafileAccInfo.SuspendLayout();
this.grpSeafileObtainAuthToken.SuspendLayout(); this.grpSeafileObtainAuthToken.SuspendLayout();
this.tpSul.SuspendLayout();
this.tpStreamable.SuspendLayout(); this.tpStreamable.SuspendLayout();
this.tpSul.SuspendLayout();
this.tpLithiio.SuspendLayout();
this.tpSharedFolder.SuspendLayout(); this.tpSharedFolder.SuspendLayout();
this.tpEmail.SuspendLayout(); this.tpEmail.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.nudEmailSmtpPort)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.nudEmailSmtpPort)).BeginInit();
@ -1622,12 +1622,12 @@ private void InitializeComponent()
this.tcFileUploaders.Controls.Add(this.tpMinus); this.tcFileUploaders.Controls.Add(this.tpMinus);
this.tcFileUploaders.Controls.Add(this.tpJira); this.tcFileUploaders.Controls.Add(this.tpJira);
this.tcFileUploaders.Controls.Add(this.tpLambda); this.tcFileUploaders.Controls.Add(this.tpLambda);
this.tcFileUploaders.Controls.Add(this.tpLithiio);
this.tcFileUploaders.Controls.Add(this.tpPomf); this.tcFileUploaders.Controls.Add(this.tpPomf);
this.tcFileUploaders.Controls.Add(this.tpUp1); this.tcFileUploaders.Controls.Add(this.tpUp1);
this.tcFileUploaders.Controls.Add(this.tpSeafile); this.tcFileUploaders.Controls.Add(this.tpSeafile);
this.tcFileUploaders.Controls.Add(this.tpSul);
this.tcFileUploaders.Controls.Add(this.tpStreamable); this.tcFileUploaders.Controls.Add(this.tpStreamable);
this.tcFileUploaders.Controls.Add(this.tpSul);
this.tcFileUploaders.Controls.Add(this.tpLithiio);
this.tcFileUploaders.Controls.Add(this.tpSharedFolder); this.tcFileUploaders.Controls.Add(this.tpSharedFolder);
this.tcFileUploaders.Controls.Add(this.tpEmail); this.tcFileUploaders.Controls.Add(this.tpEmail);
resources.ApplyResources(this.tcFileUploaders, "tcFileUploaders"); resources.ApplyResources(this.tcFileUploaders, "tcFileUploaders");
@ -2690,48 +2690,6 @@ private void InitializeComponent()
this.cbLambdaUploadURL.Name = "cbLambdaUploadURL"; this.cbLambdaUploadURL.Name = "cbLambdaUploadURL";
this.cbLambdaUploadURL.SelectedIndexChanged += new System.EventHandler(this.cbLambdaUploadURL_SelectedIndexChanged); this.cbLambdaUploadURL.SelectedIndexChanged += new System.EventHandler(this.cbLambdaUploadURL_SelectedIndexChanged);
// //
// tpLithiio
//
this.tpLithiio.Controls.Add(this.lblLithiioInfo);
this.tpLithiio.Controls.Add(this.lblLithiioApiKey);
this.tpLithiio.Controls.Add(this.txtLithiioApiKey);
this.tpLithiio.Controls.Add(this.lblLithiioUploadURL);
this.tpLithiio.Controls.Add(this.cbLithiioUploadURL);
resources.ApplyResources(this.tpLithiio, "tpLithiio");
this.tpLithiio.Name = "tpLithiio";
this.tpLithiio.UseVisualStyleBackColor = true;
//
// lblLithiioInfo
//
resources.ApplyResources(this.lblLithiioInfo, "lblLithiioInfo");
this.lblLithiioInfo.Name = "lblLithiioInfo";
this.lblLithiioInfo.Click += new System.EventHandler(this.lithiioInfoLabel_Click);
//
// lblLithiioApiKey
//
resources.ApplyResources(this.lblLithiioApiKey, "lblLithiioApiKey");
this.lblLithiioApiKey.Name = "lblLithiioApiKey";
//
// txtLithiioApiKey
//
resources.ApplyResources(this.txtLithiioApiKey, "txtLithiioApiKey");
this.txtLithiioApiKey.Name = "txtLithiioApiKey";
this.txtLithiioApiKey.UseSystemPasswordChar = true;
this.txtLithiioApiKey.TextChanged += new System.EventHandler(this.txtLithiioApiKey_TextChanged);
//
// lblLithiioUploadURL
//
resources.ApplyResources(this.lblLithiioUploadURL, "lblLithiioUploadURL");
this.lblLithiioUploadURL.Name = "lblLithiioUploadURL";
//
// cbLithiioUploadURL
//
this.cbLithiioUploadURL.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cbLithiioUploadURL.FormattingEnabled = true;
resources.ApplyResources(this.cbLithiioUploadURL, "cbLithiioUploadURL");
this.cbLithiioUploadURL.Name = "cbLithiioUploadURL";
this.cbLithiioUploadURL.SelectedIndexChanged += new System.EventHandler(this.cbLithiioUploadURL_SelectedIndexChanged);
//
// tpPomf // tpPomf
// //
this.tpPomf.Controls.Add(this.btnPomfTest); this.tpPomf.Controls.Add(this.btnPomfTest);
@ -3106,25 +3064,6 @@ private void InitializeComponent()
resources.ApplyResources(this.lblSeafileAPIURL, "lblSeafileAPIURL"); resources.ApplyResources(this.lblSeafileAPIURL, "lblSeafileAPIURL");
this.lblSeafileAPIURL.Name = "lblSeafileAPIURL"; this.lblSeafileAPIURL.Name = "lblSeafileAPIURL";
// //
// tpSul
//
this.tpSul.Controls.Add(this.txtSulAPIKey);
this.tpSul.Controls.Add(this.lblSulAPIKey);
resources.ApplyResources(this.tpSul, "tpSul");
this.tpSul.Name = "tpSul";
this.tpSul.UseVisualStyleBackColor = true;
//
// txtSulAPIKey
//
resources.ApplyResources(this.txtSulAPIKey, "txtSulAPIKey");
this.txtSulAPIKey.Name = "txtSulAPIKey";
this.txtSulAPIKey.TextChanged += new System.EventHandler(this.txtSulAPIKey_TextChanged);
//
// lblSulAPIKey
//
resources.ApplyResources(this.lblSulAPIKey, "lblSulAPIKey");
this.lblSulAPIKey.Name = "lblSulAPIKey";
//
// tpStreamable // tpStreamable
// //
this.tpStreamable.Controls.Add(this.cbStreamableUseDirectURL); this.tpStreamable.Controls.Add(this.cbStreamableUseDirectURL);
@ -3174,6 +3113,68 @@ private void InitializeComponent()
this.cbStreamableAnonymous.UseVisualStyleBackColor = true; this.cbStreamableAnonymous.UseVisualStyleBackColor = true;
this.cbStreamableAnonymous.CheckedChanged += new System.EventHandler(this.cboxStreamableAnonymous_CheckedChanged); this.cbStreamableAnonymous.CheckedChanged += new System.EventHandler(this.cboxStreamableAnonymous_CheckedChanged);
// //
// tpSul
//
this.tpSul.Controls.Add(this.txtSulAPIKey);
this.tpSul.Controls.Add(this.lblSulAPIKey);
resources.ApplyResources(this.tpSul, "tpSul");
this.tpSul.Name = "tpSul";
this.tpSul.UseVisualStyleBackColor = true;
//
// txtSulAPIKey
//
resources.ApplyResources(this.txtSulAPIKey, "txtSulAPIKey");
this.txtSulAPIKey.Name = "txtSulAPIKey";
this.txtSulAPIKey.TextChanged += new System.EventHandler(this.txtSulAPIKey_TextChanged);
//
// lblSulAPIKey
//
resources.ApplyResources(this.lblSulAPIKey, "lblSulAPIKey");
this.lblSulAPIKey.Name = "lblSulAPIKey";
//
// tpLithiio
//
this.tpLithiio.Controls.Add(this.lblLithiioInfo);
this.tpLithiio.Controls.Add(this.lblLithiioApiKey);
this.tpLithiio.Controls.Add(this.txtLithiioApiKey);
this.tpLithiio.Controls.Add(this.lblLithiioUploadURL);
this.tpLithiio.Controls.Add(this.cbLithiioUploadURL);
resources.ApplyResources(this.tpLithiio, "tpLithiio");
this.tpLithiio.Name = "tpLithiio";
this.tpLithiio.UseVisualStyleBackColor = true;
//
// lblLithiioInfo
//
resources.ApplyResources(this.lblLithiioInfo, "lblLithiioInfo");
this.lblLithiioInfo.Cursor = System.Windows.Forms.Cursors.Hand;
this.lblLithiioInfo.Name = "lblLithiioInfo";
this.lblLithiioInfo.Click += new System.EventHandler(this.lithiioInfoLabel_Click);
//
// lblLithiioApiKey
//
resources.ApplyResources(this.lblLithiioApiKey, "lblLithiioApiKey");
this.lblLithiioApiKey.Name = "lblLithiioApiKey";
//
// txtLithiioApiKey
//
resources.ApplyResources(this.txtLithiioApiKey, "txtLithiioApiKey");
this.txtLithiioApiKey.Name = "txtLithiioApiKey";
this.txtLithiioApiKey.UseSystemPasswordChar = true;
this.txtLithiioApiKey.TextChanged += new System.EventHandler(this.txtLithiioApiKey_TextChanged);
//
// lblLithiioUploadURL
//
resources.ApplyResources(this.lblLithiioUploadURL, "lblLithiioUploadURL");
this.lblLithiioUploadURL.Name = "lblLithiioUploadURL";
//
// cbLithiioUploadURL
//
this.cbLithiioUploadURL.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cbLithiioUploadURL.FormattingEnabled = true;
resources.ApplyResources(this.cbLithiioUploadURL, "cbLithiioUploadURL");
this.cbLithiioUploadURL.Name = "cbLithiioUploadURL";
this.cbLithiioUploadURL.SelectedIndexChanged += new System.EventHandler(this.cbLithiioUploadURL_SelectedIndexChanged);
//
// tpSharedFolder // tpSharedFolder
// //
this.tpSharedFolder.Controls.Add(this.lblSharedFolderFiles); this.tpSharedFolder.Controls.Add(this.lblSharedFolderFiles);
@ -4384,8 +4385,6 @@ private void InitializeComponent()
this.gpJiraServer.PerformLayout(); this.gpJiraServer.PerformLayout();
this.tpLambda.ResumeLayout(false); this.tpLambda.ResumeLayout(false);
this.tpLambda.PerformLayout(); this.tpLambda.PerformLayout();
this.tpLithiio.ResumeLayout(false);
this.tpLithiio.PerformLayout();
this.tpPomf.ResumeLayout(false); this.tpPomf.ResumeLayout(false);
this.tpPomf.PerformLayout(); this.tpPomf.PerformLayout();
this.tpUp1.ResumeLayout(false); this.tpUp1.ResumeLayout(false);
@ -4399,10 +4398,12 @@ private void InitializeComponent()
this.grpSeafileAccInfo.PerformLayout(); this.grpSeafileAccInfo.PerformLayout();
this.grpSeafileObtainAuthToken.ResumeLayout(false); this.grpSeafileObtainAuthToken.ResumeLayout(false);
this.grpSeafileObtainAuthToken.PerformLayout(); this.grpSeafileObtainAuthToken.PerformLayout();
this.tpSul.ResumeLayout(false);
this.tpSul.PerformLayout();
this.tpStreamable.ResumeLayout(false); this.tpStreamable.ResumeLayout(false);
this.tpStreamable.PerformLayout(); this.tpStreamable.PerformLayout();
this.tpSul.ResumeLayout(false);
this.tpSul.PerformLayout();
this.tpLithiio.ResumeLayout(false);
this.tpLithiio.PerformLayout();
this.tpSharedFolder.ResumeLayout(false); this.tpSharedFolder.ResumeLayout(false);
this.tpSharedFolder.PerformLayout(); this.tpSharedFolder.PerformLayout();
this.tpEmail.ResumeLayout(false); this.tpEmail.ResumeLayout(false);

File diff suppressed because it is too large Load diff

View file

@ -658,7 +658,6 @@
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="Forms\UploadersConfigForm.de.resx"> <EmbeddedResource Include="Forms\UploadersConfigForm.de.resx">
<DependentUpon>UploadersConfigForm.cs</DependentUpon> <DependentUpon>UploadersConfigForm.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="Forms\UploadersConfigForm.es.resx"> <EmbeddedResource Include="Forms\UploadersConfigForm.es.resx">
<DependentUpon>UploadersConfigForm.cs</DependentUpon> <DependentUpon>UploadersConfigForm.cs</DependentUpon>
@ -932,7 +931,7 @@
<Analyzer Include="..\packages\AWSSDK.S3.3.1.5.0\analyzers\dotnet\cs\AWSSDK.S3.CodeAnalysis.dll" /> <Analyzer Include="..\packages\AWSSDK.S3.3.1.5.0\analyzers\dotnet\cs\AWSSDK.S3.CodeAnalysis.dll" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Content Include="Favicons\Lithiio.ico" /> <None Include="Favicons\Lithiio.ico" />
</ItemGroup> </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" /> <Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />