mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-23 06:45:19 -07:00
Fix ordering in PTP, should prefer GP releases (#667)
* Fix ordering in PTP, should prefer GP releases * Apply more checks
This commit is contained in:
parent
0941247f63
commit
f577590ad6
1 changed files with 30 additions and 10 deletions
|
@ -56,14 +56,6 @@ namespace NzbDrone.Core.Indexers.PassThePopcorn
|
||||||
title = $"{title} ✔";
|
title = $"{title} ✔";
|
||||||
}
|
}
|
||||||
|
|
||||||
//if (IsPropertyExist(torrent, "RemasterTitle"))
|
|
||||||
//{
|
|
||||||
// if (torrent.RemasterTitle != null)
|
|
||||||
// {
|
|
||||||
// title = $"{title} - {torrent.RemasterTitle}";
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
|
|
||||||
// Only add approved torrents
|
// Only add approved torrents
|
||||||
if (_settings.Approved && torrent.Checked)
|
if (_settings.Approved && torrent.Checked)
|
||||||
{
|
{
|
||||||
|
@ -109,9 +101,37 @@ namespace NzbDrone.Core.Indexers.PassThePopcorn
|
||||||
}
|
}
|
||||||
|
|
||||||
// prefer golden
|
// prefer golden
|
||||||
|
if (_settings.Golden)
|
||||||
|
{
|
||||||
|
if (_settings.Scene)
|
||||||
|
{
|
||||||
|
return
|
||||||
|
torrentInfos.OrderByDescending(o => o.PublishDate)
|
||||||
|
.ThenBy(o => ((dynamic)o).Golden ? 0 : 1)
|
||||||
|
.ThenBy(o => ((dynamic) o).Scene ? 0 : 1)
|
||||||
|
.ToArray();
|
||||||
|
}
|
||||||
|
return
|
||||||
|
torrentInfos.OrderByDescending(o => o.PublishDate)
|
||||||
|
.ThenBy(o => ((dynamic)o).Golden ? 0 : 1)
|
||||||
|
.ToArray();
|
||||||
|
}
|
||||||
|
|
||||||
// prefer scene
|
// prefer scene
|
||||||
// require approval
|
if (_settings.Scene)
|
||||||
return torrentInfos.OrderBy(o => ((dynamic)o).Golden ? 0 : 1).ThenBy(o => ((dynamic)o).Scene ? 0 : 1).ThenByDescending(o => ((dynamic)o).PublishDate).ToArray();
|
{
|
||||||
|
return
|
||||||
|
torrentInfos.OrderByDescending(o => o.PublishDate)
|
||||||
|
.ThenBy(o => ((dynamic)o).Scene ? 0 : 1)
|
||||||
|
.ToArray();
|
||||||
|
}
|
||||||
|
|
||||||
|
// order by date
|
||||||
|
return
|
||||||
|
torrentInfos
|
||||||
|
.OrderByDescending(o => o.PublishDate)
|
||||||
|
.ToArray();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private string GetDownloadUrl(int torrentId, string authKey, string passKey)
|
private string GetDownloadUrl(int torrentId, string authKey, string passKey)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue