From 53894ca2c413e243dae2fd41283ba382ed2c695c Mon Sep 17 00:00:00 2001 From: Diego Heras Date: Sun, 13 Sep 2020 11:30:54 +0200 Subject: [PATCH] myanonamouse: fix author parsing error (#9514) --- src/Jackett.Common/Indexers/MyAnonamouse.cs | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/Jackett.Common/Indexers/MyAnonamouse.cs b/src/Jackett.Common/Indexers/MyAnonamouse.cs index abb46e751..5a6fd5833 100644 --- a/src/Jackett.Common/Indexers/MyAnonamouse.cs +++ b/src/Jackett.Common/Indexers/MyAnonamouse.cs @@ -225,11 +225,17 @@ namespace Jackett.Common.Indexers var authorInfo = item.Value("author_info"); string author = null; if (!string.IsNullOrWhiteSpace(authorInfo)) - { - authorInfo = Regex.Unescape(authorInfo); - var authorInfoJson = JObject.Parse(authorInfo); - author = authorInfoJson.First.Last.Value(); - } + try + { + authorInfo = Regex.Unescape(authorInfo); + var authorInfoJson = JObject.Parse(authorInfo); + author = authorInfoJson.First.Last.Value(); + } + 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) release.Title += " by " + author;