hopefully fixed ocean-21

This commit is contained in:
LagradOst 2022-04-27 21:48:27 +02:00
parent d8fb6ea86d
commit 5a19c1bf4d
12 changed files with 19 additions and 21 deletions

View file

@ -70,7 +70,7 @@ class AniListApi(index: Int) : AccountManager(index), SyncAPI {
return user != null
}
override fun getIdFromUrl(url : String): String {
override fun getIdFromUrl(url: String): String {
return url.removePrefix("$mainUrl/anime/").removeSuffix("/")
}
@ -746,8 +746,8 @@ class AniListApi(index: Int) : AccountManager(index), SyncAPI {
}
}"""
val data = postApi(q)
if (data == "") return null
val userData = mapper.readValue<AniListRoot>(data ?: return null)
if (data.isNullOrBlank()) return null
val userData = mapper.readValue<AniListRoot>(data)
val u = userData.data?.Viewer
val user = AniListUser(
u?.id,
@ -823,6 +823,7 @@ class AniListApi(index: Int) : AccountManager(index), SyncAPI {
//@JsonProperty("rating") val rating: Int,
@JsonProperty("node") val node: Recommendation,
)
data class Recommendation(
@JsonProperty("mediaRecommendation") val mediaRecommendation: SeasonMedia,
)

View file

@ -92,7 +92,7 @@ class HomeChildItemAdapter(
itemView.tag = position
if (position == 0) { // to fix tv
itemView.backgroundCard?.nextFocusLeftId = R.id.nav_rail_view
itemView.background_card?.nextFocusLeftId = R.id.nav_rail_view
}
//val ani = ScaleAnimation(0.9f, 1.0f, 0.9f, 1f)
//ani.fillAfter = true

View file

@ -35,7 +35,7 @@ object SearchResultBuilder {
val textIsSub: TextView? = itemView.text_is_sub
val textQuality: TextView? = itemView.text_quality
val bg: CardView = itemView.backgroundCard
val bg: CardView = itemView.background_card
val bar: ProgressBar? = itemView.watchProgress
val playImg: ImageView? = itemView.search_item_download_play

View file

@ -198,6 +198,7 @@
android:layout_height="40dp">
<ImageView
android:scaleType="centerCrop"
android:id="@+id/home_profile_picture"
android:layout_width="match_parent"
android:layout_height="match_parent"

View file

@ -12,7 +12,7 @@
android:layout_marginBottom="2dp"
android:elevation="10dp"
app:cardCornerRadius="@dimen/rounded_image_radius"
android:id="@+id/backgroundCard"
android:id="@+id/background_card"
app:cardBackgroundColor="?attr/primaryGrayBackground">
<ImageView
@ -24,11 +24,12 @@
android:layout_height="match_parent"
android:foreground="?android:attr/selectableItemBackgroundBorderless"
android:contentDescription="@string/search_poster_img_des" />
<TextView
tools:text="@string/quality_hd"
android:id="@+id/text_quality"
style="@style/SearchBox"
android:background="@drawable/type_bg_color"/>
android:background="@drawable/type_bg_color" />
<!--
<LinearLayout
android:orientation="vertical"

View file

@ -12,7 +12,7 @@
android:layout_marginBottom="2dp"
android:elevation="10dp"
app:cardCornerRadius="@dimen/rounded_image_radius"
android:id="@+id/backgroundCard"
android:id="@+id/background_card"
app:cardBackgroundColor="?attr/primaryGrayBackground">
<ImageView

View file

@ -13,6 +13,7 @@
android:layout_height="wrap_content"
app:cardCornerRadius="@dimen/rounded_image_radius"
android:layout_margin="2dp"
android:id="@+id/background_card"
android:layout_width="wrap_content">
<LinearLayout
@ -25,7 +26,6 @@
android:layout_height="180dp"
android:elevation="10dp"
app:cardCornerRadius="@dimen/rounded_image_radius"
android:id="@+id/backgroundCard"
app:cardBackgroundColor="?attr/primaryGrayBackground">
<ImageView

View file

@ -14,7 +14,7 @@
android:layout_marginBottom="2dp"
android:elevation="10dp"
app:cardCornerRadius="@dimen/rounded_image_radius"
android:id="@+id/backgroundCard"
android:id="@+id/background_card"
app:cardBackgroundColor="?attr/primaryGrayBackground">
<ImageView

View file

@ -10,7 +10,7 @@
<androidx.cardview.widget.CardView
android:foreground="?android:attr/selectableItemBackgroundBorderless"
android:id="@+id/backgroundCard"
android:id="@+id/background_card"
android:layout_margin="2dp"
android:layout_width="match_parent"
android:layout_height="match_parent"

View file

@ -18,7 +18,7 @@
android:layout_marginBottom="2dp"
android:elevation="10dp"
app:cardCornerRadius="@dimen/rounded_image_radius"
android:id="@+id/backgroundCard"
android:id="@+id/background_card"
app:cardBackgroundColor="?attr/primaryGrayBackground">
<ImageView

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
@ -11,10 +11,6 @@
android:clickable="true"
android:id="@+id/search_result_root">
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<androidx.cardview.widget.CardView
android:layout_margin="2dp"
android:layout_width="match_parent"
@ -22,7 +18,7 @@
android:layout_marginBottom="2dp"
android:elevation="10dp"
app:cardCornerRadius="@dimen/rounded_image_radius"
android:id="@+id/backgroundCard"
android:id="@+id/background_card"
app:cardBackgroundColor="?attr/primaryGrayBackground">
<ImageView
@ -80,5 +76,4 @@
android:paddingStart="5dp"
android:paddingEnd="5dp"
android:ellipsize="end" />
</LinearLayout>
</FrameLayout>
</LinearLayout>

View file

@ -8,7 +8,7 @@
<androidx.cardview.widget.CardView
android:foreground="?android:attr/selectableItemBackgroundBorderless"
android:id="@+id/backgroundCard"
android:id="@+id/background_card"
android:layout_margin="2dp"
android:layout_width="match_parent"
android:layout_height="match_parent"