Add Hachirumi and Guya deeplink optimization (#7642)

* Added Hachirumi

* Delete multisrc/overrides/guya/guya/src directory

* Delete AndroidManifest.xml

* Delete multisrc/overrides/guya/dankefurslesen/src directory

* Delete AndroidManifest.xml

* Delete AndroidManifest.xml

* Delete multisrc/overrides/guya/coloredcouncil/src directory

* Add Icons and AndroidManifest

* Add files via upload

* Changed pathPattern to work with Hachirumi

* Add NSFW flag
This commit is contained in:
Johannes Joens 2021-06-14 22:21:43 +12:00 committed by GitHub
parent 5518e1cc44
commit 7c1da6d671
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
22 changed files with 8 additions and 201 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.8 KiB

After

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.9 KiB

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 54 KiB

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 346 KiB

After

Width:  |  Height:  |  Size: 372 KiB

View File

@ -1,11 +0,0 @@
package eu.kanade.tachiyomi.extension.en.coloredcouncil
import eu.kanade.tachiyomi.multisrc.guya.Guya
class ColoredCouncil : Guya("Colored Council", "https://coloredcouncil.moe", "en") {
companion object {
const val SLUG_PREFIX = "slug:"
const val PROXY_PREFIX = "proxy:"
const val NESTED_PROXY_API_PREFIX = "/proxy/api/"
}
}

View File

@ -1,57 +0,0 @@
package eu.kanade.tachiyomi.extension.en.coloredcouncil
import android.app.Activity
import android.content.ActivityNotFoundException
import android.content.Intent
import android.os.Bundle
import android.util.Log
import kotlin.system.exitProcess
/**
* Accepts https://danke.moe/read/manga/xyz intents
*
* Added due to requests from various users to allow for opening of titles when given the
* Guya URL whilst on mobile.
*/
class ColoredCouncilUrlActivity : Activity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
val host = intent?.data?.host
val pathSegments = intent?.data?.pathSegments
if (host != null && pathSegments != null) {
val query = fromColoredCouncil(pathSegments)
if (query == null) {
Log.e("ColoredCouncilUrlActivity", "Unable to parse URI from intent $intent")
finish()
exitProcess(1)
}
val mainIntent = Intent().apply {
action = "eu.kanade.tachiyomi.SEARCH"
putExtra("query", query)
putExtra("filter", packageName)
}
try {
startActivity(mainIntent)
} catch (e: ActivityNotFoundException) {
Log.e("ColoredCouncilUrlActivity", e.toString())
}
}
finish()
exitProcess(0)
}
private fun fromColoredCouncil(pathSegments: MutableList<String>): String? {
return if (pathSegments.size >= 3) {
val slug = pathSegments[2]
"${ColoredCouncil.SLUG_PREFIX}$slug"
} else {
null
}
}
}

View File

@ -1,23 +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=".en.dankefurslesen.DankeFursLesenUrlActivity"
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" />
<data
android:host="danke.moe"
android:pathPattern="/read/manga/..*"
android:scheme="https" />
</intent-filter>
</activity>
</application>
</manifest>

View File

@ -1,11 +0,0 @@
package eu.kanade.tachiyomi.extension.en.dankefurslesen
import eu.kanade.tachiyomi.multisrc.guya.Guya
class DankeFursLesen : Guya("Danke fürs Lesen", "https://danke.moe", "en") {
companion object {
const val SLUG_PREFIX = "slug:"
const val PROXY_PREFIX = "proxy:"
const val NESTED_PROXY_API_PREFIX = "/proxy/api/"
}
}

View File

@ -1,57 +0,0 @@
package eu.kanade.tachiyomi.extension.en.dankefurslesen
import android.app.Activity
import android.content.ActivityNotFoundException
import android.content.Intent
import android.os.Bundle
import android.util.Log
import kotlin.system.exitProcess
/**
* Accepts https://danke.moe/read/manga/xyz intents
*
* Added due to requests from various users to allow for opening of titles when given the
* Guya URL whilst on mobile.
*/
class DankeFursLesenUrlActivity : Activity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
val host = intent?.data?.host
val pathSegments = intent?.data?.pathSegments
if (host != null && pathSegments != null) {
val query = fromDankeFursLesen(pathSegments)
if (query == null) {
Log.e("DankeFursLesenUrlActivity", "Unable to parse URI from intent $intent")
finish()
exitProcess(1)
}
val mainIntent = Intent().apply {
action = "eu.kanade.tachiyomi.SEARCH"
putExtra("query", query)
putExtra("filter", packageName)
}
try {
startActivity(mainIntent)
} catch (e: ActivityNotFoundException) {
Log.e("DankeFursLesenUrlActivity", e.toString())
}
}
finish()
exitProcess(0)
}
private fun fromDankeFursLesen(pathSegments: MutableList<String>): String? {
return if (pathSegments.size >= 3) {
val slug = pathSegments[2]
"${DankeFursLesen.SLUG_PREFIX}$slug"
} else {
null
}
}
}

View File

@ -4,7 +4,7 @@
<application>
<activity
android:name=".en.coloredcouncil.ColoredCouncilUrlActivity"
android:name="eu.kanade.tachiyomi.multisrc.guya.GuyaUrlActivity"
android:excludeFromRecents="true"
android:theme="@android:style/Theme.NoDisplay">
<intent-filter>
@ -12,12 +12,11 @@
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data
android:host="coloredcouncil.moe"
android:pathPattern="/read/manga/..*"
android:scheme="https" />
android:host="${SOURCEHOST}"
android:pathPattern="/.*/.*/..*"
android:scheme="${SOURCESCHEME}" />
</intent-filter>
</activity>
</application>
</manifest>
</manifest>

View File

@ -1,23 +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=".en.guya.GuyaUrlActivity"
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" />
<data
android:host="guya.moe"
android:pathPattern="/read/manga/..*"
android:scheme="https" />
</intent-filter>
</activity>
</application>
</manifest>

View File

@ -1,11 +0,0 @@
package eu.kanade.tachiyomi.extension.en.guya
import eu.kanade.tachiyomi.multisrc.guya.Guya
class Guya : Guya("Guya", "https://guya.moe", "en"){
companion object {
const val SLUG_PREFIX = "slug:"
const val PROXY_PREFIX = "proxy:"
const val NESTED_PROXY_API_PREFIX = "/proxy/api/"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 160 KiB

View File

@ -15,6 +15,7 @@ class GuyaGenerator : ThemeSourceGenerator {
SingleLang("Guya", "https://guya.moe", "en", overrideVersionCode = 18),
SingleLang("Danke fürs Lesen", "https://danke.moe", "en", className = "DankeFursLesen"),
SingleLang("Colored Council", "https://coloredcouncil.moe", "en"),
SingleLang("Hachirumi", "https://hachirumi.com", "en", isNsfw = true),
)
companion object {
@JvmStatic

View File

@ -1,4 +1,4 @@
package eu.kanade.tachiyomi.extension.en.guya
package eu.kanade.tachiyomi.multisrc.guya
import android.app.Activity
import android.content.ActivityNotFoundException
@ -8,7 +8,7 @@ import android.util.Log
import kotlin.system.exitProcess
/**
* Accepts https://guya.moe/read/manga/xyz intents
* Accepts $baseURL/read/manga/xyz intents
*
* Added due to requests from various users to allow for opening of titles when given the
* Guya URL whilst on mobile.