Handle preferences v0 to v1 migration

This commit is contained in:
Brahim Hadriche committed 2024-12-05 20:41:53 -05:00
1 parent 335761aa8e
commit 1daddc9b91
1 file changed
+5
@@ -109,6 +109,11 @@ function MigrateExistingPreferences(userPrefs as object) as boolean
RegistryUtils.Delete(RegistryUtils.INVIDIOUS_INSTANCES)
end if
if ValidInt(userPrefs.__version) = 0
userPrefs.__version = 1
isDirty = true
end if
if userPrefs.__version = 1
if ValidString(userPrefs["playback.preferred_quality"]) = "medium"
userPrefs["playback.preferred_quality"] = "480p,360p"