mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-29 19:18:30 -07:00
Merge pull request #4613 from sephrat/subscribe-available
Hide subscribe button when request is closed
This commit is contained in:
commit
e827af7bed
3 changed files with 12 additions and 3 deletions
|
@ -532,8 +532,11 @@ namespace Ombi.Core.Engine
|
||||||
x.ShowSubscribe = false;
|
x.ShowSubscribe = false;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
if (!x.Available && !x.Available4K && (!x.Denied ?? true) && (!x.Denied4K ?? true))
|
||||||
{
|
{
|
||||||
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.Denied ?? false))
|
||||||
{
|
{
|
||||||
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.Denied ?? true))
|
||||||
{
|
{
|
||||||
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…
Add table
Add a link
Reference in a new issue