diff --git a/src/app/xtream/playlist-error-view/playlist-error-view.component.html b/src/app/xtream/playlist-error-view/playlist-error-view.component.html
new file mode 100644
index 000000000..91ff3a778
--- /dev/null
+++ b/src/app/xtream/playlist-error-view/playlist-error-view.component.html
@@ -0,0 +1,21 @@
+
0
+ item?.info?.backdrop_path && item?.info?.backdrop_path.length > 0
? 'linear-gradient(to top, rgba(29,29,29,1) 0%, rgba(0,0,0,0.5) 100%), url(' +
- item.info.backdrop_path[0] +
+ item?.info?.backdrop_path[0] +
') repeat-x'
: 'none'
"
diff --git a/src/app/xtream/xtream-main-container.component.html b/src/app/xtream/xtream-main-container.component.html
index 96315d16f..a83f8f045 100644
--- a/src/app/xtream/xtream-main-container.component.html
+++ b/src/app/xtream/xtream-main-container.component.html
@@ -12,43 +12,53 @@
/>
-
+ @if (isLoading) {
-
-
-
-
-
-
-
-
-
-
-
-
+ } @else {
+ @switch (currentLayout) {
+ @case ('expired-account') {
+
+ }
+ @case ('category') {
+
+ }
+ @case ('category_content') {
+
+ }
+ @case ('vod-details') {
+
+ }
+ @case ('serie-details') {
+
+ }
+ @case ('favorites') {
+
+ }
+ }
+ }
diff --git a/src/app/xtream/xtream-main-container.component.ts b/src/app/xtream/xtream-main-container.component.ts
index 489369e53..6539e1c21 100644
--- a/src/app/xtream/xtream-main-container.component.ts
+++ b/src/app/xtream/xtream-main-container.component.ts
@@ -1,6 +1,5 @@
import {
AsyncPipe,
- JsonPipe,
KeyValuePipe,
NgFor,
NgIf,
@@ -45,16 +44,20 @@ import { VodDetailsComponent } from './vod-details/vod-details.component';
import { toSignal } from '@angular/core/rxjs-interop';
import { MatDialog } from '@angular/material/dialog';
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
+import { Router, RouterLink } from '@angular/router';
import { StorageMap } from '@ngx-pwa/local-storage';
+import { TranslateModule, TranslateService } from '@ngx-translate/core';
import { Observable } from 'rxjs';
import {
XtreamSerieDetails,
XtreamSerieEpisode,
} from '../../../shared/xtream-serie-details.interface';
+import { DialogService } from '../services/dialog.service';
import { PlaylistsService } from '../services/playlists.service';
import { Settings, VideoPlayer } from '../settings/settings.interface';
import { ExternalPlayerInfoDialogComponent } from '../shared/components/external-player-info-dialog/external-player-info-dialog.component';
import { STORE_KEY } from '../shared/enums/store-keys.enum';
+import { PlaylistErrorViewComponent } from '../xtream/playlist-error-view/playlist-error-view.component';
import { Breadcrumb, PortalActions } from './breadcrumb.interface';
import { ContentTypeNavigationItem } from './content-type-navigation-item.interface';
import { PlayerDialogComponent } from './player-dialog/player-dialog.component';
@@ -84,7 +87,8 @@ type LayoutView =
| 'vod-details'
| 'player'
| 'serie-details'
- | 'favorites';
+ | 'favorites'
+ | 'expired-account';
@Component({
selector: 'app-xtream-main-container',
@@ -96,7 +100,6 @@ type LayoutView =
MatButtonToggleModule,
NgFor,
NgIf,
- JsonPipe,
CategoryViewComponent,
NgSwitch,
MatButtonModule,
@@ -110,17 +113,23 @@ type LayoutView =
MatProgressSpinnerModule,
AsyncPipe,
ExternalPlayerInfoDialogComponent,
+ RouterLink,
+ PlaylistErrorViewComponent,
+ TranslateModule,
],
})
export class XtreamMainContainerComponent implements OnInit {
dataService = inject(DataService);
dialog = inject(MatDialog);
+ dialogService = inject(DialogService);
ngZone = inject(NgZone);
playlistService = inject(PlaylistsService);
portalStore = inject(PortalStore);
+ router = inject(Router);
snackBar = inject(MatSnackBar);
storage = inject(StorageMap);
store = inject(Store);
+ translate = inject(TranslateService);
currentPlaylist = this.store.selectSignal(selectCurrentPlaylist);
navigationContentTypes: ContentTypeNavigationItem[] = [
{
@@ -192,6 +201,9 @@ export class XtreamMainContainerComponent implements OnInit {
}
handleResponse(response: XtreamResponse) {
+ if ((response.payload as any)?.user_info?.status === 'Expired') {
+ this.currentLayout = 'expired-account';
+ }
switch (response.action) {
case XtreamCodeActions.GetSeriesCategories:
case XtreamCodeActions.GetVodCategories:
diff --git a/src/assets/i18n/en.json b/src/assets/i18n/en.json
index 95ddb8f62..23c33579b 100644
--- a/src/assets/i18n/en.json
+++ b/src/assets/i18n/en.json
@@ -152,7 +152,7 @@
"UNNAMED_CHANNEL": "Unnamed Channel",
"FAVORITES": "Favorites",
"NO_FAVORITES": "No favorites yet",
- "USE_STAR_TO_FAVORITE": "Please use the 'star' icon to add channels to this list.",
+ "USE_STAR_TO_FAVORITE": "Please use 'star' icon to add channels to your favorites.",
"REMOVE_FAVORITE": "Remove from favorites",
"FAVORITES_UPDATED": "Favorites were updated!"
},
@@ -234,6 +234,13 @@
"ALL_CATEGORIES": "All categories",
"MY_FAVORITES": "My favorites",
"ADD_TO_FAVORITES": "Add to favorites",
- "REMOVE_FROM_FAVORITES": "Remove from favorites"
+ "REMOVE_FROM_FAVORITES": "Remove from favorites",
+ "ACCOUNT_EXPIRED_VIEW": {
+ "TITLE": "Account expired",
+ "DESCRIPTION": "This account has been expired. Please check the credentials in playlist settings or remove it.",
+ "PLAYLIST_SETTINGS": "Playlist Settings",
+ "HOME": "Home",
+ "DELETE": "Delete"
+ }
}
}
diff --git a/src/assets/images/broken-tv.svg b/src/assets/images/broken-tv.svg
new file mode 100644
index 000000000..0d37bd66f
--- /dev/null
+++ b/src/assets/images/broken-tv.svg
@@ -0,0 +1 @@
+
\ No newline at end of file