update the updater
This commit is contained in:
parent
0996872738
commit
8b93bd6eab
|
@ -88,7 +88,7 @@ namespace MediaBrowser.Common.Implementations.Updates
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
var asset = (obj.assets ?? new List<Asset>()).FirstOrDefault(i => string.Equals(assetFilename, Path.GetFileName(i.browser_download_url), StringComparison.OrdinalIgnoreCase));
|
var asset = (obj.assets ?? new List<Asset>()).FirstOrDefault(i => IsAsset(i, assetFilename));
|
||||||
|
|
||||||
if (asset == null)
|
if (asset == null)
|
||||||
{
|
{
|
||||||
|
@ -114,6 +114,18 @@ namespace MediaBrowser.Common.Implementations.Updates
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private bool IsAsset(Asset asset, string assetFilename)
|
||||||
|
{
|
||||||
|
var downloadFilename = Path.GetFileName(asset.browser_download_url) ?? string.Empty;
|
||||||
|
|
||||||
|
if (downloadFilename.IndexOf(assetFilename, StringComparison.OrdinalIgnoreCase) != -1)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return string.Equals(assetFilename, downloadFilename, StringComparison.OrdinalIgnoreCase);
|
||||||
|
}
|
||||||
|
|
||||||
public class Uploader
|
public class Uploader
|
||||||
{
|
{
|
||||||
public string login { get; set; }
|
public string login { get; set; }
|
||||||
|
|
Loading…
Reference in New Issue
Block a user