mirror of
https://github.com/Jackett/Jackett.git
synced 2025-09-26 20:13:07 +02:00
myanonamouse: fix author parsing error (#9514)
This commit is contained in:
@@ -225,11 +225,17 @@ namespace Jackett.Common.Indexers
|
|||||||
var authorInfo = item.Value<string>("author_info");
|
var authorInfo = item.Value<string>("author_info");
|
||||||
string author = null;
|
string author = null;
|
||||||
if (!string.IsNullOrWhiteSpace(authorInfo))
|
if (!string.IsNullOrWhiteSpace(authorInfo))
|
||||||
{
|
try
|
||||||
authorInfo = Regex.Unescape(authorInfo);
|
{
|
||||||
var authorInfoJson = JObject.Parse(authorInfo);
|
authorInfo = Regex.Unescape(authorInfo);
|
||||||
author = authorInfoJson.First.Last.Value<string>();
|
var authorInfoJson = JObject.Parse(authorInfo);
|
||||||
}
|
author = authorInfoJson.First.Last.Value<string>();
|
||||||
|
}
|
||||||
|
catch (Exception)
|
||||||
|
{
|
||||||
|
// the JSON on author_info field can be malformed due to double quotes
|
||||||
|
logger.Warn($"{DisplayName} error parsing author_info: {authorInfo}");
|
||||||
|
}
|
||||||
if (author != null)
|
if (author != null)
|
||||||
release.Title += " by " + author;
|
release.Title += " by " + author;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user