Fix for truyenacademy extension (#62)

* Create build.gradle

* Fix for truyenacademy extension

Extension does not show up when installed. Here's a quick fix to make it work

* Update build.gradle

* Update AcademyVN.kt

* Rename AcademyVN.kt to Academyvn.kt
This commit is contained in:
lostering 2017-06-17 06:08:06 -04:00 committed by inorichi
parent 3691fb5ee3
commit 84c3a7caee
2 changed files with 5 additions and 5 deletions

View File

@ -3,11 +3,11 @@ apply plugin: 'kotlin-android'
ext {
appName = 'Tachiyomi: AcademyVN'
pkgNameSuffix = "vi.AcademyVN"
extClass = '.AcademyVN'
pkgNameSuffix = "vi.academyvn"
extClass = '.Academyvn'
extVersionCode = 1
extVersionSuffix = 1
libVersion = '1.0'
}
apply from: "$rootDir/common.gradle"
apply from: "$rootDir/common.gradle"

View File

@ -52,7 +52,7 @@ class Academyvn : ParsedHttpSource() {
override fun latestUpdatesNextPageSelector(): String = "li > a:contains(»)"
override fun searchMangaRequest(page: Int, query: String, filters: FilterList): Request {
val url = HttpUrl.parse("$baseUrl/searchs?").newBuilder().addQueryParameter("keyword", query)
val url = HttpUrl.parse("$baseUrl/searchs?")!!.newBuilder().addQueryParameter("keyword", query)
(if (filters.isEmpty()) getFilterList() else filters).forEach { filter ->
when (filter) {
is Type -> url.addQueryParameter("type", if (filter.state == 0) "-1" else type.indexOf(filter.state.toString()).toString())
@ -194,4 +194,4 @@ class Academyvn : ParsedHttpSource() {
Genre("Yuri"),
Genre("Hot")
)
}
}