mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-23 14:55:20 -07:00
Fix publish date #239
This commit is contained in:
parent
dd0a033b0f
commit
b576ae813d
3 changed files with 11 additions and 4 deletions
|
@ -1,4 +1,5 @@
|
||||||
using System.Collections.Generic;
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
using NzbDrone.Common.Http;
|
using NzbDrone.Common.Http;
|
||||||
|
@ -36,7 +37,7 @@ namespace NzbDrone.Core.Indexers.TorrentPotato
|
||||||
torrentInfo.Size = (long)torrent.size*1000*1000;
|
torrentInfo.Size = (long)torrent.size*1000*1000;
|
||||||
torrentInfo.DownloadUrl = torrent.download_url;
|
torrentInfo.DownloadUrl = torrent.download_url;
|
||||||
torrentInfo.InfoUrl = torrent.details_url;
|
torrentInfo.InfoUrl = torrent.details_url;
|
||||||
torrentInfo.PublishDate = torrent.publishdate.ToUniversalTime();
|
torrentInfo.PublishDate = torrent.publish_date.ToUniversalTime();
|
||||||
torrentInfo.Seeders = torrent.seeders;
|
torrentInfo.Seeders = torrent.seeders;
|
||||||
torrentInfo.Peers = torrent.leechers + torrent.seeders;
|
torrentInfo.Peers = torrent.leechers + torrent.seeders;
|
||||||
torrentInfo.Freeleech = torrent.freeleech;
|
torrentInfo.Freeleech = torrent.freeleech;
|
||||||
|
|
|
@ -21,7 +21,7 @@ namespace NzbDrone.Core.Indexers.TorrentPotato
|
||||||
public int size { get; set; }
|
public int size { get; set; }
|
||||||
public int leechers { get; set; }
|
public int leechers { get; set; }
|
||||||
public int seeders { get; set; }
|
public int seeders { get; set; }
|
||||||
public DateTime publishdate { get; set; }
|
public DateTime publish_date { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,7 +39,13 @@ namespace NzbDrone.Core.Indexers.Torznab
|
||||||
protected override ReleaseInfo ProcessItem(XElement item, ReleaseInfo releaseInfo)
|
protected override ReleaseInfo ProcessItem(XElement item, ReleaseInfo releaseInfo)
|
||||||
{
|
{
|
||||||
var torrentInfo = base.ProcessItem(item, releaseInfo) as TorrentInfo;
|
var torrentInfo = base.ProcessItem(item, releaseInfo) as TorrentInfo;
|
||||||
|
if (GetImdbId(item) != null)
|
||||||
|
{
|
||||||
|
if (torrentInfo != null)
|
||||||
|
{
|
||||||
torrentInfo.ImdbId = int.Parse(GetImdbId(item).Substring(2));
|
torrentInfo.ImdbId = int.Parse(GetImdbId(item).Substring(2));
|
||||||
|
}
|
||||||
|
}
|
||||||
return torrentInfo;
|
return torrentInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue