fix: default monitoring mode to 'none' for new channels
Prevents accidental system bloat from auto-downloading all content on channel add. Users must explicitly opt in to monitoring.
This commit is contained in:
parent
f494d31e60
commit
1078b6dcd7
2 changed files with 4 additions and 4 deletions
|
|
@ -50,7 +50,7 @@ export function AddChannelModal({ open, onClose }: AddChannelModalProps) {
|
|||
const [url, setUrl] = useState('');
|
||||
const [checkInterval, setCheckInterval] = useState('');
|
||||
const [formatProfileId, setFormatProfileId] = useState<number | undefined>(undefined);
|
||||
const [monitoringMode, setMonitoringMode] = useState<string>('all');
|
||||
const [monitoringMode, setMonitoringMode] = useState<string>('none');
|
||||
|
||||
const createChannel = useCreateChannel();
|
||||
const { data: platformSettingsList } = usePlatformSettings();
|
||||
|
|
@ -113,7 +113,7 @@ export function AddChannelModal({ open, onClose }: AddChannelModalProps) {
|
|||
setUrl('');
|
||||
setCheckInterval('');
|
||||
setFormatProfileId(undefined);
|
||||
setMonitoringMode('all');
|
||||
setMonitoringMode('none');
|
||||
createChannel.reset();
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -154,10 +154,10 @@ export async function channelRoutes(fastify: FastifyInstance): Promise<void> {
|
|||
|
||||
// Derive monitoringEnabled from monitoringMode when provided;
|
||||
// preserve backward compat when only monitoringEnabled is sent
|
||||
const resolvedMode = monitoringMode ?? 'all';
|
||||
const resolvedMode = monitoringMode ?? 'none';
|
||||
const resolvedEnabled = monitoringMode
|
||||
? monitoringMode !== 'none'
|
||||
: (monitoringEnabled ?? true);
|
||||
: (monitoringEnabled ?? false);
|
||||
|
||||
request.log.info(
|
||||
{ resolvedMode, resolvedEnabled, platform: metadata.platform },
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue