Made pomf.cat as default pomf uploader

This commit is contained in:
Jaex 2015-10-07 02:43:51 +03:00
parent 360a945894
commit 69ca70130c
2 changed files with 14 additions and 2 deletions

View file

@ -25,8 +25,10 @@
using Newtonsoft.Json;
using ShareX.HelpersLib;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
namespace ShareX.UploadersLib.FileUploaders
{
@ -52,7 +54,15 @@ public class Pomf : FileUploader
new PomfUploader("up.che.moe", "http://up.che.moe/upload.php", "http://cdn.che.moe")
};
public PomfUploader Uploader { get; set; }
public static PomfUploader DefaultUploader
{
get
{
return Uploaders.FirstOrDefault(x => x.Name.Equals("pomf.cat", StringComparison.InvariantCultureIgnoreCase));
}
}
public PomfUploader Uploader { get; private set; }
public Pomf(PomfUploader uploader)
{

View file

@ -252,7 +252,7 @@ public class UploadersConfig : SettingsBase<UploadersConfig>
// Pomf
public PomfUploader PomfUploader = new PomfUploader();
public PomfUploader PomfUploader = Pomf.DefaultUploader;
#endregion File uploaders
@ -421,6 +421,8 @@ public bool IsValid(FileDestination destination)
return OAuthInfo.CheckOAuth(JiraOAuthInfo);
case FileDestination.Lambda:
return LambdaSettings != null && !string.IsNullOrEmpty(LambdaSettings.UserAPIKey);
case FileDestination.Pomf:
return PomfUploader != null && !string.IsNullOrEmpty(PomfUploader.UploadURL);
case FileDestination.SharedFolder:
return LocalhostAccountList != null && LocalhostAccountList.IsValidIndex(LocalhostSelectedFiles);
case FileDestination.Email: