plugins: respect the Backend element. closes #1224

This commit is contained in:
Hylke Bons 2013-03-23 18:48:47 +01:00
parent e7dd253db9
commit fee24420c7
4 changed files with 10 additions and 4 deletions

View file

@ -26,8 +26,9 @@ namespace SparkleLib {
public class SparkleFetcherInfo {
public string Address;
public string Fingerprint;
public string RemotePath;
public string Backend;
public string Fingerprint;
public string TargetDirectory;
public string AnnouncementsUrl;
public bool FetchPriorHistory;

View file

@ -542,7 +542,11 @@ namespace SparkleShare {
}
string canonical_name = Path.GetFileName (info.RemotePath);
string backend = SparkleFetcherBase.GetBackend (info.Address);
string backend = info.Backend;
if (string.IsNullOrEmpty (backend))
backend = SparkleFetcherBase.GetBackend (info.Address);
info.TargetDirectory = Path.Combine (tmp_path, canonical_name);
try {

View file

@ -43,7 +43,7 @@ namespace SparkleShare {
get {
string image_file_name = GetValue ("info", "icon");
string image_path = IO.Path.Combine (this.plugin_directory, image_file_name);
if (IO.File.Exists (image_path))
return image_path;
else

View file

@ -376,7 +376,8 @@ namespace SparkleShare {
Fingerprint = SelectedPlugin.Fingerprint,
RemotePath = remote_path,
FetchPriorHistory = this.fetch_prior_history,
AnnouncementsUrl = SelectedPlugin.AnnouncementsUrl
AnnouncementsUrl = SelectedPlugin.AnnouncementsUrl,
Backend = SelectedPlugin.Backend
};
new Thread (() => { Program.Controller.StartFetcher (info); }).Start ();