public List<DownloadItem> Load(string template, string downloadpath)
{
List<DownloadItem> downs=new List<DownloadItem>();
string cpath = Path.Combine(UserDataPath.Get(), downloads);
if (File.Exists(cpath))
{
string str = File.ReadAllText(cpath);
List<EpisodeWithDownloadSettingAndStatus> dm=JsonConvert.DeserializeObject<List<EpisodeWithDownloadSettingAndStatus>>(str);
foreach (EpisodeWithDownloadSettingAndStatus ep in dm)
{
if (ep.DownloadStatus==DownloadStatus.Queue || ep.DownloadStatus==DownloadStatus.Downloading)
ep.DownloadStatus=DownloadStatus.Queue;
downs.Add(Add(ep,template,downloadpath,ep.DownloadStatus));
}
}
return downs;
}