Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { ScheduleLink, SchedulerSummary } from 'src/app/schedule/schedule.compon
import { DataService } from 'src/app/services/data.service';
import { DvrService } from 'src/app/services/dvr.service';
import { ProgramList, ScheduleOrProgram } from 'src/app/services/interfaces/program.interface';
import { RecRule } from 'src/app/services/interfaces/recording.interface';

@Component({
selector: 'app-upcoming',
Expand All @@ -15,29 +16,53 @@ import { ProgramList, ScheduleOrProgram } from 'src/app/services/interfaces/prog
export class UpcomingComponent implements OnInit, SchedulerSummary {


recordings!: ProgramList;
programs: ScheduleOrProgram[] = [];
recRules: RecRule[] = [];
editingProgram?: ScheduleOrProgram;
displayUpdateDlg = false;
displayUnsaved = false;
successCount = 0;
errorCount = 0;
showAllStatuses = false;
recordId = 0;
refreshing = false;
loaded = false;
inter: ScheduleLink = { summaryComponent: this };

constructor(private dvrService: DvrService, private messageService: MessageService,
private translate: TranslateService, public dataService: DataService) {
this.loadRecRules();
this.refresh();
}

refresh() {
this.refreshing = true;
this.dvrService.GetUpcomingList({ ShowAll: this.showAllStatuses }).subscribe(data => {
this.recordings = data.ProgramList
this.dvrService.GetUpcomingList({ ShowAll: this.showAllStatuses, RecordId: this.recordId }).subscribe(data => {
this.programs = data.ProgramList.Programs;
this.loaded = true;
this.refreshing = false;
});
}

loadRecRules() {
this.recRules = [];
this.errorCount = 0;

this.dvrService.GetRecordScheduleList({}).subscribe({
next: (data) => {
this.recRules = [];
this.recRules.push(<RecRule>{Id: 0, Title: 'All'});
data.RecRuleList.RecRules.forEach((entry) => {
if (entry.Type != 'Recording Template')
this.recRules.push(entry);
});
},
error: (err: any) => {
this.errorCount++
}
});
}

ngOnInit(): void { }

}
2 changes: 1 addition & 1 deletion mythtv/html/backend/src/proxy.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const PROXY_CONFIG = [
"/Channel",
"/Video",
],
target: "http://localhost:6744",
target: "http://localhost:6544",
}
]

Expand Down