mirror of
https://github.com/mihonapp/mihon.git
synced 2025-07-03 14:37:50 +02:00
Fix broken favorites sync
Release v6.8.2
This commit is contained in:
@ -168,10 +168,10 @@ open class ExGalleryMetadata : RealmObject(), SearchableGalleryMetadata {
|
||||
pathSegments.filterNot(String::isNullOrBlank)
|
||||
}
|
||||
|
||||
fun galleryId(url: String) = splitGalleryUrl(url).let { it[it.size - 2] }
|
||||
fun galleryId(url: String) = splitGalleryUrl(url)[1]
|
||||
|
||||
fun galleryToken(url: String) =
|
||||
splitGalleryUrl(url).last()
|
||||
splitGalleryUrl(url)[2]
|
||||
|
||||
fun normalizeUrl(id: String, token: String)
|
||||
= "/g/$id/$token/?nw=always"
|
||||
|
@ -117,9 +117,14 @@ class EHConfigurator {
|
||||
val keyCookie = response.headers().toMultimap()["Set-Cookie"]?.find {
|
||||
it.startsWith("sk=")
|
||||
}?.removePrefix("sk=")?.substringBefore(';')
|
||||
val sessionCookie = response.headers().toMultimap()["Set-Cookie"]?.find {
|
||||
it.startsWith("s=")
|
||||
}?.removePrefix("s=")?.substringBefore(';')
|
||||
|
||||
if(keyCookie != null)
|
||||
prefs.eh_settingsKey().set(keyCookie)
|
||||
if(sessionCookie != null)
|
||||
prefs.eh_sessionCookie().set(sessionCookie)
|
||||
}
|
||||
|
||||
companion object {
|
||||
|
Reference in New Issue
Block a user