Compare commits

...

9 Commits

Author SHA1 Message Date
IndusAryan b7fafd710c
Merge 4332ad391b into e697bf7554 2024-05-22 20:45:17 +05:30
KingLucius e697bf7554
Next Airing episode support in Trakt meta provider (#1072) 2024-05-21 22:06:28 +02:00
IndusAryan 4332ad391b remove redundant import 2024-05-15 18:27:58 +05:30
IndusAryan 4ba60ad835 Merge remote-tracking branch 'origin/master' into agp
# Conflicts:
#	build.gradle.kts
2024-05-15 18:26:22 +05:30
IndusAryan a2ce7300c8 add parameter 2024-05-15 18:24:22 +05:30
IndusAryan 4d9fbc5f9a merge with upstream2 2024-03-17 18:42:10 +05:30
IndusAryan ef6d270ac2 Merge remote-tracking branch 'origin/master' into agp 2024-03-17 18:40:08 +05:30
IndusAryan 04632af576 let's test this boi 2024-03-08 00:32:41 +05:30
IndusAryan 43e34993c4 update gradle and libs 2024-03-02 00:52:27 +05:30
4 changed files with 13 additions and 3 deletions

View File

@ -69,7 +69,7 @@ android {
resValue("bool", "is_prerelease", "false")
// Reads local.properties
val localProperties = gradleLocalProperties(rootDir)
val localProperties = gradleLocalProperties(rootDir, providers)
buildConfigField(
"long",

View File

@ -4,6 +4,7 @@ import android.net.Uri
import com.lagradost.cloudstream3.*
import com.fasterxml.jackson.annotation.JsonAlias
import com.fasterxml.jackson.annotation.JsonProperty
import com.lagradost.cloudstream3.APIHolder.unixTimeMS
import com.lagradost.cloudstream3.LoadResponse.Companion.addImdbId
import com.lagradost.cloudstream3.LoadResponse.Companion.addTMDbId
import com.lagradost.cloudstream3.LoadResponse.Companion.addTrailer
@ -166,6 +167,7 @@ open class TraktProvider : MainAPI() {
val episodes = mutableListOf<Episode>()
val seasons = parseJson<List<Seasons>>(resSeasons)
val seasonsNames = mutableListOf<SeasonData>()
var nextAir: NextAiring? = null
seasons.forEach { season ->
@ -215,6 +217,13 @@ open class TraktProvider : MainAPI() {
description = episode.overview,
).apply {
this.addDate(episode.firstAired)
if (nextAir == null && this.date != null && this.date!! > unixTimeMS) {
nextAir = NextAiring(
episode = this.episode!!,
unixTime = this.date!!.div(1000L),
season = if (this.season == 1) null else this.season,
)
}
}
)
}
@ -240,6 +249,7 @@ open class TraktProvider : MainAPI() {
this.actors = actors
this.comingSoon = isUpcoming(mediaDetails.released)
//posterHeaders
this.nextAiring = nextAir
this.seasonNames = seasonsNames
this.backgroundPosterUrl = getOriginalWidthImageUrl(backDropUrl)
this.contentRating = mediaDetails.certification

View File

@ -5,7 +5,7 @@ buildscript {
}
dependencies {
classpath("com.android.tools.build:gradle:8.2.2")
classpath("com.android.tools.build:gradle:8.4.0")
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.22")
classpath("org.jetbrains.dokka:dokka-gradle-plugin:1.9.10")
// Universal build config

View File

@ -1,6 +1,6 @@
#Fri Apr 30 17:11:15 CEST 2021
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME