diff --git a/source/utils/settingsSync.bs b/source/utils/settingsSync.bs index 36b9541cb..9c33642ad 100644 --- a/source/utils/settingsSync.bs +++ b/source/utils/settingsSync.bs @@ -58,8 +58,8 @@ namespace settingsSync { pluginKey: "autoplayNextEpisode", rokuKey: "playback.showNextUpAfterFinish", type: "bool" }, { pluginKey: "resumeSubtractDuration", rokuKey: "playback.resumeRewind", type: "intToStr" }, { pluginKey: "unpauseRewindDuration", rokuKey: "playback.unpauseRewind", type: "intToStr" }, - { pluginKey: "skipBackLength", rokuKey: "playback.skipBackLength", type: "intToStr" }, - { pluginKey: "skipForwardLength", rokuKey: "playback.skipForwardLength", type: "intToStr" }, + { pluginKey: "skipBackLength", rokuKey: "playback.skipBackLength", type: "secondsToMs" }, + { pluginKey: "skipForwardLength", rokuKey: "playback.skipForwardLength", type: "secondsToMs" }, { pluginKey: "preferAudioDescription", rokuKey: "playback.preferAudioDescription", type: "bool" }, { pluginKey: "preferSdhSubtitles", rokuKey: "playback.preferSdhSubtitles", type: "bool" }, { pluginKey: "seerrBlockNsfw", rokuKey: "seerr.blockNsfw", type: "bool" }, @@ -431,6 +431,13 @@ namespace settingsSync return isTrue ? "false" : "true" else if conversionType = "intToStr" return pluginValue.toStr() + else if conversionType = "secondsToMs" + ' A reading under a second is already in seconds, since the smallest value stored + ' as milliseconds is 1000 + raw = val(pluginValue.toStr()) + if raw <= 0 then return invalid + if raw >= 1000 then raw = raw / 1000 + return int(raw).toStr() else if conversionType = "jsonArray" if type(pluginValue) = "roArray" or type(pluginValue) = "Array" return FormatJson(pluginValue) @@ -489,6 +496,10 @@ namespace settingsSync return not (LCase(rokuStr) = "true") else if conversionType = "intToStr" return val(rokuStr) + else if conversionType = "secondsToMs" + seconds = int(val(rokuStr)) + if seconds <= 0 then return invalid + return seconds * 1000 else if conversionType = "jsonArray" parsed = ParseJson(rokuStr) if type(parsed) = "roArray" or type(parsed) = "Array"