This commit is contained in:
lunaticbum 2024-09-07 18:34:21 +09:00
parent b963bbedaf
commit a4f0cecfa4
2 changed files with 22 additions and 13 deletions

View File

@ -229,6 +229,7 @@ internal class Feeds : Fragment() , CommadCallabck {
val cmd = input.text.toString().trim().split(" ")
when(cmd[0]) {
"jf" -> {
consoleLog("on Cmd JF")
GlobalScope.launch { excuteGetterMostByUrl("https://javmost.to/search/movie/${cmd[1]}") }
}
"mgn"-> {
@ -299,12 +300,7 @@ internal class Feeds : Fragment() , CommadCallabck {
"https://javmost.to/latest-updates/page-2",
"https://javmost.to/latest-updates/page-3",
"https://javmost.to/latest-updates/page-4",
"https://javmost.to/latest-updates/page-5",
"https://javmost.to/latest-updates/page-6",
"https://javmost.to/latest-updates/page-7",
"https://javmost.to/latest-updates/page-8",
"https://javmost.to/latest-updates/page-9",
"https://javmost.to/latest-updates/page-10")
"https://javmost.to/latest-updates/page-5")
GlobalScope.launch {
urls.forEach { mostUrl ->
excuteGetterMostByUrl(mostUrl)

View File

@ -30,7 +30,11 @@ object WorkersDb {
fun insertData(rssData: RssData) {
getRealm().apply {
this.writeBlocking {
this.copyToRealm(rssData, UpdatePolicy.ALL)
try {
this.copyToRealm(rssData, UpdatePolicy.ERROR)
} catch (e : Exception) {
}
}
}
}
@ -39,7 +43,11 @@ object WorkersDb {
rssDatas.forEach {
try {
getRealm().writeBlocking {
this.copyToRealm(it, UpdatePolicy.ALL)
try {
this.copyToRealm(it, UpdatePolicy.ERROR)
} catch (e : Exception) {
}
}
} catch (e : Exception) {
}
@ -52,11 +60,12 @@ object WorkersDb {
try {
getRealm().writeBlocking {
if (it is RssData) {
this.copyToRealm(it, UpdatePolicy.ALL)
try {
this.copyToRealm(it, UpdatePolicy.ERROR)
} catch (e : Exception) {
}
}
// else if(it is RssDataInterface) {
// this.copyToRealm(it.getRssData(), UpdatePolicy.ALL)
// }
}
} catch (e : Exception) {
}
@ -66,7 +75,11 @@ object WorkersDb {
fun insertNoti(data: NotificationItem) {
getRealm().apply {
this.writeBlocking {
this.copyToRealm(data, UpdatePolicy.ALL)
try {
this.copyToRealm(data, UpdatePolicy.ERROR)
} catch (e : Exception) {
}
}
}
}