Fix broken favorites sync

Release v6.8.2
This commit is contained in:
NerdNumber9
2018-02-15 17:21:33 -05:00
parent 5447bd098b
commit c54d26d6ba
8 changed files with 22 additions and 6 deletions

View File

@@ -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"