1
0
Fork 0
mirror of https://github.com/Jackett/Jackett synced 2025-01-01 12:46:23 +00:00

internetarchive: fix array title (#7125)

This commit is contained in:
Diego Heras 2020-02-07 00:17:58 +01:00 committed by GitHub
parent f8f0c5d907
commit 35b606805f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -167,8 +167,11 @@ namespace Jackett.Common.Indexers
var release = new ReleaseInfo();
var id = (string) torrent["identifier"];
release.Title = (string)torrent["title"];
var title = torrent["title"] is JArray ?
(string)((JArray)torrent["title"])[0] :
(string)torrent["title"];
release.Title = title;
release.Comments = new Uri(CommentsUrl + id);
release.Guid = release.Comments;
@ -184,7 +187,7 @@ namespace Jackett.Common.Indexers
release.Grabs = (long)torrent["downloads"];
release.Link = new Uri(LinkUrl + id + "/" + id + "_archive.torrent");
release.MagnetUri = GenerateMagnetLink((string)torrent["btih"], (string)torrent["title"]);
release.MagnetUri = GenerateMagnetLink((string)torrent["btih"], title);
release.InfoHash = (string)torrent["btih"];
release.MinimumRatio = 1;