Fix the preference key of disable proxy preference

This commit is contained in:
Bnyro 2023-03-11 16:59:58 +01:00
parent dba5dd048e
commit 5011c35413
2 changed files with 9 additions and 2 deletions

View File

@ -32,7 +32,14 @@ object ProxyHelper {
* Load the YT url directly instead of the proxied Piped URL if enabled
*/
fun unwrapIfEnabled(url: String): String {
if (!PreferenceHelper.getBoolean(PreferenceKeys.DISABLE_VIDEO_IMAGE_PROXY, false)) return url
if (!PreferenceHelper.getBoolean(
PreferenceKeys.DISABLE_VIDEO_IMAGE_PROXY,
false
)
) {
return url
}
return url.toHttpUrlOrNull()?.let {
it.newBuilder()
.host(it.queryParameter("host").orEmpty())

View File

@ -101,7 +101,7 @@
android:icon="@drawable/ic_server"
android:summary="@string/disable_proxy_summary"
android:title="@string/disable_proxy"
app:key="lbry_hls" />
app:key="disable_video_image_proxy" />
</PreferenceCategory>