Fix Bangumi search including novels (#1885)

This commit is contained in:
MajorTanya
2025-03-20 17:02:55 +01:00
committed by GitHub
parent 6294521460
commit 953c4e7bc0
3 changed files with 4 additions and 0 deletions

View File

@@ -11,6 +11,8 @@ The format is a modified version of [Keep a Changelog](https://keepachangelog.co
- `Other` - for technical stuff.
## [Unreleased]
### Fixes
- Fix Bangumi search results including novels ([@MajorTanya](https://github.com/MajorTanya)) ([#1885](https://github.com/mihonapp/mihon/pull/1885))
## [v0.18.0] - 2025-03-20
### Added

View File

@@ -104,6 +104,7 @@ class BangumiApi(
.awaitSuccess()
.parseAs<BGMSearchResult>()
.data
.filter { it.platform == null || it.platform == "漫画" }
.map { it.toTrackSearch(trackId) }
}
}

View File

@@ -25,6 +25,7 @@ data class BGMSubject(
val volumes: Long = 0,
val eps: Long = 0,
val rating: BGMSubjectRating?,
val platform: String?,
) {
fun toTrackSearch(trackId: Long): TrackSearch = TrackSearch.create(trackId).apply {
remote_id = this@BGMSubject.id