mirror of
https://github.com/Jackett/Jackett
synced 2025-01-01 12:46:23 +00:00
internetarchive: fix torrents without title (#8242)
This commit is contained in:
parent
8f269c57ab
commit
d9cea8b552
1 changed files with 23 additions and 23 deletions
|
@ -41,7 +41,7 @@ namespace Jackett.Common.Indexers
|
|||
private ConfigurationData ConfigData => configData;
|
||||
|
||||
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",
|
||||
link: "https://archive.org/",
|
||||
caps: new TorznabCapabilities(),
|
||||
|
@ -168,31 +168,31 @@ namespace Jackett.Common.Indexers
|
|||
|
||||
private ReleaseInfo MakeRelease(JToken torrent)
|
||||
{
|
||||
var release = new ReleaseInfo();
|
||||
|
||||
var title = GetFieldAs<string>("title", torrent);
|
||||
release.Title = title;
|
||||
|
||||
var id = GetFieldAs<string>("identifier", torrent);
|
||||
release.Comments = new Uri(CommentsUrl + id);
|
||||
release.Guid = release.Comments;
|
||||
|
||||
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 title = GetFieldAs<string>("title", torrent) ?? id;
|
||||
var comments = new Uri(CommentsUrl + id);
|
||||
var btih = GetFieldAs<string>("btih", torrent);
|
||||
release.Link = new Uri(LinkUrl + id + "/" + id + "_archive.torrent");
|
||||
release.MagnetUri = GenerateMagnetLink(btih, title);
|
||||
release.InfoHash = btih;
|
||||
var link = new Uri(LinkUrl + id + "/" + id + "_archive.torrent");
|
||||
|
||||
release.MinimumRatio = 1;
|
||||
release.MinimumSeedTime = 172800; // 48 hours
|
||||
release.DownloadVolumeFactor = 0;
|
||||
release.UploadVolumeFactor = 1;
|
||||
var release = new ReleaseInfo
|
||||
{
|
||||
Title = title,
|
||||
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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue