Fetch language explicit chapters links for CommitStrip (#8922)
* fix Ext icon in Extensions list replaces android-studio-created image assets that lead to blank images in Extensions list (in app and in https://tachiyomi.org/extensions as well). Usually due to there being fg bg and xml files and not just a single png file Co-authored-by: as280093 as280093@gmail.com * fix chapters not parsed for single page archive latest archives (as of writing, 2021) can just have one page in which case parsing to find total no of pages doesn't really work. In these cases, just send a single request and that'd be all * use lang specific chapter links be default each chapter gives a link like this: https://www.commitstrip.com/2020/03/23/a-mask-for-everyone/ which then is redirected to the lang by remembering browser state instead we can force the link to be the lang specific one i.e. https://www.commitstrip.com/{en,fr}/2020/03/23/a-mask-for-everyone/ * fix link to WebView sets the correct to be opened when using Open in WebView or Share * Revert "fix chapters not parsed for single page archive" This reverts commit 4722790a8db905ba18259758cbf9ed47890e9eff. Didn't really work like I expected. Time to try another route * bump commitstrip.extversioncode
|
@ -5,7 +5,7 @@ ext {
|
||||||
extName = 'Commit Strip'
|
extName = 'Commit Strip'
|
||||||
pkgNameSuffix = 'all.commitstrip'
|
pkgNameSuffix = 'all.commitstrip'
|
||||||
extClass = '.CommitStripFactory'
|
extClass = '.CommitStripFactory'
|
||||||
extVersionCode = 1
|
extVersionCode = 2
|
||||||
libVersion = '1.2'
|
libVersion = '1.2'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
|
||||||
<background android:drawable="@color/ic_launcher_background"/>
|
|
||||||
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
|
|
||||||
</adaptive-icon>
|
|
|
@ -1,5 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
|
||||||
<background android:drawable="@color/ic_launcher_background"/>
|
|
||||||
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
|
|
||||||
</adaptive-icon>
|
|
Before Width: | Height: | Size: 5.0 KiB After Width: | Height: | Size: 4.2 KiB |
Before Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 7.4 KiB |
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.0 KiB |
Before Width: | Height: | Size: 6.1 KiB |
Before Width: | Height: | Size: 4.0 KiB |
Before Width: | Height: | Size: 8.0 KiB After Width: | Height: | Size: 6.5 KiB |
Before Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 45 KiB |
Before Width: | Height: | Size: 23 KiB |
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 56 KiB |
Before Width: | Height: | Size: 38 KiB |
|
@ -1,4 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<resources>
|
|
||||||
<color name="ic_launcher_background">#FFFFFF</color>
|
|
||||||
</resources>
|
|
After Width: | Height: | Size: 198 KiB |
|
@ -8,6 +8,7 @@ import eu.kanade.tachiyomi.source.model.SChapter
|
||||||
import eu.kanade.tachiyomi.source.model.SManga
|
import eu.kanade.tachiyomi.source.model.SManga
|
||||||
import eu.kanade.tachiyomi.source.online.ParsedHttpSource
|
import eu.kanade.tachiyomi.source.online.ParsedHttpSource
|
||||||
import eu.kanade.tachiyomi.util.asJsoup
|
import eu.kanade.tachiyomi.util.asJsoup
|
||||||
|
import okhttp3.Request
|
||||||
import okhttp3.Response
|
import okhttp3.Response
|
||||||
import org.jsoup.nodes.Document
|
import org.jsoup.nodes.Document
|
||||||
import org.jsoup.nodes.Element
|
import org.jsoup.nodes.Element
|
||||||
|
@ -74,6 +75,12 @@ abstract class CommitStrip(
|
||||||
}
|
}
|
||||||
)!!
|
)!!
|
||||||
|
|
||||||
|
// Open in WebView
|
||||||
|
|
||||||
|
override fun mangaDetailsRequest(manga: SManga): Request {
|
||||||
|
return GET("${manga.url}/?", headers)
|
||||||
|
}
|
||||||
|
|
||||||
// Chapters
|
// Chapters
|
||||||
|
|
||||||
override fun fetchChapterList(manga: SManga): Observable<List<SChapter>> {
|
override fun fetchChapterList(manga: SManga): Observable<List<SChapter>> {
|
||||||
|
@ -109,7 +116,7 @@ abstract class CommitStrip(
|
||||||
override fun chapterListSelector() = ".excerpt a"
|
override fun chapterListSelector() = ".excerpt a"
|
||||||
|
|
||||||
override fun chapterFromElement(element: Element) = SChapter.create().apply {
|
override fun chapterFromElement(element: Element) = SChapter.create().apply {
|
||||||
url = element.attr("href")
|
url = "$baseUrl/$siteLang" + element.attr("href").substringAfter(baseUrl)
|
||||||
|
|
||||||
// get the chapter date from the url
|
// get the chapter date from the url
|
||||||
val date = Regex("\\d{4}\\/\\d{2}\\/\\d{2}").find(url)?.value
|
val date = Regex("\\d{4}\\/\\d{2}\\/\\d{2}").find(url)?.value
|
||||||
|
|