mirror of
https://github.com/mihonapp/mihon.git
synced 2025-11-13 20:48:56 +01:00
Fix broken favorites sync
Release v6.8.2
This commit is contained in:
@@ -133,7 +133,9 @@ object PreferenceKeys {
|
||||
|
||||
const val eh_settingsKey = "eh_settingsKey"
|
||||
|
||||
const val eh_sessionCookie = "eh_sessionCookie"
|
||||
|
||||
const val eh_enableExHentai = "enable_exhentai"
|
||||
|
||||
const val eh_showSettingsUploadWarning = "eh_showSettingsUploadWarning"
|
||||
const val eh_showSettingsUploadWarning = "eh_showSettingsUploadWarning1"
|
||||
}
|
||||
|
||||
@@ -200,6 +200,7 @@ class PreferencesHelper(val context: Context) {
|
||||
fun eh_ehSettingsProfile() = rxPrefs.getInteger(Keys.eh_ehSettingsProfile, -1)
|
||||
fun eh_exhSettingsProfile() = rxPrefs.getInteger(Keys.eh_exhSettingsProfile, -1)
|
||||
fun eh_settingsKey() = rxPrefs.getString(Keys.eh_settingsKey, "")
|
||||
fun eh_sessionCookie() = rxPrefs.getString(Keys.eh_sessionCookie, "")
|
||||
|
||||
//Lock
|
||||
fun lockHash() = rxPrefs.getString("lock_hash", null)
|
||||
|
||||
@@ -68,7 +68,7 @@ class EHentai(override val id: Long,
|
||||
//Get title
|
||||
it.select(".itd .it5 a").first()?.apply {
|
||||
title = text()
|
||||
setUrlWithoutDomain(ExGalleryMetadata.normalizeUrl(attr("href")))
|
||||
url = ExGalleryMetadata.normalizeUrl(attr("href"))
|
||||
}
|
||||
//Get image
|
||||
it.select(".itd .it2").first()?.apply {
|
||||
@@ -345,6 +345,10 @@ class EHentai(override val id: Long,
|
||||
val sessionKey = prefs.eh_settingsKey().getOrDefault()
|
||||
if(sessionKey != null)
|
||||
cookies["sk"] = sessionKey
|
||||
|
||||
val sessionCookie = prefs.eh_sessionCookie().getOrDefault()
|
||||
if(sessionCookie != null)
|
||||
cookies["s"] = sessionCookie
|
||||
}
|
||||
|
||||
//Session-less list display mode (for users without ExHentai)
|
||||
|
||||
@@ -549,6 +549,7 @@ class LibraryController(
|
||||
cleanupSyncState()
|
||||
favoritesSyncSubscription =
|
||||
presenter.favoritesSync.status
|
||||
.sample(100, TimeUnit.MILLISECONDS)
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe {
|
||||
updateSyncStatus(it)
|
||||
|
||||
Reference in New Issue
Block a user