maybe fix decoder and whatever the fuck

This commit is contained in:
matty 2024-04-14 15:09:54 -04:00
parent a91b8b2a9a
commit 0b066aaa3a

4
dist/main.js vendored
View File

@ -128,11 +128,11 @@ async function unregister() {
} }
exports.unregister = unregister; exports.unregister = unregister;
async function loadSettings(settingsManager) { async function loadSettings(settingsManager) {
pluginSettings.hardwareDecode = await settingsManager.getSetting('hardware-decode') == "true"; pluginSettings.hardwareDecode = await settingsManager.getSetting('hardware-decode') || DEFAULT_HARDWARE_DECODE;
pluginSettings.vodQuality = parseInt(await settingsManager.getSetting('vod-quality')) || DEFAULT_VOD_QUALITY; pluginSettings.vodQuality = parseInt(await settingsManager.getSetting('vod-quality')) || DEFAULT_VOD_QUALITY;
pluginSettings.liveQuality = parseInt(await settingsManager.getSetting('live-quality')) || DEFAULT_LIVE_QUALITY; pluginSettings.liveQuality = parseInt(await settingsManager.getSetting('live-quality')) || DEFAULT_LIVE_QUALITY;
pluginSettings.hevcProfile = parseInt(await settingsManager.getSetting('hevc-profile')) || DEFAULT_HEVC_PROFILE; pluginSettings.hevcProfile = parseInt(await settingsManager.getSetting('hevc-profile')) || DEFAULT_HEVC_PROFILE;
pluginSettings.hevcEnabled = await settingsManager.getSetting('hevc-enabled') == "true"; pluginSettings.hevcEnabled = await settingsManager.getSetting('hevc-enabled') || DEFAULT_HEVC_ENABLED;
for (const [resolution, bitrate] of DEFAULT_BITRATES) { for (const [resolution, bitrate] of DEFAULT_BITRATES) {
const key = `base-bitrate-${resolution}`; const key = `base-bitrate-${resolution}`;
const storedValue = await settingsManager.getSetting(key); const storedValue = await settingsManager.getSetting(key);