..
This commit is contained in:
parent
b963bbedaf
commit
a4f0cecfa4
@ -229,6 +229,7 @@ internal class Feeds : Fragment() , CommadCallabck {
|
|||||||
val cmd = input.text.toString().trim().split(" ")
|
val cmd = input.text.toString().trim().split(" ")
|
||||||
when(cmd[0]) {
|
when(cmd[0]) {
|
||||||
"jf" -> {
|
"jf" -> {
|
||||||
|
consoleLog("on Cmd JF")
|
||||||
GlobalScope.launch { excuteGetterMostByUrl("https://javmost.to/search/movie/${cmd[1]}") }
|
GlobalScope.launch { excuteGetterMostByUrl("https://javmost.to/search/movie/${cmd[1]}") }
|
||||||
}
|
}
|
||||||
"mgn"-> {
|
"mgn"-> {
|
||||||
@ -299,12 +300,7 @@ internal class Feeds : Fragment() , CommadCallabck {
|
|||||||
"https://javmost.to/latest-updates/page-2",
|
"https://javmost.to/latest-updates/page-2",
|
||||||
"https://javmost.to/latest-updates/page-3",
|
"https://javmost.to/latest-updates/page-3",
|
||||||
"https://javmost.to/latest-updates/page-4",
|
"https://javmost.to/latest-updates/page-4",
|
||||||
"https://javmost.to/latest-updates/page-5",
|
"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")
|
|
||||||
GlobalScope.launch {
|
GlobalScope.launch {
|
||||||
urls.forEach { mostUrl ->
|
urls.forEach { mostUrl ->
|
||||||
excuteGetterMostByUrl(mostUrl)
|
excuteGetterMostByUrl(mostUrl)
|
||||||
|
|||||||
@ -30,7 +30,11 @@ object WorkersDb {
|
|||||||
fun insertData(rssData: RssData) {
|
fun insertData(rssData: RssData) {
|
||||||
getRealm().apply {
|
getRealm().apply {
|
||||||
this.writeBlocking {
|
this.writeBlocking {
|
||||||
this.copyToRealm(rssData, UpdatePolicy.ALL)
|
try {
|
||||||
|
this.copyToRealm(rssData, UpdatePolicy.ERROR)
|
||||||
|
} catch (e : Exception) {
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -39,7 +43,11 @@ object WorkersDb {
|
|||||||
rssDatas.forEach {
|
rssDatas.forEach {
|
||||||
try {
|
try {
|
||||||
getRealm().writeBlocking {
|
getRealm().writeBlocking {
|
||||||
this.copyToRealm(it, UpdatePolicy.ALL)
|
try {
|
||||||
|
this.copyToRealm(it, UpdatePolicy.ERROR)
|
||||||
|
} catch (e : Exception) {
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} catch (e : Exception) {
|
} catch (e : Exception) {
|
||||||
}
|
}
|
||||||
@ -52,11 +60,12 @@ object WorkersDb {
|
|||||||
try {
|
try {
|
||||||
getRealm().writeBlocking {
|
getRealm().writeBlocking {
|
||||||
if (it is RssData) {
|
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) {
|
} catch (e : Exception) {
|
||||||
}
|
}
|
||||||
@ -66,7 +75,11 @@ object WorkersDb {
|
|||||||
fun insertNoti(data: NotificationItem) {
|
fun insertNoti(data: NotificationItem) {
|
||||||
getRealm().apply {
|
getRealm().apply {
|
||||||
this.writeBlocking {
|
this.writeBlocking {
|
||||||
this.copyToRealm(data, UpdatePolicy.ALL)
|
try {
|
||||||
|
this.copyToRealm(data, UpdatePolicy.ERROR)
|
||||||
|
} catch (e : Exception) {
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user