Skip to content
Open
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
707088c
Some kitsu API added, UI for kitsu added on config accounts
PiterWeb Jan 7, 2026
3276a2d
Login kitsu works
PiterWeb Jan 7, 2026
8fe60dd
Kitsu tab now works
PiterWeb Jan 8, 2026
243ec40
MALApi.kt changes reverted(not wanted rename Android Studio), Kitsu a…
PiterWeb Jan 9, 2026
4a9c6c4
Kitsu tab now works perfect, only retrieves the needed fields to oper…
PiterWeb Jan 10, 2026
fe21aeb
Kitsu left-side panel now is visible and works (read-only)
PiterWeb Jan 21, 2026
4d8f2a2
Update anime already in sync works well
PiterWeb Jan 21, 2026
af1b5a9
Now all kitsu features are working - Sync on new animes implemented
PiterWeb Jan 21, 2026
f08aed6
Merge branch 'recloudstream:master' into master
PiterWeb Jan 21, 2026
d421354
Modified MainAPI.kt to add Prerelease Annotation and remove unused co…
PiterWeb Jan 22, 2026
9c0cd2b
KitsuApi resolved bug delete anime from library, getKitsuAnimeList si…
PiterWeb Jan 22, 2026
b95bfee
Merge branch 'master' of https://github.com/PiterWeb/cloudstream
PiterWeb Jan 22, 2026
c2b8fd1
Merge branch 'recloudstream:master' into master
PiterWeb Jan 26, 2026
88209d6
Merge branch 'recloudstream:master' into master
PiterWeb Mar 6, 2026
1a49944
Kitsu https://kitsu.app fallback url added
PiterWeb Mar 6, 2026
b6950c5
Kitsu https://kitsu.app fallback url added
PiterWeb Mar 6, 2026
25724c5
Move fallback logic to an interceptor
PiterWeb Mar 6, 2026
4a586bf
Update KitsuApi.kt
fire-light42 Mar 7, 2026
9617f8c
Merge branch 'recloudstream:master' into master
PiterWeb Apr 22, 2026
dce63f9
Merge branch 'recloudstream:master' into master
PiterWeb May 10, 2026
46e4185
Fixed Updated/ReleaseDate/Rating sorting for Kitsu SyncProvider
PiterWeb May 10, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,8 @@ import okhttp3.Request
import okhttp3.RequestBody.Companion.toRequestBody
import okhttp3.Response
import java.text.SimpleDateFormat
import java.time.Instant
import java.time.LocalDate
import java.time.format.DateTimeFormatter
import java.time.ZoneId
import java.util.Date
import java.util.Locale

Expand Down Expand Up @@ -202,7 +201,7 @@ class KitsuApi: SyncAPI() {
id = id,
totalEpisodes = anime.episodeCount,
title = anime.canonicalTitle ?: anime.titles?.enJp ?: anime.titles?.jaJp.orEmpty(),
publicScore = Score.from(anime.ratingTwenty.toString(), 20),
publicScore = Score.from(anime.ratingTwenty, 20),
duration = anime.episodeLength,
synopsis = anime.synopsis,
airStatus = when(anime.status) {
Expand Down Expand Up @@ -250,7 +249,7 @@ class KitsuApi: SyncAPI() {
}

return SyncStatus(
score = Score.from(anime.ratingTwenty.toString(), 20),
score = Score.from(anime.ratingTwenty, 20),
status = SyncWatchType.fromInternalId(kitsuStatusAsString.indexOf(anime.status)),
isFavorite = null,
watchedEpisodes = anime.progress,
Expand Down Expand Up @@ -454,8 +453,8 @@ class KitsuApi: SyncAPI() {

private suspend fun getKitsuAnimeList(token: AuthToken, userId: Int): Array<KitsuNode> {

val animeSelectedFields = arrayOf("titles","canonicalTitle","posterImage","synopsis","startDate","episodeCount")
val libraryEntriesSelectedFields = arrayOf("progress","rating","updatedAt", "status")
val animeSelectedFields = arrayOf("titles","canonicalTitle","posterImage","synopsis","startDate","endDate","episodeCount")
val libraryEntriesSelectedFields = arrayOf("progress","ratingTwenty","updatedAt", "status")
val limit = 500
var url = "$apiUrl/library-entries?filter[userId]=$userId&filter[kind]=anime&include=anime&page[limit]=$limit&page[offset]=0&fields[anime]=${animeSelectedFields.joinToString(",")}&fields[libraryEntries]=${libraryEntriesSelectedFields.joinToString(",")}"

Expand Down Expand Up @@ -526,7 +525,7 @@ class KitsuApi: SyncAPI() {
this.id,
this.attributes.progress,
numEpisodes,
Score.from(this.attributes.ratingTwenty.toString(), 20),
Score.from(this.attributes.ratingTwenty, 20),
parseDateLong(this.attributes.updatedAt),
"Kitsu",
TvType.Anime,
Expand All @@ -535,12 +534,9 @@ class KitsuApi: SyncAPI() {
null,
plot = synopsis,
releaseDate = if (startDate == null) null else try {
Date.from(
Instant.from(
DateTimeFormatter.ofPattern(if (startDate.length == 4) "yyyy" else if (startDate.length == 7) "yyyy-MM" else "yyyy-MM-dd")
.parse(startDate)
)
)
Date.from(LocalDate.parse(startDate).atStartOfDay()
.atZone(ZoneId.systemDefault())
.toInstant())
} catch (_: RuntimeException) {
null
}
Expand Down Expand Up @@ -583,7 +579,7 @@ class KitsuApi: SyncAPI() {
@JsonProperty("avatar") val avatar: KitsuUserAvatar?,
/* User list anime attributes */
@JsonProperty("progress") val progress: Int?,
@JsonProperty("ratingTwenty") val ratingTwenty: Float?,
@JsonProperty("ratingTwenty") val ratingTwenty: Int?,
@JsonProperty("updatedAt") val updatedAt: String?,
@JsonProperty("status") val status: String?,
)
Expand Down Expand Up @@ -632,7 +628,7 @@ class KitsuApi: SyncAPI() {
const val KITSU_CACHED_LIST: String = "kitsu_cached_list"
private fun parseDateLong(string: String?): Long? {
return try {
SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssZ", Locale.getDefault()).parse(
SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'", Locale.getDefault()).parse(
string ?: return null
)?.time?.div(1000)
} catch (e: Exception) {
Expand Down