mirror of
https://github.com/libre-tube/LibreTube.git
synced 2025-01-07 18:10:31 +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
|
* Load the YT url directly instead of the proxied Piped URL if enabled
|
||||||
*/
|
*/
|
||||||
fun unwrapIfEnabled(url: String): String {
|
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 {
|
return url.toHttpUrlOrNull()?.let {
|
||||||
it.newBuilder()
|
it.newBuilder()
|
||||||
.host(it.queryParameter("host").orEmpty())
|
.host(it.queryParameter("host").orEmpty())
|
||||||
|
@ -101,7 +101,7 @@
|
|||||||
android:icon="@drawable/ic_server"
|
android:icon="@drawable/ic_server"
|
||||||
android:summary="@string/disable_proxy_summary"
|
android:summary="@string/disable_proxy_summary"
|
||||||
android:title="@string/disable_proxy"
|
android:title="@string/disable_proxy"
|
||||||
app:key="lbry_hls" />
|
app:key="disable_video_image_proxy" />
|
||||||
|
|
||||||
</PreferenceCategory>
|
</PreferenceCategory>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user