mirror of
https://github.com/4gray/iptvnator.git
synced 2026-10-11 11:06:16 -08:00
feat(xtream): add epg support for xtream portals
This commit is contained in:
1 parent
9b435483bc
commit
b4954d370c
3 files changed
+77
No files matched your search
@@ -0,0 +1,26 @@
|
||||
<div mat-subheader>Electronic Program Guide</div>
|
||||
<mat-list>
|
||||
@for (item of epgItems; track $index) {
|
||||
<mat-list-item [lines]="3">
|
||||
<div class="title" matListItemTitle>{{ item.title }}</div>
|
||||
<div class="description" matListItemLine>
|
||||
{{ item.description }}
|
||||
</div>
|
||||
<div matListItemLine>
|
||||
{{ item.start | date: 'HH:mm' }} -
|
||||
{{ item.end | date: 'HH:mm (dd.MM.yyyy)' }}
|
||||
</div>
|
||||
<span matListItemMeta>
|
||||
<button mat-icon-button (click)="showDetails(item)">
|
||||
<mat-icon>info</mat-icon>
|
||||
</button>
|
||||
</span>
|
||||
</mat-list-item>
|
||||
}
|
||||
|
||||
@if (epgItems?.length === 0) {
|
||||
<mat-list-item>
|
||||
{{ 'EPG.EPG_NOT_AVAILABLE_CHANNEL_TITLE' | translate }}
|
||||
</mat-list-item>
|
||||
}
|
||||
</mat-list>
|
||||
@@ -0,0 +1,39 @@
|
||||
import { DatePipe } from '@angular/common';
|
||||
import { Component, Input, inject } from '@angular/core';
|
||||
import { MatButtonModule } from '@angular/material/button';
|
||||
import { MatDialog } from '@angular/material/dialog';
|
||||
import { MatDividerModule } from '@angular/material/divider';
|
||||
import { MatIconModule } from '@angular/material/icon';
|
||||
import { MatListModule } from '@angular/material/list';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
import { EpgItemDescriptionComponent } from '../../player/components/epg-list/epg-item-description/epg-item-description.component';
|
||||
import { EpgItem } from '../../xtream/epg-item.interface';
|
||||
|
||||
@Component({
|
||||
standalone: true,
|
||||
selector: 'app-epg-view',
|
||||
templateUrl: './epg-view.component.html',
|
||||
imports: [
|
||||
DatePipe,
|
||||
EpgItemDescriptionComponent,
|
||||
MatButtonModule,
|
||||
MatDividerModule,
|
||||
MatIconModule,
|
||||
MatListModule,
|
||||
TranslateModule,
|
||||
],
|
||||
})
|
||||
export class EpgViewComponent {
|
||||
@Input() epgItems: EpgItem[];
|
||||
|
||||
dialog = inject(MatDialog);
|
||||
|
||||
showDetails(item: EpgItem) {
|
||||
this.dialog.open(EpgItemDescriptionComponent, {
|
||||
data: {
|
||||
title: [{ value: item.title, lang: item.lang }],
|
||||
desc: [{ value: item.description }],
|
||||
},
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
export interface EpgItem {
|
||||
id: string;
|
||||
epg_id: string;
|
||||
title: string;
|
||||
lang: string;
|
||||
start: string;
|
||||
end: string;
|
||||
description: string;
|
||||
channel_id: string;
|
||||
start_timestamp: string;
|
||||
stop_timestamp: string;
|
||||
}
|
||||
Reference in new issue
Block a user