mirror of
https://github.com/Jackett/Jackett.git
synced 2025-09-17 17:34:09 +02:00
internetarchive: fix torrents without title (#8242)
This commit is contained in:
@@ -41,7 +41,7 @@ namespace Jackett.Common.Indexers
|
|||||||
private ConfigurationData ConfigData => configData;
|
private ConfigurationData ConfigData => configData;
|
||||||
|
|
||||||
public InternetArchive(IIndexerConfigurationService configService, WebClient wc, Logger l, IProtectionService ps)
|
public InternetArchive(IIndexerConfigurationService configService, WebClient wc, Logger l, IProtectionService ps)
|
||||||
: base(name: "Internet Archive",
|
: base("Internet Archive",
|
||||||
description: "Internet Archive is a non-profit digital library offering free universal access to books, movies & music, as well as 406 billion archived web pages",
|
description: "Internet Archive is a non-profit digital library offering free universal access to books, movies & music, as well as 406 billion archived web pages",
|
||||||
link: "https://archive.org/",
|
link: "https://archive.org/",
|
||||||
caps: new TorznabCapabilities(),
|
caps: new TorznabCapabilities(),
|
||||||
@@ -168,31 +168,31 @@ namespace Jackett.Common.Indexers
|
|||||||
|
|
||||||
private ReleaseInfo MakeRelease(JToken torrent)
|
private ReleaseInfo MakeRelease(JToken torrent)
|
||||||
{
|
{
|
||||||
var release = new ReleaseInfo();
|
|
||||||
|
|
||||||
var title = GetFieldAs<string>("title", torrent);
|
|
||||||
release.Title = title;
|
|
||||||
|
|
||||||
var id = GetFieldAs<string>("identifier", torrent);
|
var id = GetFieldAs<string>("identifier", torrent);
|
||||||
release.Comments = new Uri(CommentsUrl + id);
|
var title = GetFieldAs<string>("title", torrent) ?? id;
|
||||||
release.Guid = release.Comments;
|
var comments = new Uri(CommentsUrl + id);
|
||||||
|
|
||||||
release.PublishDate = GetFieldAs<DateTime>("publicdate", torrent);
|
|
||||||
release.Category = MapTrackerCatToNewznab(GetFieldAs<string>("mediatype", torrent));
|
|
||||||
release.Size = GetFieldAs<long>("item_size", torrent);
|
|
||||||
release.Seeders = 1;
|
|
||||||
release.Peers = 2;
|
|
||||||
release.Grabs = GetFieldAs<long>("downloads", torrent);
|
|
||||||
|
|
||||||
var btih = GetFieldAs<string>("btih", torrent);
|
var btih = GetFieldAs<string>("btih", torrent);
|
||||||
release.Link = new Uri(LinkUrl + id + "/" + id + "_archive.torrent");
|
var link = new Uri(LinkUrl + id + "/" + id + "_archive.torrent");
|
||||||
release.MagnetUri = GenerateMagnetLink(btih, title);
|
|
||||||
release.InfoHash = btih;
|
|
||||||
|
|
||||||
release.MinimumRatio = 1;
|
var release = new ReleaseInfo
|
||||||
release.MinimumSeedTime = 172800; // 48 hours
|
{
|
||||||
release.DownloadVolumeFactor = 0;
|
Title = title,
|
||||||
release.UploadVolumeFactor = 1;
|
Comments = comments,
|
||||||
|
Guid = comments,
|
||||||
|
PublishDate = GetFieldAs<DateTime>("publicdate", torrent),
|
||||||
|
Category = MapTrackerCatToNewznab(GetFieldAs<string>("mediatype", torrent)),
|
||||||
|
Size = GetFieldAs<long>("item_size", torrent),
|
||||||
|
Seeders = 1,
|
||||||
|
Peers = 2,
|
||||||
|
Grabs = GetFieldAs<long>("downloads", torrent),
|
||||||
|
Link = link,
|
||||||
|
MagnetUri = GenerateMagnetLink(btih, title),
|
||||||
|
InfoHash = btih,
|
||||||
|
MinimumRatio = 1,
|
||||||
|
MinimumSeedTime = 172800, // 48 hours
|
||||||
|
DownloadVolumeFactor = 0,
|
||||||
|
UploadVolumeFactor = 1
|
||||||
|
};
|
||||||
|
|
||||||
return release;
|
return release;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user