mirror of
https://github.com/4gray/iptvnator.git
synced 2026-10-16 06:06:18 -08:00
[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:
1 parent
9043116ebd
commit
e8aa7c3a34
56 files changed
+1683
-243
No files matched your search
@@ -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));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user