Skip to content
This repository has been archived by the owner on Nov 6, 2022. It is now read-only.

Commit

Permalink
Update changelogs and add hitomi.la URL importing
Browse files Browse the repository at this point in the history
  • Loading branch information
NerdNumber9 committed Apr 15, 2018
1 parent 234c3bb commit 995a115
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 11 deletions.
16 changes: 16 additions & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,22 @@
android:host="www.tsumino.com"
android:pathPrefix="/Read/View/"
android:scheme="https"/>
<data
android:host="hitomi.la"
android:pathPrefix="/galleries/"
android:scheme="http"/>
<data
android:host="hitomi.la"
android:pathPrefix="/reader/"
android:scheme="http"/>
<data
android:host="hitomi.la"
android:pathPrefix="/galleries/"
android:scheme="https"/>
<data
android:host="hitomi.la"
android:pathPrefix="/reader/"
android:scheme="https"/>
</intent-filter>
</activity>
<activity
Expand Down
28 changes: 17 additions & 11 deletions app/src/main/java/eu/kanade/tachiyomi/source/online/all/Hitomi.kt
Original file line number Diff line number Diff line change
Expand Up @@ -190,27 +190,33 @@ class Hitomi(private val context: Context)
}

override fun fetchSearchManga(page: Int, query: String, filters: FilterList): Observable<MangasPage> {
return trySearch(page, query).map {
val res = it.map {
SManga.create().apply {
setUrlWithoutDomain(it.url!!)
return urlImportFetchSearchManga(query, {
trySearch(page, query).map {
val res = it.map {
SManga.create().apply {
setUrlWithoutDomain(it.url!!)

title = it.title!!
title = it.title!!

it.thumbnailUrl?.let {
thumbnail_url = it
it.thumbnailUrl?.let {
thumbnail_url = it
}
}
}
}

MangasPage(res, it.isNotEmpty())
}
MangasPage(res, it.isNotEmpty())
}
})
}

override fun fetchMangaDetails(manga: SManga): Observable<SManga> {
return lazyLoadMetaPages(HitomiGalleryMetadata.hlIdFromUrl(manga.url), true)
.map {
manga.copyFrom(parseToManga(queryFromUrl(manga.url), it.first))
val newManga = parseToManga(queryFromUrl(manga.url), it.first)
manga.copyFrom(newManga)
// Forcibly copy title as copyFrom does not
manga.title = newManga.title

manga
}
.subscribeOn(parseToMangaScheduler())
Expand Down
8 changes: 8 additions & 0 deletions app/src/main/java/exh/GalleryAdder.kt
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ class GalleryAdder {
}
"hentai.cafe" -> HENTAI_CAFE_SOURCE_ID
"www.tsumino.com" -> TSUMINO_SOURCE_ID
"hitomi.la" -> HITOMI_SOURCE_ID
else -> return GalleryAddEvent.Fail.UnknownType(url)
}

Expand Down Expand Up @@ -123,6 +124,12 @@ class GalleryAdder {

"https://tsumino.com/Book/Info/${urlObj.pathSegments[2]}"
}
HITOMI_SOURCE_ID -> {
if(lcFirstPathSegment != "galleries" && lcFirstPathSegment != "reader")
return GalleryAddEvent.Fail.UnknownType(url)

"https://hitomi.la/galleries/${urlObj.pathSegments[1].substringBefore('.')}.html"
}
else -> return GalleryAddEvent.Fail.UnknownType(url)
}

Expand All @@ -136,6 +143,7 @@ class GalleryAdder {
PERV_EDEN_IT_SOURCE_ID -> getUrlWithoutDomain(realUrl)
HENTAI_CAFE_SOURCE_ID -> getUrlWithoutDomain(realUrl)
TSUMINO_SOURCE_ID -> getUrlWithoutDomain(realUrl)
HITOMI_SOURCE_ID -> getUrlWithoutDomain(realUrl)
else -> return GalleryAddEvent.Fail.UnknownType(url)
}

Expand Down
9 changes: 9 additions & 0 deletions app/src/main/res/raw/changelog_release.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<changelog bulletedList="true">
<changelogversion versionName="v7.2.0-EH" changeDate="">
<changelogtext>Fix Tsumino search page offset</changelogtext>
<changelogtext>Added hitomi.la source (searching is still very slow/buggy)</changelogtext>
<changelogtext>Add option to expand search filter by default</changelogtext>
<changelogtext>Add an option to disable auto lock and add manual locking</changelogtext>
<changelogtext>Re-theme lock view (again)</changelogtext>
<changelogtext>Fix broken back button in search</changelogtext>
<changelogtext>Fix Tsumino captcha appearing multiple times</changelogtext>
</changelogversion>
<changelogversion versionName="v7.0.0-EH" changeDate="">
<changelogtext>More fixes to favorites sync</changelogtext>
<changelogtext>Added options to ignore errors in favorites sync</changelogtext>
Expand Down

0 comments on commit 995a115

Please sign in to comment.