mirror of
https://github.com/Prowlarr/Prowlarr
synced 2026-04-20 03:40:49 +02:00
Fixed: MaM AuthorInfo Object - Round 2
This commit is contained in:
parent
71e132f9a4
commit
a08c5229f3
2 changed files with 9 additions and 9 deletions
|
|
@ -41,6 +41,11 @@ public override IParseIndexerResponse GetParser()
|
|||
return new MyAnonamouseParser(Settings, Capabilities.Categories, BaseUrl);
|
||||
}
|
||||
|
||||
protected override IDictionary<string, string> GetCookies()
|
||||
{
|
||||
return CookieUtil.CookieHeaderToDictionary("mam_id=" + Settings.MamId);
|
||||
}
|
||||
|
||||
private IndexerCapabilities SetCapabilities()
|
||||
{
|
||||
var caps = new IndexerCapabilities
|
||||
|
|
@ -205,11 +210,6 @@ private IEnumerable<IndexerRequest> GetPagedRequests(string term, int[] categori
|
|||
|
||||
var request = new IndexerRequest(urlSearch, HttpAccept.Json);
|
||||
|
||||
foreach (var cookie in CookieUtil.CookieHeaderToDictionary("mam_id=" + Settings.MamId))
|
||||
{
|
||||
request.HttpRequest.Cookies.Add(cookie.Key, cookie.Value);
|
||||
}
|
||||
|
||||
yield return request;
|
||||
}
|
||||
|
||||
|
|
@ -290,11 +290,11 @@ public IList<ReleaseInfo> ParseResponse(IndexerResponse indexerResponse)
|
|||
release.Title = item.Title;
|
||||
|
||||
// release.Description = item.Value<string>("description");
|
||||
var authorInfo = item.AuthorInfo;
|
||||
var author = string.Empty;
|
||||
|
||||
if (authorInfo != null && authorInfo.Count > 0)
|
||||
if (item.AuthorInfo != null)
|
||||
{
|
||||
var authorInfo = JsonConvert.DeserializeObject<Dictionary<string, string>>(item.AuthorInfo);
|
||||
author = authorInfo.First().Value;
|
||||
}
|
||||
|
||||
|
|
@ -392,7 +392,7 @@ public class MyAnonamouseTorrent
|
|||
public string Title { get; set; }
|
||||
|
||||
[JsonProperty(PropertyName = "author_info")]
|
||||
public Dictionary<string, string> AuthorInfo { get; set; }
|
||||
public string AuthorInfo { get; set; }
|
||||
|
||||
[JsonProperty(PropertyName = "lang_code")]
|
||||
public string LangCode { get; set; }
|
||||
|
|
|
|||
|
|
@ -141,7 +141,7 @@ protected IIndexerRequestGenerator SetCookieFunctions(IIndexerRequestGenerator g
|
|||
return generator;
|
||||
}
|
||||
|
||||
protected IDictionary<string, string> GetCookies()
|
||||
protected virtual IDictionary<string, string> GetCookies()
|
||||
{
|
||||
var cookies = _indexerStatusService.GetIndexerCookies(Definition.Id);
|
||||
var expiration = _indexerStatusService.GetIndexerCookiesExpirationDate(Definition.Id);
|
||||
|
|
|
|||
Loading…
Reference in a new issue