mirror of
https://github.com/4gray/iptvnator.git
synced 2026-10-10 10:06:15 -08:00
refactor: update imports and provide Xtream data
This commit is contained in:
1 parent
46a78f2d86
commit
5ad74e44ab
12 files changed
+17
-16
No files matched your search
@@ -26,6 +26,7 @@ import { AppConfig } from '../environments/environment';
|
||||
import { routes } from './app.routes';
|
||||
import { ElectronService } from './services/electron.service';
|
||||
import { PwaService } from './services/pwa.service';
|
||||
import { provideXtreamDataSource } from './xtream-tauri/data-sources';
|
||||
|
||||
// AoT requires an exported function for factories
|
||||
export function HttpLoaderFactory(http: HttpClient): TranslateHttpLoader {
|
||||
@@ -84,5 +85,6 @@ export const appConfig: ApplicationConfig = {
|
||||
useFactory: DataFactory,
|
||||
deps: [NgxIndexedDBService, HttpClient],
|
||||
},
|
||||
...provideXtreamDataSource(),
|
||||
],
|
||||
};
|
||||
+1
-1
@@ -8,7 +8,7 @@ import { StalkerSeriesViewComponent } from '../../stalker/stalker-series-view/st
|
||||
import { StalkerStore } from '../../stalker/stalker.store';
|
||||
import { VodDetailsComponent } from '../../xtream/vod-details/vod-details.component';
|
||||
import { PlaylistErrorViewComponent } from '../playlist-error-view/playlist-error-view.component';
|
||||
import { XtreamStore } from '../xtream.store';
|
||||
import { XtreamStore } from '../stores/xtream.store';
|
||||
|
||||
@Component({
|
||||
selector: 'app-category-content-view',
|
||||
|
||||
@@ -8,7 +8,7 @@ import { XtreamCategory } from 'shared-interfaces';
|
||||
import { FavoritesLayoutComponent } from '../../shared/components/favorites-layout/favorites-layout.component';
|
||||
import { FavoriteItem } from '../services/favorite-item.interface';
|
||||
import { FavoritesService } from '../services/favorites.service';
|
||||
import { XtreamStore } from '../xtream.store';
|
||||
import { XtreamStore } from '../stores/xtream.store';
|
||||
|
||||
@Component({
|
||||
selector: 'app-favorites',
|
||||
|
||||
@@ -25,7 +25,7 @@ import {
|
||||
import { CategoryViewComponent } from '../category-view/category-view.component';
|
||||
import { PortalChannelsListComponent } from '../portal-channels-list/portal-channels-list.component';
|
||||
import { FavoritesService } from '../services/favorites.service';
|
||||
import { XtreamStore } from '../xtream.store';
|
||||
import { XtreamStore } from '../stores/xtream.store';
|
||||
|
||||
@Component({
|
||||
selector: 'app-live-stream-layout',
|
||||
|
||||
@@ -11,7 +11,7 @@ import { selectPlaylistById } from 'm3u-state';
|
||||
import { Playlist } from 'shared-interfaces';
|
||||
import { SettingsComponent } from '../../settings/settings.component';
|
||||
import { AccountInfoComponent } from '../account-info/account-info.component';
|
||||
import { XtreamStore } from '../xtream.store';
|
||||
import { XtreamStore } from '../stores/xtream.store';
|
||||
import { NavigationItem } from './navigation.interface';
|
||||
|
||||
@Component({
|
||||
|
||||
+1
-1
@@ -26,7 +26,7 @@ import { FilterPipe } from '@iptvnator/pipes';
|
||||
import { TranslatePipe } from '@ngx-translate/core';
|
||||
import { XtreamCategory, XtreamItem } from 'shared-interfaces';
|
||||
import { FavoritesService } from '../services/favorites.service';
|
||||
import { XtreamStore } from '../xtream.store';
|
||||
import { XtreamStore } from '../stores/xtream.store';
|
||||
|
||||
interface EpgProgram {
|
||||
id: string;
|
||||
|
||||
@@ -6,7 +6,7 @@ import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';
|
||||
import { MatIcon } from '@angular/material/icon';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import groupBy from 'lodash/groupBy';
|
||||
import { XtreamStore } from '../xtream.store';
|
||||
import { XtreamStore } from '../stores/xtream.store';
|
||||
|
||||
@Component({
|
||||
selector: 'app-recently-viewed',
|
||||
|
||||
@@ -25,10 +25,11 @@ import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { TranslatePipe } from '@ngx-translate/core';
|
||||
import groupBy from 'lodash/groupBy';
|
||||
import { DatabaseService } from 'services';
|
||||
import { XtreamItem } from 'shared-interfaces';
|
||||
import { XtreamContentItem } from '../data-sources/xtream-data-source.interface';
|
||||
import { ContentType } from '../xtream-state';
|
||||
import { SearchFormComponent } from '../../shared/components/search-form/search-form.component';
|
||||
import { SearchResultItemComponent } from '../../shared/components/search-result-item/search-result-item.component';
|
||||
import { XtreamStore } from '../xtream.store';
|
||||
import { XtreamStore } from '../stores/xtream.store';
|
||||
|
||||
interface SearchResultsData {
|
||||
isGlobalSearch: boolean;
|
||||
@@ -138,9 +139,7 @@ export class SearchResultsComponent implements AfterViewInit {
|
||||
}
|
||||
}
|
||||
|
||||
selectItem(
|
||||
item: XtreamItem & { playlist_id?: string; playlist_name?: string }
|
||||
) {
|
||||
selectItem(item: XtreamContentItem) {
|
||||
if (this.isGlobalSearch && item.playlist_id) {
|
||||
this.dialogRef?.close();
|
||||
const type = item.type === 'movie' ? 'vod' : item.type;
|
||||
@@ -152,7 +151,7 @@ export class SearchResultsComponent implements AfterViewInit {
|
||||
item.xtream_id,
|
||||
]);
|
||||
} else {
|
||||
const type = item.type === 'movie' ? 'vod' : item.type;
|
||||
const type = (item.type === 'movie' ? 'vod' : item.type) as ContentType;
|
||||
this.xtreamStore.resetSearchResults();
|
||||
this.xtreamStore.setSelectedContentType(type);
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ import { TranslatePipe } from '@ngx-translate/core';
|
||||
import { ContentHeroComponent } from 'components';
|
||||
import { XtreamSerieEpisode } from 'shared-interfaces';
|
||||
import { SeasonContainerComponent } from '../season-container/season-container.component';
|
||||
import { XtreamStore } from '../xtream.store';
|
||||
import { XtreamStore } from '../stores/xtream.store';
|
||||
|
||||
@Component({
|
||||
selector: 'app-serial-details',
|
||||
|
||||
@@ -7,7 +7,7 @@ import { TranslateModule } from '@ngx-translate/core';
|
||||
import { ContentHeroComponent } from 'components';
|
||||
import { XtreamVodDetails } from 'shared-interfaces';
|
||||
import { SettingsStore } from '../../services/settings-store.service';
|
||||
import { XtreamStore } from '../xtream.store';
|
||||
import { XtreamStore } from '../stores/xtream.store';
|
||||
import { SafePipe } from './safe.pipe';
|
||||
|
||||
@Component({
|
||||
|
||||
@@ -12,7 +12,7 @@ import {
|
||||
CategoryManagementDialogData,
|
||||
} from './category-management-dialog/category-management-dialog.component';
|
||||
import { CategoryViewComponent } from './category-view/category-view.component';
|
||||
import { XtreamStore } from './xtream.store';
|
||||
import { XtreamStore } from './stores/xtream.store';
|
||||
|
||||
@Component({
|
||||
selector: 'app-xtream-main-container',
|
||||
|
||||
@@ -7,7 +7,7 @@ import { PlaylistActions } from 'm3u-state';
|
||||
import { LoadingOverlayComponent } from '../loading-overlay/loading-overlay.component';
|
||||
import { NavigationComponent } from '../navigation/navigation.component';
|
||||
import { NavigationItem } from '../navigation/navigation.interface';
|
||||
import { XtreamStore } from '../xtream.store';
|
||||
import { XtreamStore } from '../stores/xtream.store';
|
||||
|
||||
@Component({
|
||||
templateUrl: './xtream-shell.component.html',
|
||||
|
||||
Reference in new issue
Block a user