forked from recloudstream/cloudstream
sff idk
This commit is contained in:
parent
379a3f2fe6
commit
d0fbf5a782
5 changed files with 30 additions and 24 deletions
|
@ -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,
|
||||
|
|
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<solid android:color="@color/dubColor"/>
|
||||
<solid android:color="@color/dubColorBg"/>
|
||||
<corners android:radius="@dimen/roundedImageRadius"/>
|
||||
<stroke android:color="@color/dubColor" android:width="1dp"/>
|
||||
<stroke android:color="@color/dubColor" android:width="2dp"/>
|
||||
</shape>
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<solid android:color="@color/subColor"/>
|
||||
<solid android:color="@color/subColorBg"/>
|
||||
<corners android:radius="@dimen/roundedImageRadius"/>
|
||||
<stroke android:color="@color/subColor" android:width="1dp"/>
|
||||
<stroke android:color="@color/subColor" android:width="2dp"/>
|
||||
</shape>
|
|
@ -79,7 +79,7 @@
|
|||
android:alpha="0.9">
|
||||
|
||||
</View>-->
|
||||
<ImageView
|
||||
<!--<ImageView
|
||||
android:src="@drawable/ic_baseline_bookmark_24"
|
||||
android:id="@+id/search_result_lang"
|
||||
android:layout_gravity="right"
|
||||
|
@ -87,20 +87,22 @@
|
|||
android:layout_marginRight="-6.5dp"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp">
|
||||
</ImageView>
|
||||
</ImageView>-->
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
android:layout_gravity="end"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<!--
|
||||
<ImageView android:id="@+id/text_is_dub" android:tint="@color/colorPrimary" android:src="@drawable/ic_baseline_subtitles_24" android:layout_width="wrap_content" android:layout_height="20dp">
|
||||
<!--
|
||||
<ImageView android:id="@+id/text_is_dub" android:tint="@color/colorPrimary"
|
||||
android:src="@drawable/ic_baseline_subtitles_24" android:layout_width="wrap_content"
|
||||
android:layout_height="20dp">
|
||||
|
||||
</ImageView>
|
||||
</ImageView>-->
|
||||
<TextView
|
||||
android:text="Dub"
|
||||
android:id="@+id/_text_is_dub"
|
||||
android:id="@+id/text_is_dub"
|
||||
android:textColor="@color/textColor"
|
||||
android:paddingRight="10dp"
|
||||
android:paddingLeft="10dp"
|
||||
|
@ -125,9 +127,9 @@
|
|||
android:minWidth="50dp"
|
||||
android:gravity="center"
|
||||
android:background="@drawable/sub_bg_color"
|
||||
android:layout_width="wrap_content" android:layout_height="match_parent"
|
||||
android:baselineAligned="false">
|
||||
</TextView>-->
|
||||
android:layout_width="wrap_content" android:layout_height="wrap_content"
|
||||
>
|
||||
</TextView>
|
||||
</LinearLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
|
|
Loading…
Reference in a new issue