This commit is contained in:
lunaticbum 2024-11-06 14:30:00 +09:00
parent f0cbf1c4fd
commit 398ba8be0a
12 changed files with 528 additions and 55 deletions

View File

@ -86,6 +86,11 @@
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|screenLayout|layoutDirection" android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|screenLayout|layoutDirection"
android:windowSoftInputMode="adjustResize" android:windowSoftInputMode="adjustResize"
android:exported="true"> android:exported="true">
<intent-filter>
<action android:name="android.intent.action.SEND" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="*/*"/>
</intent-filter>
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN" /> <action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.DEFAULT" />

View File

@ -58,6 +58,7 @@ import androidx.annotation.RequiresApi
import androidx.appcompat.app.AppCompatActivity import androidx.appcompat.app.AppCompatActivity
import androidx.appcompat.app.AppCompatDelegate import androidx.appcompat.app.AppCompatDelegate
import androidx.appcompat.app.AppCompatDelegate.MODE_NIGHT_FOLLOW_SYSTEM import androidx.appcompat.app.AppCompatDelegate.MODE_NIGHT_FOLLOW_SYSTEM
import androidx.core.net.toUri
import androidx.core.splashscreen.SplashScreen.Companion.installSplashScreen import androidx.core.splashscreen.SplashScreen.Companion.installSplashScreen
import androidx.core.view.ViewCompat import androidx.core.view.ViewCompat
import androidx.core.view.WindowCompat import androidx.core.view.WindowCompat
@ -346,12 +347,48 @@ internal class LauncherActivity : AppCompatActivity() {
} }
override fun onNewIntent(intent: Intent?) { override fun onNewIntent(intent: Intent?) {
super.onNewIntent(intent)
BLog.LOGE("onNewIntent intent >> ${intent}") BLog.LOGE("onNewIntent intent >> ${intent}")
if(intent?.action?.equals(Intent.ACTION_SEND) == true &&
intent?.hasExtra(Intent.EXTRA_TEXT) == true) {
intent?.getStringExtra(Intent.EXTRA_TEXT)?.let {
if(it.startsWith("http") == false) {
it.split("http").forEach { string ->
if(string.startsWith("http")) {
try {
string.toUri()?.let { uri ->
BLog.LOGE("onNewIntent string uri.lastPathSegment >>>>> ${uri.host}")
BLog.LOGE("onNewIntent string uri.lastPathSegment >>>>> ${uri.lastPathSegment}")
}
} catch (e: Exception) {
}
}
}
} else {
try {
it.toUri()?.let { uri ->
BLog.LOGE("onNewIntent it uri.lastPathSegment >>>>> ${uri.host}")
BLog.LOGE("onNewIntent it uri.lastPathSegment >>>>> ${uri.lastPathSegment}")
}
} catch (e: Exception) {
}
}
}
// BLog.LOGE("onNewIntent intent?.dataString >> ${intent?.dataString}")
// BLog.LOGE("onNewIntent intent?.data >> ${intent?.data}")
}
BLog.LOGE("onNewIntent intent?.hasExtra >> ${intent?.hasExtra(Intent.EXTRA_STREAM)}")
intent?.extras?.keySet()?.forEach { intent?.extras?.keySet()?.forEach {
BLog.LOGE("onNewIntent intent >> ${it}") try {
BLog.LOGE("onNewIntent :: key >> ${it} :: value >> ${intent?.extras?.getString(it)}")
} catch (e : Exception) {e.printStackTrace()}
} }
@ -359,6 +396,7 @@ internal class LauncherActivity : AppCompatActivity() {
// binding.viewPager.post { // binding.viewPager.post {
// binding.viewPager?.adapter?.notifyDataSetChanged() // binding.viewPager?.adapter?.notifyDataSetChanged()
// } // }
super.onNewIntent(intent)
} }
@SuppressLint("NewApi", "MissingPermission") @SuppressLint("NewApi", "MissingPermission")
@ -781,7 +819,8 @@ internal class LauncherActivity : AppCompatActivity() {
BLog.LOGE("binding.otherCheck before ThreadRun") BLog.LOGE("binding.otherCheck before ThreadRun")
binding.searcher01.webViewClient = object : WebViewClient() { binding.searcher01.webViewClient = object : WebViewClient() {
override fun shouldOverrideUrlLoading(view: WebView?, url: String?): Boolean { override fun shouldOverrideUrlLoading(view: WebView?, url: String?): Boolean {
if (url?.contains("missav") == true && isF) { BLog.LOGE("binding.otherCheck before ${url}")
if ((url?.contains("guru") == true || url?.contains("missav") == true) && !isF) {
BLog.LOGE("binding.otherCheck before reload") BLog.LOGE("binding.otherCheck before reload")
view?.loadUrl(url!!) view?.loadUrl(url!!)
isF = true isF = true
@ -815,6 +854,10 @@ internal class LauncherActivity : AppCompatActivity() {
BLog.LOGE("binding.otherCheck searcher01 in onPageFinished ${url}") BLog.LOGE("binding.otherCheck searcher01 in onPageFinished ${url}")
//lastedFinishedPageUrl?.length ?: 0 > 10 && //lastedFinishedPageUrl?.length ?: 0 > 10 &&
// if(url?.startsWith("https://") == true) { // if(url?.startsWith("https://") == true) {
// if (url?.contains("guru", true) == true) {
// isF = true
// view?.loadUrl(url)
// }
if (url?.contains("youtube", false) == true) { if (url?.contains("youtube", false) == true) {
view?.evaluateJavascript( view?.evaluateJavascript(
"function getAll() {\n" + "function getAll() {\n" +
@ -833,8 +876,25 @@ internal class LauncherActivity : AppCompatActivity() {
(result as? String)?.let {} (result as? String)?.let {}
} }
}, 6000L) }, 6000L)
} else { } else if (url?.contains("guru", true) == true) {
//if (url?.contains("guru", true) == true) if (!isF) {
binding.searcher01.postDelayed({
view?.loadUrl(url)
isF = true
},5000)
} else {
binding.searcher01.postDelayed({
binding.searcher01.evaluateJavascript(
"function getAll() {\n" +
" MyJavaScriptInterface.sendValueFromHtml(document.getElementsByTagName('html')[0].innerHTML)" +
" };getAll()"
) { result ->
(result as? String)?.let {}
}
}, 10000L)
}
}else {
//
view?.evaluateJavascript( view?.evaluateJavascript(
"function getAll() {\n" + "function getAll() {\n" +
" MyJavaScriptInterface.sendValueFromHtml(document.getElementsByTagName('html')[0].innerHTML)" + " MyJavaScriptInterface.sendValueFromHtml(document.getElementsByTagName('html')[0].innerHTML)" +
@ -1074,9 +1134,11 @@ fun openReddit(schemeString : String) {
fun openDotax(schemeString : String) { fun openDotax(schemeString : String) {
val gmmIntentUri = Uri.parse(schemeString) val gmmIntentUri = Uri.parse(schemeString)
val mapIntent = Intent(Intent.ACTION_VIEW) val mapIntent = Intent(Intent.ACTION_VIEW)
mapIntent.addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP) // mapIntent.addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP)
mapIntent.addCategory(Intent.CATEGORY_BROWSABLE) // mapIntent.addCategory(Intent.CATEGORY_BROWSABLE)
mapIntent.setPackage("net.daum.android.cafe") // mapIntent.setPackage("net.daum.android.cafe")
mapIntent.addFlags(Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS)
mapIntent.setPackage("com.android.chrome")
mapIntent.setData(gmmIntentUri) mapIntent.setData(gmmIntentUri)
lActivity?.startActivity(mapIntent) lActivity?.startActivity(mapIntent)
} }

View File

@ -77,6 +77,7 @@ import bums.lunatic.launcher.model.jGuruTag
import bums.lunatic.launcher.utils.BLog import bums.lunatic.launcher.utils.BLog
import bums.lunatic.launcher.utils.FeedParseManager import bums.lunatic.launcher.utils.FeedParseManager
import bums.lunatic.launcher.utils.RssList.jGuruMain import bums.lunatic.launcher.utils.RssList.jGuruMain
import bums.lunatic.launcher.utils.RssList.plist
import bums.lunatic.launcher.utils.getJ import bums.lunatic.launcher.utils.getJ
import bums.lunatic.launcher.workers.RecentCallGetter import bums.lunatic.launcher.workers.RecentCallGetter
import bums.lunatic.launcher.workers.RecentSmsGetter import bums.lunatic.launcher.workers.RecentSmsGetter
@ -259,12 +260,12 @@ internal class Feeds : Fragment() , CommadCallabck {
} }
"jf" -> { "jf" -> {
consoleLog("on Cmd JF") consoleLog("on Cmd JF")
CoroutineScope(Dispatchers.IO).launch { // CoroutineScope(Dispatchers.IO).launch {
consoleLog("${cmd[0]} Start ${cmd[1]}") // consoleLog("${cmd[0]} Start ${cmd[1]}")
String.format(String(Base64.getMimeDecoder().decode("aHR0cHM6Ly9qYXZtb3N0LnRvL3NlYXJjaC9tb3ZpZS8lcw==".toByteArray())),cmd[1]).getJ().let { doc -> FeedParseManager.parse(doc){consoleLog(it)} } // String.format(String(Base64.getMimeDecoder().decode("aHR0cHM6Ly9qYXZtb3N0LnRvL3NlYXJjaC9tb3ZpZS8lcw==".toByteArray())),cmd[1]).getJ().let { doc -> FeedParseManager.parse(doc){consoleLog(it)} }
consoleLog("current j req() ${WorkersDb.getRealm().query<RssData>("category == $0", RssDataType.GURU.name).find().size}") // consoleLog("current j req() ${WorkersDb.getRealm().query<RssData>("category == $0", RssDataType.GURU.name).find().size}")
consoleLog("${cmd[0]} END ${cmd[1]}") // consoleLog("${cmd[0]} END ${cmd[1]}")
} // }
CoroutineScope(Dispatchers.IO).launch { CoroutineScope(Dispatchers.IO).launch {
consoleLog("on Cmd JF with SO") consoleLog("on Cmd JF with SO")
consoleLog("${cmd[0]} Start ${cmd[1]}") consoleLog("${cmd[0]} Start ${cmd[1]}")
@ -472,16 +473,44 @@ internal class Feeds : Fragment() , CommadCallabck {
"jreq" -> { "jreq" -> {
consoleLog("current j req() ${WorkersDb.getRealm() consoleLog("current j req() ${WorkersDb.getRealm()
.query<RssData>("category == $0", RssDataType.GURU.name).find().size}") .query<RssData>("category == $0", RssDataType.GURU.name).find().size}")
lActivity?.doWebParseStart(jGuruMain,callBack = object : CommadCallabck { CoroutineScope(Dispatchers.IO).launch {
override fun onConsoleLog(log: String) { var isOk = false
this@Feeds.consoleLog(log) // plist.forEach {
} if (!isOk) {
try {
override fun collectComplete() { Jsoup.connect(jGuruMain)
consoleLog("excuted j req() ${WorkersDb.getRealm() .userAgent("Mozilla/5.0 (Linux; Android 13) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.5414.117 Mobile Safari/537.36")
.query<RssData>("category == $0", RssDataType.GURU.name).find().size}") .referrer("http://www.google.com")
} .header("Accept-Language", "it-IT,en;q=0.8,en-US;q=0.6,de;q=0.4,it;q=0.2,es;q=0.2")
}) .header("Connection", "keep-alive")
.header("scheme", "https")
.header("accept", "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8")
.header("accept-encoding", "gzip, deflate, br")
.header("cache-control", "no-cache")
.header("pragma", "no-cache")
.header("upgrade-insecure-requests", "1")
.ignoreContentType(true)
.timeout(30000).execute().let {
BLog.LOGE("DOC -> ${it}")
isOk = true
}
} catch (e: Exception) {
e.printStackTrace()
}
}
// }
BLog.LOGE("last state ${isOk}")
}
// lActivity?.doWebParseStart(jGuruMain,callBack = object : CommadCallabck {
// override fun onConsoleLog(log: String) {
// this@Feeds.consoleLog(log)
// }
//
// override fun collectComplete() {
// consoleLog("excuted j req() ${WorkersDb.getRealm()
// .query<RssData>("category == $0", RssDataType.GURU.name).find().size}")
// }
// })
} }
"jtag" -> { "jtag" -> {

View File

@ -72,8 +72,8 @@ class BluetoothManager {
pairedDevices?.forEach { i -> pairedDevices?.forEach { i ->
//bondState : 12 (페어링 등록된 상태) //bondState : 12 (페어링 등록된 상태)
//bondState : 10 (페어링 등록 안됨) //bondState : 10 (페어링 등록 안됨)
BLog.LOGE("getPairedDevices() / name : ${i.name}") // BLog.LOGE("getPairedDevices() / name : ${i.name}")
BLog.LOGE("getPairedDevices() / bondState : ${i.bondState}") // BLog.LOGE("getPairedDevices() / bondState : ${i.bondState}")
val isConnected = isConnected(i) val isConnected = isConnected(i)
if(PrefHelper.carName.length > 2 && i.name.equals(PrefHelper.carName) && isConnected != PrefHelper.isConnectedCar) { if(PrefHelper.carName.length > 2 && i.name.equals(PrefHelper.carName) && isConnected != PrefHelper.isConnectedCar) {
PrefHelper.isConnectedCar = isConnected PrefHelper.isConnectedCar = isConnected
@ -105,7 +105,7 @@ class BluetoothManager {
val request: Request = builder.build() val request: Request = builder.build()
BLog.LOGE("sendToI telegram before request ") // BLog.LOGE("sendToI telegram before request ")
// OkHttp 클라이언트로 GET 요청 객체 전송 // OkHttp 클라이언트로 GET 요청 객체 전송
val response: Response = client.newCall(request).execute() val response: Response = client.newCall(request).execute()
if (response.isSuccessful()) { if (response.isSuccessful()) {
@ -114,7 +114,7 @@ class BluetoothManager {
if (body != null) { if (body != null) {
} }
BLog.LOGE("sendToI telegram response isSuccessful ${body}") // BLog.LOGE("sendToI telegram response isSuccessful ${body}")
} else BLog.LOGE("sendToI telegram Error Occurred") } else BLog.LOGE("sendToI telegram Error Occurred")
} }
} }

View File

@ -249,6 +249,11 @@ internal class LauncherHome : Fragment() {
} }
}) })
binding.favAppsGroup.setOnLongClickListener {
binding.otherCheck.isSelected = true
queryVotes()
true
}
binding.favAppsGroup.setOnClickListener { binding.favAppsGroup.setOnClickListener {
if (binding.otherCheck.isSelected) { if (binding.otherCheck.isSelected) {
searchData() searchData()
@ -471,10 +476,6 @@ internal class LauncherHome : Fragment() {
} }
private fun queryNotice() { private fun queryNotice() {
var mWorkManager = WorkManager.getInstance(requireContext())
Executors.newSingleThreadScheduledExecutor().schedule({
// mWorkManager.enqueue(OneTimeWorkRequest.from(TelegramBotGetter::class.java))
}, 5, TimeUnit.SECONDS)
try { noticeJob?.cancel() } catch (e:Exception) {e.printStackTrace()} try { noticeJob?.cancel() } catch (e:Exception) {e.printStackTrace()}
mNotificationResult = null mNotificationResult = null
try { try {
@ -505,6 +506,39 @@ internal class LauncherHome : Fragment() {
noticeJob?.start() noticeJob?.start()
} }
fun queryVotes() {
try { infosJob?.cancel() } catch (e:Exception) {e.printStackTrace()}
mRssDataResult = null
try {
System.gc()
}catch (e : Exception){e.printStackTrace()}
var rQ = WorkersDb.getRealm().query<RssData>().query("vote == $0",true)
mRssDataResult = rQ.sort("pubDate ", Sort.DESCENDING).find()
infosJob = CoroutineScope(Dispatchers.Default).launch {
mRssDataResult?.asFlow()?.collect { changes: ResultsChange<RssData> ->
commandHandler.removeCallbacks(hideListView)
commandHandler.removeCallbacks(infoUpdate)
when (changes) {
is InitialResults -> {
// BLog.LOGE("${this} ::::: queryInfos after changes size >>>> ${changes.list.size}")
WorkersDb.getRealm().apply {
lasted = copyFromRealm(changes.list)
}
commandHandler.postDelayed(infoUpdate, UPDATE_DELAY)
}
is UpdatedResults -> {
// lasted = changes.list
// commandHandler.postDelayed(infoUpdate, UPDATE_DELAY * 3)
}
else -> {
}
}
}
}
infosJob?.start()
}
fun queryInfos(filter: Collection<RssDataType>? = arrayListOf(RssDataType.GURU,RssDataType.MOST,RssDataType.REDDIT_NSFW), noLimit : Boolean = false) { fun queryInfos(filter: Collection<RssDataType>? = arrayListOf(RssDataType.GURU,RssDataType.MOST,RssDataType.REDDIT_NSFW), noLimit : Boolean = false) {
try { infosJob?.cancel() } catch (e:Exception) {e.printStackTrace()} try { infosJob?.cancel() } catch (e:Exception) {e.printStackTrace()}
mRssDataResult = null mRssDataResult = null
@ -513,7 +547,7 @@ internal class LauncherHome : Fragment() {
}catch (e : Exception){e.printStackTrace()} }catch (e : Exception){e.printStackTrace()}
WorkersDb.getRealm().apply { writeBlocking { WorkersDb.getRealm().apply { writeBlocking {
delete(query<RssData>().query("pubDate < $0",beforeDay(Date(),3)).query("category != $0 || category != $1 ", RssDataType.GURU.name,RssDataType.MOST.name).find()) delete(query<RssData>().query("pubDate < $0",beforeDay(Date(),3)).query("category != $0 AND category != $1 ", RssDataType.GURU.name,RssDataType.MOST.name).query("vote != $0", true).find())
}} }}
var rQ = WorkersDb.getRealm().query<RssData>() var rQ = WorkersDb.getRealm().query<RssData>()
if(!noLimit) rQ.query("pubDate > $0", beforeDay(Date(),3)) if(!noLimit) rQ.query("pubDate > $0", beforeDay(Date(),3))
@ -555,7 +589,7 @@ internal class LauncherHome : Fragment() {
}catch (e : Exception){e.printStackTrace()} }catch (e : Exception){e.printStackTrace()}
WorkersDb.getRealm().apply { writeBlocking { WorkersDb.getRealm().apply { writeBlocking {
delete(query<RssData>().query("pubDate < $0",beforeDay(Date(),3)).query("category != $0 || category != $1 ", RssDataType.GURU.name,RssDataType.MOST.name).find()) delete(query<RssData>().query("pubDate < $0",beforeDay(Date(),3)).query("category != $0 AND category != $1 ", RssDataType.GURU.name,RssDataType.MOST.name).query("vote != $0", true).find())
}} }}
var rQ = WorkersDb.getRealm().query<RssData>() var rQ = WorkersDb.getRealm().query<RssData>()
if (!noLimit)rQ.query("pubDate > $0", beforeDay(Date(),3)) if (!noLimit)rQ.query("pubDate > $0", beforeDay(Date(),3))

View File

@ -38,8 +38,10 @@ import bums.lunatic.launcher.openNews
import bums.lunatic.launcher.openOpera import bums.lunatic.launcher.openOpera
import bums.lunatic.launcher.openReddit import bums.lunatic.launcher.openReddit
import bums.lunatic.launcher.openYouTube import bums.lunatic.launcher.openYouTube
import bums.lunatic.launcher.workers.WorkersDb
import com.google.android.material.imageview.ShapeableImageView import com.google.android.material.imageview.ShapeableImageView
import com.squareup.picasso.Picasso import com.squareup.picasso.Picasso
import io.realm.kotlin.UpdatePolicy
import java.text.SimpleDateFormat import java.text.SimpleDateFormat
import java.util.Date import java.util.Date
@ -62,7 +64,11 @@ internal class RssItemAdapter (
it.visibility = View.GONE it.visibility = View.GONE
}, 2000L) }, 2000L)
} else { } else {
openOpera(rss.originPage()) if (RssDataType.REDDIT_NSFW.equals(rss.category())) {
openReddit(rss.originPage())
} else {
openOpera(rss.originPage())
}
} }
} }
} }
@ -74,12 +80,18 @@ internal class RssItemAdapter (
} }
} }
private var rssDataItemLis: ArrayList<RssDataInterface> = arrayListOf() private var rssDataItemLis: ArrayList<RssDataInterface> = arrayListOf()
// val mLongClickListener = View.OnLongClickListener { v -> val mLongClickListener = View.OnLongClickListener { v ->
// (v?.tag as? Int)?.let { idx -> (v?.tag as? RssData)?.let { rss ->
// val rss = rssDataItemLis[idx] WorkersDb.getRealm().apply {
// } writeBlocking {
// true rss.vote = true
// } copyToRealm(rss,UpdatePolicy.ALL)
}
}
dateViewClick.onClick(v)
}
true
}
} }
@ -122,7 +134,12 @@ internal class RssItemAdapter (
holder.view.root.tag = rssData holder.view.root.tag = rssData
holder.view.root.setOnClickListener(dateViewClick) holder.view.root.setOnClickListener(dateViewClick)
// holder.view.root.setOnLongClickListener(mLongClickListener) // v.setOnLongClickListener {
// WorkersDb.getRealm().apply {
// copyFromRealm(rss)
// }
// }
holder.view.root.setOnLongClickListener(mLongClickListener)
} }
var layoutManager : LinearLayoutManager? = null var layoutManager : LinearLayoutManager? = null

