bump + legal notice

This commit is contained in:
LagradOst 2021-09-07 21:16:12 +02:00
parent 3cc4e3b262
commit 6a7de5a27b
7 changed files with 59 additions and 15 deletions

View file

@ -31,8 +31,8 @@ android {
applicationId "com.lagradost.cloudstream3"
minSdkVersion 21
targetSdkVersion 30
versionCode 19
versionName "1.7.5"
versionCode 20
versionName "1.7.6"
resValue "string", "app_version",
"${defaultConfig.versionName}${versionNameSuffix ?: ""}"

View file

@ -389,11 +389,21 @@ class MainActivity : AppCompatActivity(), ColorPickerDialogListener {
try {
val settingsManager = PreferenceManager.getDefaultSharedPreferences(this)
val count = settingsManager.getInt(getString(R.string.benene_count), 0)
if (count > 30)
if (count > 30 && restrictedApis.size > 0 && !apis.contains(restrictedApis.first()))
apis.addAll(restrictedApis)
} catch (e: Exception) {
e.printStackTrace()
}
/*
val relativePath = (Environment.DIRECTORY_DOWNLOADS) + File.separatorChar
val displayName = "output.dex" //""output.dex"
val file = getExternalFilesDir(null)?.absolutePath + File.separatorChar + displayName//"${Environment.getExternalStorageDirectory()}${File.separatorChar}$relativePath$displayName"
println(file)
val realFile = File(file)
println("REAALFILE: ${realFile.exists()} at ${realFile.length()}" )
val src = ExtensionManager.getSourceFromDex(this, "com.example.testdex2.TestClassToDex", File(file))
val output = src?.doMath()
println("MASTER OUTPUT = $output")*/
}
}

View file

@ -2,6 +2,7 @@ package com.lagradost.cloudstream3.ui.settings
import android.os.Bundle
import android.widget.Toast
import androidx.appcompat.app.AlertDialog
import androidx.preference.Preference
import androidx.preference.PreferenceFragmentCompat
import androidx.preference.PreferenceManager
@ -39,6 +40,15 @@ class SettingsFragment : PreferenceFragmentCompat() {
val localePreference = findPreference<Preference>(getString(R.string.locale_key))!!
val benenePreference = findPreference<Preference>(getString(R.string.benene_count))!!
val watchQualityPreference = findPreference<Preference>(getString(R.string.quality_pref_key))!!
val legalPreference = findPreference<Preference>(getString(R.string.legal_notice_key))!!
legalPreference.setOnPreferenceClickListener {
val builder: AlertDialog.Builder = AlertDialog.Builder(it.context)
builder.setTitle(R.string.legal_notice)
builder.setMessage(R.string.legal_notice_text)
builder.show()
return@setOnPreferenceClickListener true
}
watchQualityPreference.setOnPreferenceClickListener {
val prefNames = resources.getStringArray(R.array.quality_pref)

View file

@ -1,23 +1,23 @@
package com.lagradost.cloudstream3.utils
/*
import android.content.Context
import dalvik.system.PathClassLoader
import java.io.File
class ExtensionManager {
interface TestSource {
fun doMath(): Int
}
fun getSourceFromDex(context: Context, pkgName: String, file: File): TestSource? {
val loader = PathClassLoader(file.absolutePath, null, context.classLoader)
var source: TestSource? = null
source = when (val obj = Class.forName(pkgName, false, loader).newInstance()) {
is TestSource -> obj
else -> null
}
return source
open class TestSource {
open fun doMath(): Int {
return 33
}
}
object ExtensionManager {
fun getSourceFromDex(context: Context, pkgName: String, file: File): TestSource? {
val loader = PathClassLoader(file.absolutePath, context.classLoader)
val obj = Class.forName(pkgName, false, loader).newInstance()
if (obj is TestSource) {
println("MATH : ${obj.doMath()}")
}
return null
}
}*/

View file

@ -0,0 +1,5 @@
<vector android:height="24dp" android:tint="#FFFFFF"
android:viewportHeight="24" android:viewportWidth="24"
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="@android:color/white" android:pathData="M1,21h22L12,2 1,21zM13,18h-2v-2h2v2zM13,14h-2v-4h2v4z"/>
</vector>

View file

@ -243,4 +243,17 @@
<string name="dont_show_again">Don\'t show again</string>
<string name="update">Update</string>
<string name="watch_quality_pref">Preferred watch quality</string>
<string name="legal_notice" translatable="false">Legal Notice</string>
<string name="legal_notice_key" translatable="false">legal_notice_key</string>
<string name="legal_notice_text" translatable="false">Any legal issues regarding the content on this application should be taken up with the actual file hosts and providers themselves as we are not affiliated with them.
In case of copyright infringement, please directly contact the responsible parties or the streaming websites.
The app is purely for educational and personal use.
CloudStream 3 does not host any content on the app, and has no control over what media is put up or taken down. CloudStream 3 functions like any other search engine, such as Google. CloudStream 3 does not host, upload or manage any videos, films or content. It simply crawls, aggregates and displayes links in a convenient, user-friendly interface.
It merely scrapes 3rd-party websites that are publicly accessable via any regular web browser. It is the responsibility of user to avoid any actions that might violate the laws governing his/her locality. Use CloudStream 3 at your own risk.
</string>
</resources>

View file

@ -81,6 +81,12 @@
android:title="@string/settings_info"
app:isPreferenceVisible="true"
>
<Preference
android:key="@string/legal_notice_key"
android:title="@string/legal_notice"
android:icon="@drawable/ic_baseline_warning_24">
</Preference>
<Preference
android:key="@string/locale_key"
android:title="@string/app_language"