add no check certificates option
This commit is contained in:
parent
927ea57a99
commit
82b2f651ab
4 changed files with 21 additions and 0 deletions
|
|
@ -76,6 +76,10 @@ class YTDLPUtil(private val context: Context) {
|
|||
}
|
||||
addOption("-P", FileUtil.getCachePath(context) + "/tmp")
|
||||
|
||||
if (sharedPreferences.getBoolean("no_check_certificates", true)) {
|
||||
addOption("--no-check-certificates")
|
||||
}
|
||||
|
||||
val extraCommands = sharedPreferences.getString("data_fetching_extra_commands", "")!!
|
||||
if (extraCommands.isNotBlank()){
|
||||
//addCommands(extraCommands.split(" ", "\t", "\n"))
|
||||
|
|
@ -644,6 +648,10 @@ class YTDLPUtil(private val context: Context) {
|
|||
}
|
||||
}
|
||||
|
||||
if (sharedPreferences.getBoolean("no_check_certificates", true)) {
|
||||
request.addOption("--no-check-certificates")
|
||||
}
|
||||
|
||||
val proxy = sharedPreferences.getString("proxy", "")
|
||||
if (proxy!!.isNotBlank()){
|
||||
request.addOption("--proxy", proxy)
|
||||
|
|
|
|||
5
app/src/main/res/drawable/baseline_note_24.xml
Normal file
5
app/src/main/res/drawable/baseline_note_24.xml
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:autoMirrored="true" android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp">
|
||||
|
||||
<path android:fillColor="?android:colorAccent" android:pathData="M22,10l-6,-6L4,4c-1.1,0 -2,0.9 -2,2v12.01c0,1.1 0.9,1.99 2,1.99l16,-0.01c1.1,0 2,-0.89 2,-1.99v-8zM15,5.5l5.5,5.5L15,11L15,5.5z"/>
|
||||
|
||||
</vector>
|
||||
|
|
@ -443,4 +443,5 @@
|
|||
<string name="ytdlp_recommnedations">YT-DLP Youtube Recommendations (needs cookies)</string>
|
||||
<string name="ytdlp_liked">YT-DLP Youtube Liked Videos (needs cookies)</string>
|
||||
<string name="ytdlp_watch_history">YT-DLP Youtube Watch History (needs cookies)</string>
|
||||
<string name="no_check_certificates">Suppress HTTPS certificate validation</string>
|
||||
</resources>
|
||||
|
|
@ -67,6 +67,13 @@
|
|||
android:key="use_cookies"
|
||||
app:title="@string/use_cookies" />
|
||||
|
||||
<SwitchPreferenceCompat
|
||||
android:widgetLayout="@layout/preferece_material_switch"
|
||||
app:defaultValue="true"
|
||||
android:icon="@drawable/baseline_note_24"
|
||||
android:key="no_check_certificates"
|
||||
app:title="@string/no_check_certificates" />
|
||||
|
||||
<EditTextPreference
|
||||
android:icon="@drawable/baseline_network_locked_24"
|
||||
app:key="proxy"
|
||||
|
|
|
|||
Loading…
Reference in a new issue