MCPcopy
hub / github.com/pickle-com/glass / updateContentProtection

Function updateContentProtection

src/features/settings/settingsService.js:388–405  ·  view source on GitHub ↗
(enabled)

Source from the content-addressed store, hash-verified

386}
387
388async function updateContentProtection(enabled) {
389 try {
390 const settings = await getSettings();
391 settings.contentProtection = enabled;
392
393 // Update content protection in main window
394 const { app } = require('electron');
395 const mainWindow = windowPool.get('main');
396 if (mainWindow && !mainWindow.isDestroyed()) {
397 mainWindow.setContentProtection(enabled);
398 }
399
400 return await saveSettings(settings);
401 } catch (error) {
402 console.error('[SettingsService] Error updating content protection:', error);
403 return { success: false, error: error.message };
404 }
405}
406
407async function getAutoUpdateSetting() {
408 try {

Callers

nothing calls this directly

Calls 3

getSettingsFunction · 0.85
saveSettingsFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected