mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-17 17:14:18 +02:00
Fixed: MaM AuthorInfo Object - Round 2
This commit is contained in:
@@ -41,6 +41,11 @@ namespace NzbDrone.Core.Indexers.Definitions
|
|||||||
return new MyAnonamouseParser(Settings, Capabilities.Categories, BaseUrl);
|
return new MyAnonamouseParser(Settings, Capabilities.Categories, BaseUrl);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected override IDictionary<string, string> GetCookies()
|
||||||
|
{
|
||||||
|
return CookieUtil.CookieHeaderToDictionary("mam_id=" + Settings.MamId);
|
||||||
|
}
|
||||||
|
|
||||||
private IndexerCapabilities SetCapabilities()
|
private IndexerCapabilities SetCapabilities()
|
||||||
{
|
{
|
||||||
var caps = new IndexerCapabilities
|
var caps = new IndexerCapabilities
|
||||||
@@ -205,11 +210,6 @@ namespace NzbDrone.Core.Indexers.Definitions
|
|||||||
|
|
||||||
var request = new IndexerRequest(urlSearch, HttpAccept.Json);
|
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;
|
yield return request;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -290,11 +290,11 @@ namespace NzbDrone.Core.Indexers.Definitions
|
|||||||
release.Title = item.Title;
|
release.Title = item.Title;
|
||||||
|
|
||||||
// release.Description = item.Value<string>("description");
|
// release.Description = item.Value<string>("description");
|
||||||
var authorInfo = item.AuthorInfo;
|
|
||||||
var author = string.Empty;
|
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;
|
author = authorInfo.First().Value;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -392,7 +392,7 @@ namespace NzbDrone.Core.Indexers.Definitions
|
|||||||
public string Title { get; set; }
|
public string Title { get; set; }
|
||||||
|
|
||||||
[JsonProperty(PropertyName = "author_info")]
|
[JsonProperty(PropertyName = "author_info")]
|
||||||
public Dictionary<string, string> AuthorInfo { get; set; }
|
public string AuthorInfo { get; set; }
|
||||||
|
|
||||||
[JsonProperty(PropertyName = "lang_code")]
|
[JsonProperty(PropertyName = "lang_code")]
|
||||||
public string LangCode { get; set; }
|
public string LangCode { get; set; }
|
||||||
|
@@ -141,7 +141,7 @@ namespace NzbDrone.Core.Indexers
|
|||||||
return generator;
|
return generator;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected IDictionary<string, string> GetCookies()
|
protected virtual IDictionary<string, string> GetCookies()
|
||||||
{
|
{
|
||||||
var cookies = _indexerStatusService.GetIndexerCookies(Definition.Id);
|
var cookies = _indexerStatusService.GetIndexerCookies(Definition.Id);
|
||||||
var expiration = _indexerStatusService.GetIndexerCookiesExpirationDate(Definition.Id);
|
var expiration = _indexerStatusService.GetIndexerCookiesExpirationDate(Definition.Id);
|
||||||
|
Reference in New Issue
Block a user