cubari more intents (#19303)

This commit is contained in:
Henrik 2023-12-14 11:56:18 +01:00 committed by GitHub
parent a22818b51b
commit 04ce77c510
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 29 additions and 1 deletions

View File

@ -69,6 +69,32 @@
android:pathPattern="/gallery/..*"
android:scheme="https" />
</intent-filter>
<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="*.imgchest.com" />
<data android:host="imgchest.com" />
<data
android:pathPattern="/p/..*"
android:scheme="https" />
</intent-filter>
<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="*.catbox.moe" />
<data android:host="catbox.moe" />
<data
android:pathPattern="/c/..*"
android:scheme="https" />
</intent-filter>
</activity>
</application>
</manifest>

View File

@ -6,7 +6,7 @@ ext {
extName = 'Cubari'
pkgNameSuffix = "all.cubari"
extClass = '.CubariFactory'
extVersionCode = 22
extVersionCode = 23
}
apply from: "$rootDir/common.gradle"

View File

@ -19,6 +19,8 @@ class CubariUrlActivity : Activity() {
when {
equals("m.imgur.com") || equals("imgur.com") -> fromSource("imgur", pathSegments)
equals("m.reddit.com") || equals("reddit.com") || equals("www.reddit.com") -> fromSource("reddit", pathSegments)
equals("imgchest.com") -> fromSource("imgchest", pathSegments)
equals("catbox.moe") || equals("www.catbox.moe") -> fromSource("catbox", pathSegments)
else -> fromCubari(pathSegments)
}
}