Nsfw content blocked by default
This commit is contained in:
parent
66428e0c34
commit
305acc87e7
|
@ -9,6 +9,7 @@ object ManagerSingleton {
|
||||||
var url: String?= null
|
var url: String?= null
|
||||||
var user: UserModel = UserModel()
|
var user: UserModel = UserModel()
|
||||||
var token: TokenModel = TokenModel()
|
var token: TokenModel = TokenModel()
|
||||||
|
var nfsw: Boolean = false
|
||||||
// var keys:
|
// var keys:
|
||||||
|
|
||||||
fun Toast(text: String?) {
|
fun Toast(text: String?) {
|
||||||
|
|
|
@ -24,8 +24,9 @@ class SplashActivity : AppCompatActivity() {
|
||||||
|
|
||||||
settings = PreferenceManager.getDefaultSharedPreferences(this)
|
settings = PreferenceManager.getDefaultSharedPreferences(this)
|
||||||
|
|
||||||
editor = settings.edit()
|
|
||||||
ManagerSingleton.context = this
|
ManagerSingleton.context = this
|
||||||
|
ManagerSingleton.nfsw = settings.getBoolean("show_nfsw", false)
|
||||||
|
|
||||||
val host = settings.getString("hostP2play","")
|
val host = settings.getString("hostP2play","")
|
||||||
val lastHost = settings.getString("last_host","")
|
val lastHost = settings.getString("last_host","")
|
||||||
|
|
|
@ -3,6 +3,7 @@ package org.libre.agosto.p2play.ajax
|
||||||
import android.util.JsonReader
|
import android.util.JsonReader
|
||||||
import android.util.JsonToken
|
import android.util.JsonToken
|
||||||
import android.util.Log
|
import android.util.Log
|
||||||
|
import org.libre.agosto.p2play.ManagerSingleton
|
||||||
import org.libre.agosto.p2play.models.VideoModel
|
import org.libre.agosto.p2play.models.VideoModel
|
||||||
import java.io.InputStreamReader
|
import java.io.InputStreamReader
|
||||||
|
|
||||||
|
@ -92,7 +93,8 @@ class Videos: Client() {
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun getVideos(start:Int, count:Int, sort:String = "-publishedAt", filter:String = ""):ArrayList<VideoModel>{
|
private fun getVideos(start:Int, count:Int, sort:String = "-publishedAt", filter:String = ""):ArrayList<VideoModel>{
|
||||||
var params = "start=$start&count=$count&sort=$sort"
|
val nfsw = ManagerSingleton.nfsw
|
||||||
|
var params = "start=$start&count=$count&sort=$sort&nsfw=$nfsw"
|
||||||
if(filter != "")
|
if(filter != "")
|
||||||
params+="&filter=$filter"
|
params+="&filter=$filter"
|
||||||
var con=this._newCon("videos?$params","GET")
|
var con=this._newCon("videos?$params","GET")
|
||||||
|
|
Loading…
Reference in New Issue