MangAdventure split (#5667)
@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="eu.kanade.tachiyomi.extension">
|
||||
<application>
|
||||
<activity android:name="eu.kanade.tachiyomi.multisrc.mangadventure.MangAdventureActivity"
|
||||
android:theme="@android:style/Theme.NoDisplay"
|
||||
android:excludeFromRecents="true">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.VIEW"/>
|
||||
<category android:name="android.intent.category.DEFAULT"/>
|
||||
<category android:name="android.intent.category.BROWSABLE"/>
|
||||
<data android:host="arc-relight.com"
|
||||
android:pathPattern="/reader/..*"
|
||||
android:scheme="https"/>
|
||||
<data android:host="www.arc-relight.com"
|
||||
android:pathPattern="/reader/..*"
|
||||
android:scheme="https"/>
|
||||
</intent-filter>
|
||||
</activity>
|
||||
</application>
|
||||
</manifest>
|
After Width: | Height: | Size: 2.6 KiB |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 3.8 KiB |
After Width: | Height: | Size: 6.8 KiB |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 50 KiB |
@ -0,0 +1,27 @@
|
||||
package eu.kanade.tachiyomi.extension.en.arcrelight
|
||||
|
||||
import eu.kanade.tachiyomi.multisrc.mangadventure.MangAdventure
|
||||
|
||||
/** Arc-Relight source. */
|
||||
class ArcRelight : MangAdventure(
|
||||
"Arc-Relight",
|
||||
"https://arc-relight.com",
|
||||
listOf(
|
||||
"4-Koma",
|
||||
"Chaos;Head",
|
||||
"Collection",
|
||||
"Comedy",
|
||||
"Drama",
|
||||
"Jubilee",
|
||||
"Mystery",
|
||||
"Psychological",
|
||||
"Robotics;Notes",
|
||||
"Romance",
|
||||
"Sci-Fi",
|
||||
"Seinen",
|
||||
"Shounen",
|
||||
"Steins;Gate",
|
||||
"Supernatural",
|
||||
"Tragedy"
|
||||
)
|
||||
)
|
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 3.0 KiB |
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 4.4 KiB After Width: | Height: | Size: 4.4 KiB |
Before Width: | Height: | Size: 7.3 KiB After Width: | Height: | Size: 7.3 KiB |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 35 KiB After Width: | Height: | Size: 35 KiB |
@ -1,8 +1,8 @@
|
||||
package eu.kanade.tachiyomi.extension.all.mangadventure
|
||||
package eu.kanade.tachiyomi.multisrc.mangadventure
|
||||
|
||||
import android.net.Uri
|
||||
import android.os.Build.VERSION
|
||||
import eu.kanade.tachiyomi.extension.BuildConfig
|
||||
import eu.kanade.tachiyomi.extensions.BuildConfig
|
||||
import eu.kanade.tachiyomi.network.GET
|
||||
import eu.kanade.tachiyomi.network.asObservableSuccess
|
||||
import eu.kanade.tachiyomi.source.model.Filter
|
||||
@ -29,7 +29,7 @@ import java.util.Locale
|
||||
abstract class MangAdventure(
|
||||
override val name: String,
|
||||
override val baseUrl: String,
|
||||
val categories: Array<String> = DEFAULT_CATEGORIES
|
||||
val categories: List<String> = DEFAULT_CATEGORIES
|
||||
) : HttpSource() {
|
||||
|
||||
override val versionId = 1
|
||||
@ -182,7 +182,7 @@ abstract class MangAdventure(
|
||||
private val STATUSES = arrayOf("Any", "Completed", "Ongoing")
|
||||
|
||||
/** Manga categories from MangAdventure `categories.xml` fixture. */
|
||||
internal val DEFAULT_CATEGORIES = arrayOf(
|
||||
internal val DEFAULT_CATEGORIES = listOf(
|
||||
"4-Koma",
|
||||
"Action",
|
||||
"Adventure",
|
||||
@ -233,7 +233,7 @@ abstract class MangAdventure(
|
||||
* @param date The date to convert.
|
||||
* @return The timestamp of the date.
|
||||
*/
|
||||
fun httpDateToTimestamp(date: String) =
|
||||
internal fun httpDateToTimestamp(date: String) =
|
||||
SimpleDateFormat(HTTP_DATE, Locale.US).parse(date)?.time ?: 0L
|
||||
}
|
||||
|
||||
@ -244,7 +244,7 @@ abstract class MangAdventure(
|
||||
*/
|
||||
inner class Status : Filter.Select<String>("Status", STATUSES) {
|
||||
/** Returns the [state] as a string. */
|
||||
fun string() = values[state].toLowerCase(Locale(lang))
|
||||
fun string() = values[state].toLowerCase(Locale.ENGLISH)
|
||||
}
|
||||
|
||||
/**
|
||||
@ -268,8 +268,7 @@ abstract class MangAdventure(
|
||||
* @constructor Creates a [Filter.Group] object with categories.
|
||||
*/
|
||||
inner class CategoryList : Filter.Group<Category>(
|
||||
"Categories",
|
||||
categories.map(::Category)
|
||||
"Categories", categories.map(::Category)
|
||||
)
|
||||
|
||||
/**
|
@ -1,4 +1,4 @@
|
||||
package eu.kanade.tachiyomi.extension.all.mangadventure
|
||||
package eu.kanade.tachiyomi.multisrc.mangadventure
|
||||
|
||||
import android.app.Activity
|
||||
import android.content.ActivityNotFoundException
|
||||
@ -26,13 +26,11 @@ class MangAdventureActivity : Activity() {
|
||||
} catch (ex: ActivityNotFoundException) {
|
||||
Log.e("MangAdventureActivity", ex.message, ex)
|
||||
}
|
||||
} ?: logInvalidIntent(intent)
|
||||
} ?: Log.e(
|
||||
"MangAdventureActivity",
|
||||
"Failed to parse URI from intent: $intent"
|
||||
)
|
||||
finish()
|
||||
exitProcess(0)
|
||||
}
|
||||
|
||||
private fun logInvalidIntent(intent: Intent) = Log.e(
|
||||
"MangAdventureActivity",
|
||||
"Failed to parse URI from intent: $intent"
|
||||
)
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
package eu.kanade.tachiyomi.extension.all.mangadventure
|
||||
package eu.kanade.tachiyomi.multisrc.mangadventure
|
||||
|
||||
import android.net.Uri
|
||||
import eu.kanade.tachiyomi.source.model.SChapter
|
@ -0,0 +1,21 @@
|
||||
package eu.kanade.tachiyomi.multisrc.mangadventure
|
||||
|
||||
import eu.kanade.tachiyomi.multisrc.ThemeSourceData.SingleLang
|
||||
import eu.kanade.tachiyomi.multisrc.ThemeSourceGenerator
|
||||
|
||||
/** [MangAdventure] source generator. */
|
||||
class MangAdventureGenerator : ThemeSourceGenerator {
|
||||
override val themePkg = "mangadventure"
|
||||
|
||||
override val themeClass = "MangAdventure"
|
||||
|
||||
override val baseVersionCode = 1
|
||||
|
||||
override val sources = listOf(
|
||||
SingleLang("Arc-Relight", "https://arc-relight.com", "en", className = "ArcRelight"),
|
||||
)
|
||||
|
||||
companion object {
|
||||
@JvmStatic fun main(args: Array<String>) = MangAdventureGenerator().createAll()
|
||||
}
|
||||
}
|
@ -1,28 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="eu.kanade.tachiyomi.extension">
|
||||
|
||||
<application>
|
||||
<activity
|
||||
android:name=".all.mangadventure.MangAdventureActivity"
|
||||
android:excludeFromRecents="true"
|
||||
android:theme="@android:style/Theme.NoDisplay">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<category android:name="android.intent.category.BROWSABLE" />
|
||||
|
||||
<!-- MangAdventure sites can be added here. -->
|
||||
<data
|
||||
android:host="arc-relight.com"
|
||||
android:pathPattern="/reader/..*"
|
||||
android:scheme="https" />
|
||||
<data
|
||||
android:host="reader.decadencescans.com"
|
||||
android:pathPattern="/reader/..*"
|
||||
android:scheme="https" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
</application>
|
||||
</manifest>
|
@ -1,12 +0,0 @@
|
||||
apply plugin: 'com.android.application'
|
||||
apply plugin: 'kotlin-android'
|
||||
|
||||
ext {
|
||||
extName = 'MangAdventure'
|
||||
pkgNameSuffix = 'all.mangadventure'
|
||||
extClass = '.MangAdventureFactory'
|
||||
extVersionCode = 8
|
||||
libVersion = '1.2'
|
||||
}
|
||||
|
||||
apply from: "$rootDir/common.gradle"
|
@ -1,34 +0,0 @@
|
||||
package eu.kanade.tachiyomi.extension.all.mangadventure
|
||||
|
||||
import eu.kanade.tachiyomi.source.SourceFactory
|
||||
|
||||
/** [MangAdventure] source factory. */
|
||||
class MangAdventureFactory : SourceFactory {
|
||||
override fun createSources() = listOf(
|
||||
ArcRelight()
|
||||
)
|
||||
|
||||
/** Arc-Relight source. */
|
||||
class ArcRelight : MangAdventure(
|
||||
"Arc-Relight",
|
||||
"https://arc-relight.com",
|
||||
arrayOf(
|
||||
"4-Koma",
|
||||
"Chaos;Head",
|
||||
"Collection",
|
||||
"Comedy",
|
||||
"Drama",
|
||||
"Jubilee",
|
||||
"Mystery",
|
||||
"Psychological",
|
||||
"Robotics;Notes",
|
||||
"Romance",
|
||||
"Sci-Fi",
|
||||
"Seinen",
|
||||
"Shounen",
|
||||
"Steins;Gate",
|
||||
"Supernatural",
|
||||
"Tragedy"
|
||||
)
|
||||
)
|
||||
}
|