[codex] Add scoped EPG security trust controls (#1054)

* Add scoped EPG security trust controls

* fix: address scoped trust review feedback

---------

Co-authored-by: 4gray <fourgray@proton.me>
This commit is contained in:
4grayand4gray authored and GitHub committed 2026-06-12 20:46:24 +02:00
1 parent 9043116ebd
commit e8aa7c3a34
56 files changed
+1683 -243

No files matched your search

+19 -12
View File
@@ -25,7 +25,10 @@ import {
import { MatIconModule } from '@angular/material/icon';
import { MatSnackBar, MatSnackBarConfig } from '@angular/material/snack-bar';
import { Router } from '@angular/router';
import { EpgRuntimeBridgeService, EpgService } from '@iptvnator/epg/data-access';
import {
EpgRuntimeBridgeService,
EpgService,
} from '@iptvnator/epg/data-access';
import { SettingsContextService } from '@iptvnator/workspace/shell/util';
import { Store } from '@ngrx/store';
import { TranslateModule, TranslateService } from '@ngx-translate/core';
@@ -222,9 +225,7 @@ export class SettingsComponent implements OnInit, OnDestroy {
],
recordingFolder: '',
coverSize: 'medium' as CoverSize,
...(this.supportsEpg
? { preferUploadedEpgOverXtream: false }
: {}),
...(this.supportsEpg ? { preferUploadedEpgOverXtream: false } : {}),
});
/** Form array with epg sources */
@@ -241,12 +242,10 @@ export class SettingsComponent implements OnInit, OnDestroy {
readonly removeAllProgress = signal<DbOperationEvent | null>(null);
private settingsStore = inject(SettingsStore);
readonly sectionNavItems: SettingsSection[] = buildSettingsSectionNavItems(
{
supportsEpg: this.supportsEpg,
supportsRemoteControl: this.supportsRemoteControl,
}
);
readonly sectionNavItems: SettingsSection[] = buildSettingsSectionNavItems({
supportsEpg: this.supportsEpg,
supportsRemoteControl: this.supportsRemoteControl,
});
readonly playlistDeleteSummary = computed<SettingsPlaylistDeleteSummary>(
() => {
@@ -560,6 +559,10 @@ export class SettingsComponent implements OnInit, OnDestroy {
value.preferUploadedEpgOverXtream ??
currentSettings.preferUploadedEpgOverXtream ??
false,
trustedPrivateNetworkEpgUrls:
currentSettings.trustedPrivateNetworkEpgUrls ?? [],
trustedInsecureTlsHosts:
currentSettings.trustedInsecureTlsHosts ?? [],
};
}
@@ -616,7 +619,10 @@ export class SettingsComponent implements OnInit, OnDestroy {
if (!this.epgBridge.supportsDataManagement || !url) {
return;
}
void this.epgBridge.forceFetchEpg(url);
void this.epgBridge.forceFetchEpg(
url,
this.settingsStore.getTrustOptions()
);
}
/**
@@ -629,7 +635,8 @@ export class SettingsComponent implements OnInit, OnDestroy {
const urls = (this.epgUrl.value as string[])
.map((url) => url?.trim())
.filter((url): url is string => Boolean(url));
urls.forEach((url) => void this.epgBridge.forceFetchEpg(url));
const options = this.settingsStore.getTrustOptions();
urls.forEach((url) => void this.epgBridge.forceFetchEpg(url, options));
}
/**