Skip to content

Commit 9860e80

Browse files
authored
Merge pull request #91 from snehilrx/fix_url
Fix url
2 parents 0bf6b0b + 0458db1 commit 9860e80

File tree

57 files changed

+4048
-290
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+4048
-290
lines changed

app/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ dependencies {
7979
implementation "androidx.work:work-runtime-ktx:$versions.work"
8080
implementation project(path: ':kickassanime')
8181
implementation 'com.google.firebase:firebase-perf:20.5.0'
82+
implementation project(path: ':shinebar')
8283
androidTestImplementation "io.github.rascaler:assertj:$versions.assertJ"
8384
testImplementation "junit:junit:$versions.junit"
8485
androidTestImplementation "androidx.test.ext:junit:$versions.androidx_junit"

app/google-services.json

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
{
2+
"project_info": {
3+
"project_number": "210529357737",
4+
"project_id": "fetch-kaa",
5+
"storage_bucket": "fetch-kaa.appspot.com"
6+
},
7+
"client": [
8+
{
9+
"client_info": {
10+
"mobilesdk_app_id": "1:210529357737:android:26cb4f33050ba558553eb8",
11+
"android_client_info": {
12+
"package_name": "com.otaku.fetch"
13+
}
14+
},
15+
"oauth_client": [
16+
{
17+
"client_id": "210529357737-nfvrqu7uas8a5p2ehjpbrcna7128tnf0.apps.googleusercontent.com",
18+
"client_type": 3
19+
}
20+
],
21+
"api_key": [
22+
{
23+
"current_key": "AIzaSyD9ThkGRRDB_fb8Y1lO6F0Ba-hOb9qK_DQ"
24+
}
25+
],
26+
"services": {
27+
"appinvite_service": {
28+
"other_platform_oauth_client": [
29+
{
30+
"client_id": "210529357737-nfvrqu7uas8a5p2ehjpbrcna7128tnf0.apps.googleusercontent.com",
31+
"client_type": 3
32+
}
33+
]
34+
}
35+
}
36+
}
37+
],
38+
"configuration_version": "1"
39+
}

app/src/main/AndroidManifest.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@
1717
android:supportsRtl="true"
1818
android:theme="@style/Theme.KickassAnime"
1919
android:usesCleartextTraffic="true">
20+
<profileable
21+
android:shell="true"
22+
tools:targetApi="q" />
23+
2024
<activity
2125
android:name=".MainActivity"
2226
android:exported="true">

app/src/main/java/com/otaku/fetch/ModuleActivity.kt

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package com.otaku.fetch
33
import android.annotation.SuppressLint
44
import android.content.Context
55
import android.os.Bundle
6+
import android.util.TypedValue
67
import android.view.LayoutInflater
78
import android.view.View
89
import android.view.ViewGroup
@@ -25,16 +26,19 @@ import com.otaku.fetch.base.settings.Settings
2526
import com.otaku.fetch.base.settings.dataStore
2627
import com.otaku.fetch.base.ui.BindingActivity
2728
import com.otaku.fetch.base.ui.SearchInterface
29+
import com.otaku.fetch.base.ui.ShineBarInterface
2830
import com.otaku.fetch.base.utils.UiUtils.statusBarHeight
2931
import com.otaku.fetch.databinding.ActivityModuleBinding
3032
import dagger.hilt.android.AndroidEntryPoint
33+
import io.github.snehilrx.shinebar.Shinebar
3134
import kotlinx.coroutines.flow.collectLatest
3235
import kotlinx.coroutines.launch
3336

3437

3538
@AndroidEntryPoint
3639
class ModuleActivity :
37-
BindingActivity<ActivityModuleBinding>(R.layout.activity_module), SearchInterface {
40+
BindingActivity<ActivityModuleBinding>(R.layout.activity_module), SearchInterface,
41+
ShineBarInterface {
3842

3943
inner class SearchComponents(
4044
val suggestionsList: RecyclerView,
@@ -44,12 +48,31 @@ class ModuleActivity :
4448

4549
private lateinit var searchUi: SearchComponents
4650

51+
override val shinebar: Shinebar
52+
get() = binding.shinebar
53+
54+
private fun setupShineBar(shinebar: Shinebar) {
55+
val start = TypedValue()
56+
val end = TypedValue()
57+
theme?.resolveAttribute(
58+
com.google.android.material.R.attr.colorPrimary,
59+
start,
60+
true
61+
)
62+
theme?.resolveAttribute(com.google.android.material.R.attr.colorAccent, end, true)
63+
shinebar.apply {
64+
setStartColor(start.data)
65+
setEndColor(end.data)
66+
}
67+
}
68+
4769
override fun onBind(binding: ActivityModuleBinding, savedInstanceState: Bundle?) {
4870
super.onBind(binding, savedInstanceState)
4971
initNavigationView()
5072
setTransparentStatusBar()
5173
initSearchView(binding)
5274
checkPermissions()
75+
setupShineBar(shinebar)
5376
}
5477

5578
private fun checkPermissions() {

app/src/main/res/layout-land/activity_module.xml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@
77
android:layout_width="match_parent"
88
android:layout_height="match_parent">
99

10+
<io.github.snehilrx.shinebar.Shinebar
11+
android:id="@+id/shinebar"
12+
android:layout_width="match_parent"
13+
android:layout_height="match_parent"
14+
android:fitsSystemWindows="false" />
15+
1016
<androidx.fragment.app.FragmentContainerView
1117
android:id="@+id/fragmentContainerView"
1218
android:name="androidx.navigation.fragment.NavHostFragment"
@@ -22,12 +28,11 @@
2228
<com.google.android.material.navigationrail.NavigationRailView
2329
android:id="@+id/railNavigation"
2430
android:layout_gravity="bottom"
31+
android:background="@android:color/transparent"
2532
app:menuAlignmentMode="auto"
2633
android:orientation="vertical"
27-
android:paddingStart="@dimen/cardview_margin"
28-
android:paddingEnd="@dimen/cardview_margin"
2934
android:layout_width="wrap_content"
30-
android:layout_height="wrap_content"
35+
android:layout_height="match_parent"
3136
app:layout_constraintBottom_toBottomOf="parent"
3237
app:layout_constraintStart_toStartOf="parent"
3338
app:layout_constraintTop_toTopOf="parent" />

app/src/main/res/layout/activity_module.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@
88
android:layout_width="match_parent"
99
android:layout_height="match_parent">
1010

11+
<io.github.snehilrx.shinebar.Shinebar
12+
android:id="@+id/shinebar"
13+
android:layout_width="match_parent"
14+
android:layout_height="match_parent"
15+
android:fitsSystemWindows="false" />
16+
1117
<androidx.constraintlayout.widget.ConstraintLayout
1218
android:id="@+id/container"
1319
android:fitsSystemWindows="false"

app/src/main/res/xml/network_security_config.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
<domain-config>
44
<domain includeSubdomains="true">kaaplayer.com</domain>
55
<domain includeSubdomains="true">kaas.am</domain>
6+
<domain includeSubdomains="true">kickassanime.mx</domain>
67
<domain includeSubdomains="true">localhost</domain>
78
</domain-config>
89
</network-security-config>

base/cloudflarebypass/src/main/java/com/fetch/cloudflarebypass/CloudflareInterceptor.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ class CloudflareInterceptor(
6161
*/
6262
private val headers = Headers.headersOf(
6363
"User-Agent",
64-
"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:73.0) Gecko/20100101 Firefox/73.0",
64+
"Mozilla/5.0 (iPhone; CPU iPhone OS 16_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.6 Mobile/15E148 Safari/604.1",
6565
"Upgrade-Insecure-Requests",
6666
"1",
6767
"Accept-Language",

base/src/main/java/com/otaku/fetch/base/di/modules/ApplicationModule.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,15 +53,16 @@ object ApplicationModule {
5353
.header("origin", origin)
5454
.header(
5555
"user-agent",
56-
"Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1"
56+
"Mozilla/5.0 (iPhone; CPU iPhone OS 16_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.6 Mobile/15E148 Safari/604.1"
5757
)
5858
.method(original.method, original.body)
5959
.build()
6060

6161
chain.proceed(request)
6262
}).callTimeout(4, TimeUnit.MINUTES)
6363
.connectTimeout(4, TimeUnit.MINUTES)
64-
.addInterceptor(logger).build()
64+
.addInterceptor(logger)
65+
.build()
6566

6667
private const val MAX_CACHE_SIZE: Long = 2000000000
6768

base/src/main/java/com/otaku/fetch/base/download/DownloadScreens.kt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,7 @@ import kotlin.math.min
4949
@androidx.annotation.OptIn(UnstableApi::class)
5050
fun DownloadScreen(
5151
downloadsVM: DownloadViewModel,
52-
statusBarHeight: Float? = null,
53-
setupShineBar: (Shinebar) -> Unit = { _ -> run {} }
52+
statusBarHeight: Float? = null
5453
) {
5554

5655
val items = downloadsVM.anime()
@@ -65,7 +64,6 @@ fun DownloadScreen(
6564
downloadsVM.resume(context)
6665
}, isPaused = downloadsVM.isDownloadPaused)
6766
},
68-
setupShineBar = setupShineBar
6967
) {
7068
DownloadList(items.toItemTreeIndex(downloadsVM))
7169
}

0 commit comments

Comments
 (0)