mirror of
https://github.com/libre-tube/LibreTube.git
synced 2024-12-14 14:20:30 +05:30
Fix the preference key of disable proxy preference
This commit is contained in:
parent
dba5dd048e
commit
5011c35413
@ -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())
|
||||
|
@ -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>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user