(enabled)
| 386 | } |
| 387 | |
| 388 | async 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 | |
| 407 | async function getAutoUpdateSetting() { |
| 408 | try { |
nothing calls this directly
no test coverage detected