Potential bug fixes and code cleanup

This commit is contained in:
zone117x
2015-05-04 22:25:28 -06:00
parent c0a7d00ffc
commit 4aca537a92
10 changed files with 29 additions and 59 deletions

View File

@@ -69,16 +69,16 @@ namespace Jackett
select new XElement("item",
new XElement("title", r.Title),
new XElement("guid", r.Guid),
new XElement("comments", r.Comments.ToString()),
new XElement("pubDate", xmlDateFormat(r.PublishDate)),
new XElement("size", r.Size),
r.Comments == null ? null : new XElement("comments", r.Comments.ToString()),
r.PublishDate == DateTime.MinValue ? null : new XElement("pubDate", xmlDateFormat(r.PublishDate)),
r.Size == null ? null : new XElement("size", r.Size),
new XElement("description", r.Description),
new XElement("link", r.Link ?? r.MagnetUri),
r.Category == null ? null : new XElement("category", r.Category),
new XElement(
"enclosure",
new XAttribute("url", r.Link ?? r.MagnetUri),
new XAttribute("length", r.Size),
r.Size == null ? null : new XAttribute("length", r.Size),
new XAttribute("type", "application/x-bittorrent")
),
getTorznabElement("magneturl", r.MagnetUri),