This commit is contained in:
KZ
2015-07-19 01:27:41 +01:00
parent 974565d907
commit 33a97b148f
79 changed files with 2205 additions and 605 deletions

View File

@@ -0,0 +1,29 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Jackett.Models
{
public class ConfigurationDataUrl : ConfigurationData
{
public StringItem Url { get; private set; }
public ConfigurationDataUrl(string defaultUrl)
{
Url = new StringItem { Name = "Url", Value = defaultUrl };
}
public override Item[] GetItems()
{
return new Item[] { Url };
}
public string GetFormattedHostUrl()
{
var uri = new Uri(Url.Value);
return string.Format("{0}://{1}", uri.Scheme, uri.Host);
}
}
}