Hide subscribe button when request is available

pull/4613/head
sephrat 3 years ago
parent eea8663f7d
commit a0e0ae1da3

@ -532,8 +532,11 @@ namespace Ombi.Core.Engine
x.ShowSubscribe = false; x.ShowSubscribe = false;
} }
else else
{
if (!x.Available && !x.Available4K)
{ {
x.ShowSubscribe = true; x.ShowSubscribe = true;
}
var hasSub = sub.FirstOrDefault(r => r.RequestId == x.Id); var hasSub = sub.FirstOrDefault(r => r.RequestId == x.Id);
x.Subscribed = hasSub != null; x.Subscribed = hasSub != null;
} }

@ -269,8 +269,11 @@ namespace Ombi.Core.Engine
x.ShowSubscribe = false; x.ShowSubscribe = false;
} }
else else
{
if (!x.Available)
{ {
x.ShowSubscribe = true; x.ShowSubscribe = true;
}
var hasSub = sub.FirstOrDefault(r => r.RequestId == x.Id); var hasSub = sub.FirstOrDefault(r => r.RequestId == x.Id);
x.Subscribed = hasSub != null; x.Subscribed = hasSub != null;
} }

@ -885,8 +885,11 @@ namespace Ombi.Core.Engine
x.ShowSubscribe = false; x.ShowSubscribe = false;
} }
else else
{
if (!x.Available)
{ {
x.ShowSubscribe = true; x.ShowSubscribe = true;
}
var result = relevantSubs.FirstOrDefault(s => s.RequestId == x.Id); var result = relevantSubs.FirstOrDefault(s => s.RequestId == x.Id);
x.Subscribed = result != null; x.Subscribed = result != null;
} }

Loading…
Cancel
Save