plugins: respect the Backend element. closes #1224
This commit is contained in:
parent
e7dd253db9
commit
fee24420c7
|
@ -26,8 +26,9 @@ namespace SparkleLib {
|
||||||
|
|
||||||
public class SparkleFetcherInfo {
|
public class SparkleFetcherInfo {
|
||||||
public string Address;
|
public string Address;
|
||||||
public string Fingerprint;
|
|
||||||
public string RemotePath;
|
public string RemotePath;
|
||||||
|
public string Backend;
|
||||||
|
public string Fingerprint;
|
||||||
public string TargetDirectory;
|
public string TargetDirectory;
|
||||||
public string AnnouncementsUrl;
|
public string AnnouncementsUrl;
|
||||||
public bool FetchPriorHistory;
|
public bool FetchPriorHistory;
|
||||||
|
|
|
@ -542,7 +542,11 @@ namespace SparkleShare {
|
||||||
}
|
}
|
||||||
|
|
||||||
string canonical_name = Path.GetFileName (info.RemotePath);
|
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);
|
info.TargetDirectory = Path.Combine (tmp_path, canonical_name);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -43,7 +43,7 @@ namespace SparkleShare {
|
||||||
get {
|
get {
|
||||||
string image_file_name = GetValue ("info", "icon");
|
string image_file_name = GetValue ("info", "icon");
|
||||||
string image_path = IO.Path.Combine (this.plugin_directory, image_file_name);
|
string image_path = IO.Path.Combine (this.plugin_directory, image_file_name);
|
||||||
|
|
||||||
if (IO.File.Exists (image_path))
|
if (IO.File.Exists (image_path))
|
||||||
return image_path;
|
return image_path;
|
||||||
else
|
else
|
||||||
|
|
|
@ -376,7 +376,8 @@ namespace SparkleShare {
|
||||||
Fingerprint = SelectedPlugin.Fingerprint,
|
Fingerprint = SelectedPlugin.Fingerprint,
|
||||||
RemotePath = remote_path,
|
RemotePath = remote_path,
|
||||||
FetchPriorHistory = this.fetch_prior_history,
|
FetchPriorHistory = this.fetch_prior_history,
|
||||||
AnnouncementsUrl = SelectedPlugin.AnnouncementsUrl
|
AnnouncementsUrl = SelectedPlugin.AnnouncementsUrl,
|
||||||
|
Backend = SelectedPlugin.Backend
|
||||||
};
|
};
|
||||||
|
|
||||||
new Thread (() => { Program.Controller.StartFetcher (info); }).Start ();
|
new Thread (() => { Program.Controller.StartFetcher (info); }).Start ();
|
||||||
|
|
Loading…
Reference in a new issue