Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 15 additions & 3 deletions source/utils/settingsSync.bs
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,13 @@ namespace settingsSync
pluginValue = profile[mapping.pluginKey]
if not isValid(pluginValue) then continue for

rokuValue = settingsSync.PluginToRoku(pluginValue, mapping.type)
if mapping.pluginKey = "skipForwardLength" or mapping.pluginKey = "skipBackLength"
newValue = pluginValue / 1000
else
newValue = pluginValue
end if

rokuValue = settingsSync.PluginToRoku(newValue, mapping.type)
if not isValid(rokuValue) then continue for

tmpSettings[mapping.rokuKey] = toBoolean(rokuValue)
Expand Down Expand Up @@ -301,10 +307,16 @@ namespace settingsSync
sub PushToServer(rokuKey as string, rokuValue as dynamic)
if not settingsSync.IsSyncEnabled() then return

if rokuKey = "playback.skipForwardLength" or rokuKey = "playback.skipBackLength"
newValue = rokuValue * 1000
else
newValue = rokuValue
end if

mapping = settingsSync.FindMappingByRokuKey(rokuKey)
if not isValid(mapping)
if Left(rokuKey, 10) = "seerr.row."
pushData = settingsSync.PreparePush(rokuKey, rokuValue)
pushData = settingsSync.PreparePush(rokuKey, newValue)
if isValid(pushData)
task = createObject("roSGNode", "PostTask")
task.apiUrl = pushData.url
Expand All @@ -315,7 +327,7 @@ namespace settingsSync
return
end if

pluginValue = settingsSync.RokuToPlugin(rokuValue, mapping.type)
pluginValue = settingsSync.RokuToPlugin(newValue, mapping.type)
if not isValid(pluginValue) then return

profileData = {}
Expand Down