View File

@ -219,6 +219,7 @@ class RssData : RealmObject, RssDataInterface {
var category : String? = null var category : String? = null
var chosung : String? = null var chosung : String? = null
var vote : Boolean = false
@Ignore @Ignore
var mRssDataType : RssDataType? = null var mRssDataType : RssDataType? = null

View File

@ -28,6 +28,7 @@ import bums.lunatic.launcher.R
import bums.lunatic.launcher.databinding.SettingsTodoBinding import bums.lunatic.launcher.databinding.SettingsTodoBinding
import bums.lunatic.launcher.helpers.PrefBoolean import bums.lunatic.launcher.helpers.PrefBoolean
import bums.lunatic.launcher.helpers.PrefHelper import bums.lunatic.launcher.helpers.PrefHelper
import bums.lunatic.launcher.utils.BLog
import com.google.android.material.bottomsheet.BottomSheetDialog import com.google.android.material.bottomsheet.BottomSheetDialog
import com.google.android.material.bottomsheet.BottomSheetDialogFragment import com.google.android.material.bottomsheet.BottomSheetDialogFragment
import com.google.android.material.dialog.MaterialAlertDialogBuilder import com.google.android.material.dialog.MaterialAlertDialogBuilder
@ -76,8 +77,14 @@ internal class HomeSettings : BottomSheetDialogFragment() {
var checkdCount = 0 var checkdCount = 0
set(value) { set(value) {
field = value if (value >= 0) {
field = value
} else {
}
BLog.LOGE("field > 0 >>> ${field}")
PrefBoolean.showNewsHistory.set(field > 0) PrefBoolean.showNewsHistory.set(field > 0)
BLog.LOGE("field > 0 >>> ${PrefBoolean.showNewsHistory.get(false)}")
} }

View File

@ -15,13 +15,23 @@ import java.util.Base64
import java.util.Date import java.util.Date
val USAGT = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.4 Safari/605.1.15" val USAGT = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.4 Safari/605.1.15"
fun String.getJ() = Jsoup.connect(this).userAgent(USAGT).get() fun String.getJ() : Document {
var doc = Document.createShell(this)
try {
doc = Jsoup.connect(this).userAgent(USAGT).get()
} catch (e: Exception) {
e.printStackTrace();
} finally {
}
return doc
}
object FeedParseManager { object FeedParseManager {
val parsers = listOf<SoInterface>(QVZTb2dpcmw,SkFWTW9zdA,Z2xvamF2) val parsers = listOf<SoInterface>(QVZTb2dpcmw,SkFWTW9zdA,Z2xvamF2)
fun parse(doc : Document, consoleLog : (String)-> Unit) { fun parse(doc : Document, consoleLog : (String)-> Unit) {
consoleLog("FeedParseManager START") consoleLog("FeedParseManager START")
try { try {
consoleLog(doc.title()) consoleLog(doc.title())
parsers.filter { doc.title().contains(it.getName()) || doc.baseUri().contains(it.getName()) }.first()?.let { parsers.filter { doc.title().contains(it.getName()) || doc.baseUri().contains(it.getName()) }.first()?.let {
it.parse(doc,consoleLog) it.parse(doc,consoleLog)

View File

@ -6,7 +6,7 @@ import java.net.URLEncoder
object RssList { object RssList {
val TEST_PAG2 = "https://torrentsee246.com/topic/index?category1=129&category2=132" val TEST_PAG2 = "https://torrentsee246.com/topic/index?category1=129&category2=132"
val jGuruMain = "https://jav.guru/" val jGuruMain = "https://jav.guru"
val jGuruRanks ="https://jav.guru/most-watched-rank/" val jGuruRanks ="https://jav.guru/most-watched-rank/"
@ -59,6 +59,311 @@ object RssList {
"도끼", "도끼",
"힙합", "힙합",
) )
val plist = arrayListOf<Pair<String,Int>>(
Pair("72.10.160.94", 8355),
Pair("148.72.165.7", 30127),
Pair("67.43.227.226", 30373),
Pair("143.110.226.180", 8888),
Pair("44.195.247.145", 80),
Pair("3.21.101.158", 80),
Pair("5.9.238.29", 80),
Pair("54.233.119.172", 3128),
Pair("3.122.84.99", 3128),
Pair("35.72.118.126", 80),
Pair("52.196.1.182", 80),
Pair("52.67.10.183", 80),
Pair("13.36.104.85", 80),
Pair("44.219.175.186", 80),
Pair("43.201.121.81", 80),
Pair("35.79.120.242", 3128),
Pair("18.228.198.164", 80),
Pair("3.212.148.199", 80),
Pair("3.12.144.146", 80),
Pair("43.200.77.128", 3128),
Pair("18.223.25.15", 80),
Pair("13.36.113.81", 3128),
Pair("43.202.154.212", 80),
Pair("13.59.156.167", 80),
Pair("35.76.62.196", 80),
Pair("54.152.3.36", 80),
Pair("44.218.183.55", 80),
Pair("3.37.125.76", 3128),
Pair("46.51.249.135", 3128),
Pair("3.141.217.225", 80),
Pair("13.37.89.201", 80),
Pair("158.160.14.101", 8090),
Pair("204.236.137.68", 80),
Pair("149.28.181.52", 80),
Pair("5.252.22.45", 80),
Pair("160.86.242.23", 8080),
Pair("195.114.209.50", 80),
Pair("64.147.212.78", 8080),
Pair("47.247.78.131", 80),
Pair("109.176.198.142", 80),
Pair("43.134.229.98", 3128),
Pair("78.28.152.111", 80),
Pair("51.255.20.138", 80),
Pair("158.255.77.169", 80),
Pair("159.65.244.233", 80),
Pair("158.255.77.168", 80),
Pair("154.205.128.153", 8888),
Pair("101.101.217.36", 80),
Pair("190.119.80.140", 80),
Pair("77.221.136.168", 8000),
Pair("77.221.139.76", 8000),
Pair("148.72.169.225", 30127),
Pair("185.244.173.33", 8118),
Pair("188.253.112.218", 80),
Pair("194.182.187.78", 3128),
Pair("143.42.66.91", 80),
Pair("154.90.55.37", 80),
Pair("82.102.10.253", 80),
Pair("158.255.77.166", 80),
Pair("67.43.227.229", 16401),
Pair("176.9.239.181", 80),
Pair("189.43.42.97", 80),
Pair("189.43.42.96", 80),
Pair("189.43.42.103", 80),
Pair("189.43.42.101", 80),
Pair("3.71.80.214", 8090),
Pair("87.98.148.98", 80),
Pair("72.10.160.170", 2657),
Pair("15.204.161.192", 18080),
Pair("209.97.150.167", 3128),
Pair("50.217.226.41", 80),
Pair("43.134.74.143", 3128),
Pair("3.70.198.14", 8090),
Pair("178.128.113.118", 23128),
Pair("198.44.255.3", 80),
Pair("170.106.183.248", 8080),
Pair("4.175.200.138", 8080),
Pair("172.191.74.198", 8080),
Pair("23.247.136.245", 80),
Pair("198.199.86.11", 8080),
Pair("139.59.1.14", 8080),
Pair("50.207.199.86", 80),
Pair("67.43.236.19", 17293),
Pair("144.126.216.57", 80),
Pair("50.217.226.44", 80),
Pair("139.162.78.109", 8080),
Pair("50.172.75.122", 80),
Pair("211.128.96.206", 80),
Pair("51.255.57.241", 8080),
Pair("68.185.57.66", 80),
Pair("50.231.104.58", 80),
Pair("50.174.7.156", 80),
Pair("43.134.33.254", 3128),
Pair("123.30.154.171", 7777),
Pair("190.103.177.131", 80),
Pair("127.0.0.7", 80),
Pair("148.72.168.80", 30127),
Pair("189.43.42.111", 80),
Pair("212.107.28.120", 80),
Pair("20.206.106.192", 8123),
Pair("202.93.244.194", 8080),
Pair("172.178.22.57", 9080),
Pair("38.156.75.27", 8080),
Pair("149.34.210.56", 9090),
Pair("27.131.248.172", 8080),
Pair("34.122.187.196", 80),
Pair("43.134.68.153", 3128),
Pair("222.252.194.29", 8080),
Pair("43.153.207.93", 3128),
Pair("103.237.144.232", 1311),
Pair("47.241.43.44", 7777),
Pair("45.122.240.154", 3128),
Pair("89.116.191.51", 80),
Pair("212.110.188.222", 34411),
Pair("152.230.215.123", 80),
Pair("93.127.215.97", 80),
Pair("212.110.188.216", 34405),
Pair("117.1.109.130", 10006),
Pair("51.222.102.172", 8080),
Pair("47.242.47.64", 8888),
Pair("154.113.18.189", 8090),
Pair("61.118.38.234", 60808),
Pair("39.61.54.80", 8080),
Pair("129.213.89.36", 80),
Pair("159.65.245.255", 80),
Pair("65.108.159.129", 1080),
Pair("85.214.195.118", 80),
Pair("174.138.54.65", 80),
Pair("39.109.113.97", 4090),
Pair("138.68.235.51", 80),
Pair("34.87.84.105", 80),
Pair("113.160.133.32", 8080),
Pair("94.131.9.215", 4002),
Pair("41.204.53.29", 80),
Pair("35.215.216.90", 80),
Pair("146.190.178.108", 80),
Pair("198.74.51.79", 8888),
Pair("188.166.197.129", 3128),
Pair("3.71.80.164", 8090),
Pair("72.10.160.174", 13093),
Pair("38.54.71.67", 80),
Pair("198.49.68.80", 80),
Pair("67.43.228.251", 3343),
Pair("47.56.110.204", 8989),
Pair("85.215.64.49", 80),
Pair("5.135.188.78", 3127),
Pair("144.24.122.46", 80),
Pair("179.41.8.151", 80),
Pair("165.232.129.150", 80),
Pair("190.110.226.122", 80),
Pair("41.204.53.21", 80),
Pair("154.65.39.8", 80),
Pair("185.164.73.117", 80),
Pair("133.18.234.13", 80),
Pair("68.183.143.134", 80),
Pair("87.248.129.26", 80),
Pair("8.219.97.248", 80),
Pair("23.82.137.156", 80),
Pair("13.37.59.99", 3128),
Pair("43.134.32.184", 3128),
Pair("43.133.59.220", 3128),
Pair("63.35.64.177", 3128),
Pair("15.235.46.52", 8888),
Pair("193.124.181.93", 8888),
Pair("96.10.203.8", 80),
Pair("185.44.65.171", 3128),
Pair("185.76.10.135", 8082),
Pair("13.37.73.214", 80),
Pair("3.123.150.192", 80),
Pair("13.36.87.105", 3128),
Pair("185.217.5.3", 80),
Pair("116.125.141.115", 80),
Pair("50.168.72.115", 80),
Pair("50.168.72.116", 80),
Pair("172.94.32.48", 80),
Pair("89.179.71.21", 3128),
Pair("102.134.98.222", 8081),
Pair("78.135.87.235", 80),
Pair("60.242.169.3", 80),
Pair("51.210.54.186", 80),
Pair("41.204.53.28", 80),
Pair("20.24.43.214", 80),
Pair("20.210.113.32", 8123),
Pair("103.49.202.250", 80),
Pair("103.78.36.116", 8080),
Pair("103.107.84.177", 8080),
Pair("186.148.184.196", 999),
Pair("103.179.182.185", 8181),
Pair("103.179.182.31", 8090),
Pair("103.155.190.242", 8080),
Pair("223.205.103.1", 8080),
Pair("118.172.239.231", 8180),
Pair("118.67.134.17", 80),
Pair("194.250.197.206", 80),
Pair("171.238.236.203", 5000),
Pair("129.10.76.179", 80),
Pair("68.178.168.41", 80),
Pair("128.199.202.122", 8080),
Pair("200.174.198.86", 8888),
Pair("23.82.137.161", 80),
Pair("222.122.110.26", 80),
Pair("54.38.181.125", 80),
Pair("46.47.197.210", 3128),
Pair("51.75.206.209", 80),
Pair("8.213.134.213", 8008),
Pair("183.100.14.134", 8000),
Pair("35.209.198.222", 80),
Pair("47.243.114.192", 8180),
Pair("41.59.90.174", 80),
Pair("41.204.53.22", 80),
Pair("113.160.132.33", 8080),
Pair("47.88.59.79", 82),
Pair("103.151.20.131", 80),
Pair("176.9.238.176", 16379),
Pair("41.204.53.17", 80),
Pair("41.59.90.171", 80),
Pair("66.29.154.105", 3128),
Pair("213.233.177.134", 80),
Pair("72.10.160.90", 1365),
Pair("87.248.129.32", 80),
Pair("83.68.136.241", 80),
Pair("189.43.42.105", 80),
Pair("222.252.194.204", 8080),
Pair("67.43.228.253", 12915),
Pair("67.43.236.20", 10145),
Pair("72.10.164.178", 1417),
Pair("47.251.43.115", 33333),
Pair("162.223.90.130", 80),
Pair("67.43.227.230", 4961),
Pair("67.43.228.254", 2679),
Pair("103.127.1.130", 80),
Pair("31.40.248.2", 8080),
Pair("161.35.70.249", 8080),
Pair("97.74.87.226", 80),
Pair("154.65.39.7", 80),
Pair("51.89.255.67", 80),
Pair("47.74.152.29", 8888),
Pair("146.59.202.70", 80),
Pair("91.228.186.200", 80),
Pair("62.169.26.156", 8081),
Pair("38.156.73.61", 8080),
Pair("38.58.56.18", 3128),
Pair("103.179.246.30", 8080),
Pair("94.247.129.244", 3128),
Pair("181.78.99.31", 8080),
Pair("38.45.46.2", 6332),
Pair("202.74.245.83", 5020),
Pair("103.153.39.25", 8080),
Pair("161.49.176.173", 1337),
Pair("103.27.118.138", 8080),
Pair("191.101.80.162", 80),
Pair("157.254.53.50", 80),
Pair("43.134.121.40", 3128),
Pair("23.82.137.158", 80),
Pair("198.44.255.5", 80),
Pair("129.226.193.16", 3128),
Pair("63.143.57.120", 80),
Pair("65.108.207.6", 80),
Pair("23.94.86.138", 80),
Pair("101.36.102.78", 8168),
Pair("123.58.199.232", 8168),
Pair("123.58.199.17", 8168),
Pair("101.36.102.238", 8168),
Pair("38.6.182.13", 8080),
Pair("47.90.205.231", 33333),
Pair("93.127.163.52", 80),
Pair("154.90.48.76", 80),
Pair("193.190.253.97", 80),
Pair("178.16.129.11", 80),
Pair("18.228.149.161", 80),
Pair("3.126.147.182", 3128),
Pair("147.135.128.218", 80),
Pair("47.251.73.54", 8080),
Pair("18.159.135.44", 8090),
Pair("77.232.128.191", 80),
Pair("197.243.20.178", 80),
Pair("82.146.37.145", 80),
Pair("34.143.183.96", 80),
Pair("192.73.244.36", 80),
Pair("35.209.22.27", 80),
Pair("107.175.179.52", 80),
Pair("78.80.228.150", 80),
Pair("1.20.207.75", 8080),
Pair("103.247.14.103", 1111),
Pair("103.156.15.252", 8080),
Pair("131.100.48.105", 999),
Pair("13.59.114.202", 80),
Pair("45.76.123.210", 80),
Pair("72.10.160.92", 5635),
Pair("203.77.215.45", 10000),
Pair("3.124.133.93", 80),
Pair("3.130.65.162", 3128),
Pair("114.156.77.107", 8080),
Pair("140.227.228.202", 10101),
Pair("3.139.242.184", 80),
Pair("122.152.4.133", 6000),
Pair("20.111.54.16", 8123),
Pair("122.160.30.99", 80),
Pair("50.169.222.243", 80),
Pair("50.237.207.186", 80),
)
} }
object DocParserManager { object DocParserManager {

View File

@ -26,6 +26,7 @@ import bums.lunatic.launcher.utils.BLog
import io.realm.kotlin.Realm import io.realm.kotlin.Realm
import io.realm.kotlin.RealmConfiguration import io.realm.kotlin.RealmConfiguration
import io.realm.kotlin.UpdatePolicy import io.realm.kotlin.UpdatePolicy
import io.realm.kotlin.dynamic.getValue
import io.realm.kotlin.ext.query import io.realm.kotlin.ext.query
import io.realm.kotlin.migration.AutomaticSchemaMigration import io.realm.kotlin.migration.AutomaticSchemaMigration
import io.realm.kotlin.types.BaseRealmObject import io.realm.kotlin.types.BaseRealmObject
@ -35,9 +36,7 @@ import kotlin.reflect.KClass
class CustMigration : AutomaticSchemaMigration { class CustMigration : AutomaticSchemaMigration {
override fun migrate(migrationContext: AutomaticSchemaMigration.MigrationContext) { override fun migrate(migrationContext: AutomaticSchemaMigration.MigrationContext) {
BLog.LOGE(migrationContext.oldRealm.configuration.schemaVersion.toString()) BLog.LOGE(migrationContext.oldRealm.configuration.schemaVersion.toString())
BLog.LOGE(migrationContext.newRealm.configuration.schemaVersion.toString()) BLog.LOGE(migrationContext.newRealm.configuration.schemaVersion.toString())
} }
} }
object WorkersDb { object WorkersDb {
@ -50,16 +49,20 @@ object WorkersDb {
LocationLog::class LocationLog::class
) )
val schemaVersion : Long = 0L val schemaVersion : Long = 4L
private var pRealm : Realm? = null private var pRealm : Realm? = null
fun getRealm() : Realm { fun getRealm() : Realm {
if (pRealm == null || pRealm?.isClosed() == true) { if (pRealm == null || pRealm?.isClosed() == true) {
pRealm = Realm.open(RealmConfiguration.Builder(clazz as Set<KClass<out TypedRealmObject>>) try {
.migration(CustMigration(),true) pRealm = Realm.open(RealmConfiguration.Builder(clazz as Set<KClass<out TypedRealmObject>>)
.schemaVersion(schemaVersion) .migration(CustMigration(),true)
.deleteRealmIfMigrationNeeded() .schemaVersion(schemaVersion)
.build()) // .deleteRealmIfMigrationNeeded()
.build())
} catch (e : IllegalStateException) {
getRealm()
}
} }
return pRealm!! return pRealm!!
} }

View File

@ -8,7 +8,7 @@
android:fitsSystemWindows="true"> android:fitsSystemWindows="true">
<WebView <WebView
android:layout_margin="30dp" android:layout_margin="10dp"
android:id="@+id/searcher_01" android:id="@+id/searcher_01"
android:layout_width="match_parent" android:layout_width="match_parent"
android:alpha="0" android:alpha="0"