diff --git a/app/src/main/java/com/lagradost/cloudstream3/animeproviders/ShiroProvider.kt b/app/src/main/java/com/lagradost/cloudstream3/animeproviders/ShiroProvider.kt index 8a0b5b91..5a8ab982 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/animeproviders/ShiroProvider.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/animeproviders/ShiroProvider.kt @@ -47,6 +47,9 @@ class ShiroProvider : MainAPI() { override val mainUrl: String get() = "https://shiro.is" + override val name: String + get() = "Shiro" + data class ShiroSearchResponseShow( @JsonProperty("image") val image: String, @JsonProperty("_id") val _id: String, @@ -150,7 +153,7 @@ class ShiroProvider : MainAPI() { val episodeCount = i.episodeCount.toInt() returnValue.add(AnimeSearchResponse( - i.english ?: i.canonicalTitle, + i.name.replace("Dubbed",""), // i.english ?: i.canonicalTitle, "$mainUrl/${i.slug}", i.slug, this.name, diff --git a/app/src/main/java/com/lagradost/cloudstream3/ui/search/SearchAdaptor.kt b/app/src/main/java/com/lagradost/cloudstream3/ui/search/SearchAdaptor.kt index e113573f..cd741a4f 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/ui/search/SearchAdaptor.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/ui/search/SearchAdaptor.kt @@ -64,10 +64,10 @@ class SearchAdapter( val cardView: ImageView = itemView.imageView val cardText: TextView = itemView.imageText val text_type: TextView? = itemView.text_type - val search_result_lang: ImageView? = itemView.search_result_lang - /* + // val search_result_lang: ImageView? = itemView.search_result_lang + val text_is_dub: View? = itemView.text_is_dub - val text_is_sub: View? = itemView.text_is_sub*/ + val text_is_sub: View? = itemView.text_is_sub //val cardTextExtra: TextView? = itemView.imageTextExtra //val imageTextProvider: TextView? = itemView.imageTextProvider @@ -92,10 +92,10 @@ class SearchAdapter( TvType.ONA -> "ONA" TvType.TvSeries -> "TV" } - search_result_lang?.visibility = View.GONE - /* + // search_result_lang?.visibility = View.GONE + text_is_dub?.visibility = View.GONE - text_is_sub?.visibility = View.GONE*/ + text_is_sub?.visibility = View.GONE cardText.text = card.name @@ -116,12 +116,13 @@ class SearchAdapter( when (card) { is AnimeSearchResponse -> { if (card.dubStatus?.size == 1) { - search_result_lang?.visibility = View.VISIBLE + //search_result_lang?.visibility = View.VISIBLE if (card.dubStatus.contains(DubStatus.HasDub)) { - search_result_lang?.setColorFilter(ContextCompat.getColor(activity, R.color.dubColor)) + text_is_dub?.visibility = View.VISIBLE + //search_result_lang?.setColorFilter(ContextCompat.getColor(activity, R.color.dubColor)) } else if (card.dubStatus.contains(DubStatus.HasSub)) { - search_result_lang?.setColorFilter(ContextCompat.getColor(activity, R.color.subColor)) - // text_is_sub?.visibility = View.VISIBLE + //search_result_lang?.setColorFilter(ContextCompat.getColor(activity, R.color.subColor)) + text_is_sub?.visibility = View.VISIBLE } } } diff --git a/app/src/main/res/drawable/dub_bg_color.xml b/app/src/main/res/drawable/dub_bg_color.xml index 0ed149bd..f2ecfe82 100644 --- a/app/src/main/res/drawable/dub_bg_color.xml +++ b/app/src/main/res/drawable/dub_bg_color.xml @@ -1,6 +1,6 @@ - + - + \ No newline at end of file diff --git a/app/src/main/res/drawable/sub_bg_color.xml b/app/src/main/res/drawable/sub_bg_color.xml index a3eded0d..f12d5335 100644 --- a/app/src/main/res/drawable/sub_bg_color.xml +++ b/app/src/main/res/drawable/sub_bg_color.xml @@ -1,6 +1,6 @@ - + - + \ No newline at end of file diff --git a/app/src/main/res/layout/search_result_grid.xml b/app/src/main/res/layout/search_result_grid.xml index 6032c598..6ce82ce6 100644 --- a/app/src/main/res/layout/search_result_grid.xml +++ b/app/src/main/res/layout/search_result_grid.xml @@ -79,7 +79,7 @@ android:alpha="0.9"> --> - - + --> - - --> + android:layout_width="wrap_content" android:layout_height="wrap_content" + > +