fix(jellyfin): Show all the studios and mark movies as completed (#2082)

This commit is contained in:
Rohit Mane
2023-08-26 02:05:21 +05:30
committed by GitHub
parent c7408b551f
commit 7c858f5d7a
3 changed files with 15 additions and 2 deletions

View File

@ -6,7 +6,7 @@ ext {
extName = 'Jellyfin'
pkgNameSuffix = 'all.jellyfin'
extClass = '.Jellyfin'
extVersionCode = 7
extVersionCode = 8
libVersion = '13'
}

View File

@ -17,6 +17,7 @@ data class ItemsResponse(
val IndexNumber: Float? = null,
val Genres: List<String>? = null,
val Status: String? = null,
val Studios: List<Studio>? = null,
val SeriesStudio: String? = null,
val Overview: String? = null,
val SeriesName: String? = null,
@ -26,6 +27,11 @@ data class ItemsResponse(
data class ImageObject(
val Primary: String? = null,
)
@Serializable
data class Studio(
val Name: String? = null,
)
}
}

View File

@ -258,7 +258,10 @@ class Jellyfin : ConfigurableAnimeSource, AnimeHttpSource() {
val anime = SAnime.create()
if (info.Genres != null) anime.genre = info.Genres.joinToString(", ")
if (info.SeriesStudio != null) anime.author = info.SeriesStudio
if (info.Studios != null && info.Studios.isNotEmpty()) {
anime.author = info.Studios.mapNotNull { it.Name }.joinToString(", ")
} else if (info.SeriesStudio != null) anime.author = info.SeriesStudio
anime.description = if (info.Overview != null) {
Jsoup.parse(
@ -271,6 +274,10 @@ class Jellyfin : ConfigurableAnimeSource, AnimeHttpSource() {
""
}
if (info.Type == "Movie") {
anime.status = SAnime.COMPLETED
}
anime.title = if (info.SeriesName == null) {
info.Name
} else {