Change sort UI in MyMangaReader CMS source (#322)
* Use correct filter type for sort * Update MyMangaReader CMS sources * Bump MyMangaReaderCMS extension version number Properly get image URL on some sources
This commit is contained in:
parent
0c8a5aa58d
commit
350d6d9a73
|
@ -5,8 +5,8 @@ ext {
|
|||
appName = 'Tachiyomi: My Manga Reader CMS (Many sources)'
|
||||
pkgNameSuffix = 'all.mmrcms'
|
||||
extClass = '.MyMangaReaderCMSSources'
|
||||
extVersionCode = 4
|
||||
extVersionSuffix = 4
|
||||
extVersionCode = 5
|
||||
extVersionSuffix = 5
|
||||
libVersion = '1.2'
|
||||
}
|
||||
|
||||
|
|
|
@ -238,13 +238,14 @@ gen "en" "Fallen Angels Scans" "http://manga.fascans.com"
|
|||
# Went offline
|
||||
# gen "en" "MangaRoot" "http://mangaroot.com"
|
||||
gen "en" "Mangawww Reader" "http://mangawww.com"
|
||||
gen "en" "MangaForLife" "http://manga4ever.com"
|
||||
# Went offline
|
||||
# gen "en" "MangaForLife" "http://manga4ever.com"
|
||||
gen "en" "Manga Spoil" "http://mangaspoil.com"
|
||||
# Protected by CloudFlare
|
||||
# gen "en" "MangaBlue" "http://mangablue.com"
|
||||
# Some sort of anti-bot system
|
||||
# gen "en" "Manga Forest" "https://mangaforest.com"
|
||||
gen "en" "DManga" "http://dmanga.website"
|
||||
gen "en" "Manga Forest" "https://mangaforest.com"
|
||||
# Went offline
|
||||
# gen "en" "DManga" "http://dmanga.website"
|
||||
gen "en" "Chibi Manga Reader" "http://www.cmreader.info"
|
||||
gen "en" "ZXComic" "http://zxcomic.com"
|
||||
# Went offline
|
||||
|
@ -252,7 +253,8 @@ gen "en" "ZXComic" "http://zxcomic.com"
|
|||
gen "en" "Mangacox" "http://mangacox.com"
|
||||
# Protected by CloudFlare
|
||||
# gen "en" "GO Manhwa" "http://gomanhwa.xyz"
|
||||
gen "en" "KoManga" "https://komanga.net"
|
||||
# Went offline
|
||||
# gen "en" "KoManga" "https://komanga.net"
|
||||
# Went offline
|
||||
# gen "en" "Manganimecan" "http://manganimecan.com"
|
||||
gen "en" "Hentai2Manga" "http://hentai2manga.com"
|
||||
|
@ -275,7 +277,8 @@ gen "fr" "scans-manga" "http://scans-manga.com"
|
|||
gen "fr" "Henka no Kaze" "http://henkanokazelel.esy.es/upload"
|
||||
# Went offline
|
||||
# gen "fr" "Tous Vos Scans" "http://www.tous-vos-scans.com"
|
||||
gen "id" "Manga Desu" "http://mangadesu.net"
|
||||
# Went offline
|
||||
# gen "id" "Manga Desu" "http://mangadesu.net"
|
||||
# Went offline
|
||||
# gen "id" "Komik Mangafire.ID" "http://go.mangafire.id"
|
||||
gen "id" "MangaOnline" "http://mangaonline.web.id"
|
||||
|
@ -288,22 +291,22 @@ gen "id" "Manga FYI" "http://mangafyi.com/manga/indonesian"
|
|||
gen "id" "Bacamangaku" "http://www.bacamangaku.com"
|
||||
# Went offline
|
||||
# gen "id" "Indo Manga Reader" "http://indomangareader.com"
|
||||
# Some sort of anti-bot system
|
||||
# Protected by Cloudflare
|
||||
# gen "it" "Kingdom Italia Reader" "http://kireader.altervista.org"
|
||||
# Went offline
|
||||
# gen "ja" "IchigoBook" "http://ichigobook.com"
|
||||
# Went offline
|
||||
# gen "ja" "Mangaraw Online" "http://mangaraw.online"
|
||||
gen "ja" "Mangazuki RAWS" "https://raws.mangazuki.co"
|
||||
gen "ja" "MangaRAW" "https://www.mgraw.com"
|
||||
# Went offline
|
||||
# gen "ja" "MangaRAW" "https://www.mgraw.com"
|
||||
gen "ja" "マンガ/漫画 マガジン/雑誌 raw" "http://netabare-manga-raw.com"
|
||||
gen "pl" "ToraScans" "http://torascans.pl"
|
||||
gen "pt" "Comic Space" "https://www.comicspace.com.br"
|
||||
gen "pt" "Mangás Yuri" "https://mangasyuri.net"
|
||||
gen "ru" "NAKAMA" "http://nakama.ru"
|
||||
# Went offline
|
||||
# gen "ru" "AkaiYuhiMun team" "https://akaiyuhimun.ru/reader"
|
||||
gen "tr" "MangAoi" "http://mangaoi.com"
|
||||
# gen "tr" "MangAoi" "http://mangaoi.com"
|
||||
gen "tr" "MangaHanta" "http://mangahanta.com"
|
||||
gen "tr" "ManhuaTR" "http://www.manhua-tr.com"
|
||||
gen "vi" "Fallen Angels Scans" "http://truyen.fascans.com"
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -221,7 +221,14 @@ class MyMangaReaderCMSSource(override val lang: String,
|
|||
override fun pageListParse(response: Response)
|
||||
= response.asJsoup().select("#all > .img-responsive")
|
||||
.mapIndexed { i, e ->
|
||||
val url = e.attr("data-src").trim()
|
||||
var url = e.attr("data-src")
|
||||
|
||||
if(url.isBlank()) {
|
||||
url = e.attr("src")
|
||||
}
|
||||
|
||||
url = url.trim()
|
||||
|
||||
Page(i, url, url)
|
||||
}
|
||||
|
||||
|
@ -246,19 +253,7 @@ class MyMangaReaderCMSSource(override val lang: String,
|
|||
}.toTypedArray()
|
||||
)
|
||||
),
|
||||
UriSelectFilter("Sort by",
|
||||
"sortBy",
|
||||
arrayOf(
|
||||
"name" to "Name",
|
||||
"views" to "Popularity",
|
||||
"last_release" to "Last update"
|
||||
), false),
|
||||
UriSelectFilter("Sort direction",
|
||||
"asc",
|
||||
arrayOf(
|
||||
"true" to "Ascending",
|
||||
"false" to "Descending"
|
||||
), false)
|
||||
SortFilter()
|
||||
)
|
||||
|
||||
/**
|
||||
|
@ -296,6 +291,23 @@ class MyMangaReaderCMSSource(override val lang: String,
|
|||
}
|
||||
}
|
||||
|
||||
class SortFilter: Filter.Sort("Sort",
|
||||
sortables.map { it.second }.toTypedArray(),
|
||||
Filter.Sort.Selection(0, true)), UriFilter {
|
||||
override fun addToUri(uri: Uri.Builder) {
|
||||
uri.appendQueryParameter("sortBy", sortables[state!!.index].first)
|
||||
uri.appendQueryParameter("asc", state!!.ascending.toString())
|
||||
}
|
||||
|
||||
companion object {
|
||||
private val sortables = arrayOf(
|
||||
"name" to "Name",
|
||||
"views" to "Popularity",
|
||||
"last_release" to "Last update"
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Represents a filter that is able to modify a URI.
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue