Fixed a bug where we were marking the wrong episodes as available #1513 #865

pull/1529/head
Jamie.Rees 7 years ago
parent 66ad62beb5
commit af2f8d1380

@ -232,7 +232,7 @@ namespace Ombi.Core.Engine
foreach (var episode in season.Episodes) foreach (var episode in season.Episodes)
{ {
var epExists = await allEpisodes.FirstOrDefaultAsync(x => var epExists = await allEpisodes.FirstOrDefaultAsync(x =>
x.EpisodeNumber == episode.EpisodeNumber && x.SeasonNumber == season.SeasonNumber); x.EpisodeNumber == episode.EpisodeNumber && x.SeasonNumber == season.SeasonNumber && x.Series.ProviderId == item.Id.ToString());
if (epExists != null) if (epExists != null)
{ {
episode.Available = true; episode.Available = true;

@ -33,11 +33,13 @@ export class AppComponent implements OnInit {
this.router.events.subscribe(() => { this.router.events.subscribe(() => {
this.user = this.authService.claims(); this.user = this.authService.claims();
this.showNav = this.authService.loggedIn(); this.showNav = this.authService.loggedIn();
});
if (this.user !== null && this.user.name) { if (this.user !== null && this.user.name) {
this.jobService.getCachedUpdate().subscribe(x => this.updateAvailable = x); this.jobService.getCachedUpdate().subscribe(x => {
} this.updateAvailable = (x === true);
});
}
});
} }
public hasRole(role: string): boolean { public hasRole(role: string): boolean {

Loading…
Cancel
Save