mirror of
https://github.com/ShareX/ShareX.git
synced 2024-10-02 18:26:27 +13:00
Automatically get name from url
This commit is contained in:
parent
9e3a6516f9
commit
08bb4393f0
3 changed files with 26 additions and 29 deletions
|
@ -35,26 +35,26 @@ public class Pomf : FileUploader
|
||||||
{
|
{
|
||||||
public static List<PomfUploader> Uploaders = new List<PomfUploader>()
|
public static List<PomfUploader> Uploaders = new List<PomfUploader>()
|
||||||
{
|
{
|
||||||
new PomfUploader("1339.cf", "http://1339.cf/upload.php", "http://b.1339.cf"),
|
new PomfUploader("http://1339.cf/upload.php", "http://b.1339.cf"),
|
||||||
new PomfUploader("bucket.pw", "https://bucket.pw/upload.php", "https://dl.bucket.pw"),
|
new PomfUploader("https://bucket.pw/upload.php", "https://dl.bucket.pw"),
|
||||||
new PomfUploader("fuwa.se", "https://fuwa.se/api/upload"),
|
new PomfUploader("https://fuwa.se/api/upload"),
|
||||||
new PomfUploader("g.zxq.co", "http://g.zxq.co/upload.php", "http://y.zxq.co"),
|
new PomfUploader("http://g.zxq.co/upload.php", "http://y.zxq.co"),
|
||||||
new PomfUploader("kyaa.sg", "http://kyaa.sg/upload.php", "https://r.kyaa.sg"),
|
new PomfUploader("http://kyaa.sg/upload.php", "https://r.kyaa.sg"),
|
||||||
new PomfUploader("madokami.com", "https://madokami.com/upload"),
|
new PomfUploader("https://madokami.com/upload"),
|
||||||
new PomfUploader("matu.red", "http://matu.red/upload.php", "http://x.matu.red"),
|
new PomfUploader("http://matu.red/upload.php", "http://x.matu.red"),
|
||||||
new PomfUploader("maxfile.ro", "https://maxfile.ro/static/upload.php", "https://d.maxfile.ro"),
|
new PomfUploader("https://maxfile.ro/static/upload.php", "https://d.maxfile.ro"),
|
||||||
new PomfUploader("mixtape.moe", "https://mixtape.moe/upload.php"),
|
new PomfUploader("https://mixtape.moe/upload.php"),
|
||||||
new PomfUploader("nigger.cat", "http://nigger.cat/upload.php"),
|
new PomfUploader("http://nigger.cat/upload.php"),
|
||||||
new PomfUploader("nyanimg.com", "http://nyanimg.com/upload.php"),
|
new PomfUploader("http://nyanimg.com/upload.php"),
|
||||||
new PomfUploader("openhost.xyz", "http://openhost.xyz/upload.php"),
|
new PomfUploader("http://openhost.xyz/upload.php"),
|
||||||
new PomfUploader("pantsu.cat", "https://pantsu.cat/upload.php"),
|
new PomfUploader("https://pantsu.cat/upload.php"),
|
||||||
new PomfUploader("pomf.cat", "https://pomf.cat/upload.php", "http://a.pomf.cat"),
|
new PomfUploader("https://pomf.cat/upload.php", "http://a.pomf.cat"),
|
||||||
new PomfUploader("pomf.hummingbird.moe", "http://pomf.hummingbird.moe/upload.php", "http://a.pomf.hummingbird.moe"),
|
new PomfUploader("http://pomf.hummingbird.moe/upload.php", "http://a.pomf.hummingbird.moe"),
|
||||||
new PomfUploader("pomf.io", "http://pomf.io/upload.php"),
|
new PomfUploader("http://pomf.io/upload.php"),
|
||||||
new PomfUploader("pomf.pl", "http://pomf.pl/upload.php"),
|
new PomfUploader("http://pomf.pl/upload.php"),
|
||||||
//new PomfUploader("pomf.se", "https://pomf.se/upload.php", "https://a.pomf.se"),
|
//new PomfUploader("https://pomf.se/upload.php", "https://a.pomf.se"),
|
||||||
new PomfUploader("sheesh.in", "https://sheesh.in/upload.php"),
|
new PomfUploader("https://sheesh.in/upload.php"),
|
||||||
new PomfUploader("up.che.moe", "http://up.che.moe/upload.php", "http://cdn.che.moe")
|
new PomfUploader("http://up.che.moe/upload.php", "http://cdn.che.moe")
|
||||||
};
|
};
|
||||||
|
|
||||||
public PomfUploader Uploader { get; private set; }
|
public PomfUploader Uploader { get; private set; }
|
||||||
|
|
|
@ -24,15 +24,11 @@ You should have received a copy of the GNU General Public License
|
||||||
#endregion License Information (GPL v3)
|
#endregion License Information (GPL v3)
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
|
|
||||||
namespace ShareX.UploadersLib.FileUploaders
|
namespace ShareX.UploadersLib.FileUploaders
|
||||||
{
|
{
|
||||||
public class PomfUploader
|
public class PomfUploader
|
||||||
{
|
{
|
||||||
public string Name { get; set; }
|
|
||||||
public string UploadURL { get; set; }
|
public string UploadURL { get; set; }
|
||||||
public string ResultURL { get; set; }
|
public string ResultURL { get; set; }
|
||||||
|
|
||||||
|
@ -40,18 +36,19 @@ public PomfUploader()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public PomfUploader(string name, string uploadURL, string resultURL = null)
|
public PomfUploader(string uploadURL, string resultURL = null)
|
||||||
{
|
{
|
||||||
Name = name;
|
|
||||||
UploadURL = uploadURL;
|
UploadURL = uploadURL;
|
||||||
ResultURL = resultURL;
|
ResultURL = resultURL;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override string ToString()
|
public override string ToString()
|
||||||
{
|
{
|
||||||
if (!string.IsNullOrEmpty(Name))
|
Uri uri;
|
||||||
|
|
||||||
|
if (Uri.TryCreate(UploadURL, UriKind.Absolute, out uri))
|
||||||
{
|
{
|
||||||
return Name;
|
return uri.Host;
|
||||||
}
|
}
|
||||||
|
|
||||||
return UploadURL;
|
return UploadURL;
|
||||||
|
|
|
@ -252,7 +252,7 @@ public class UploadersConfig : SettingsBase<UploadersConfig>
|
||||||
|
|
||||||
// Pomf
|
// Pomf
|
||||||
|
|
||||||
public PomfUploader PomfUploader = new PomfUploader() { UploadURL = "https://pomf.cat/upload.php", ResultURL = "http://a.pomf.cat" };
|
public PomfUploader PomfUploader = new PomfUploader("https://pomf.cat/upload.php", "http://a.pomf.cat");
|
||||||
|
|
||||||
// Seafile
|
// Seafile
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue