mirror of
https://github.com/mihonapp/mihon.git
synced 2025-10-17 08:39:43 +02:00
Fix Bangumi search including novels (#1885)
This commit is contained in:
@@ -11,6 +11,8 @@ The format is a modified version of [Keep a Changelog](https://keepachangelog.co
|
|||||||
- `Other` - for technical stuff.
|
- `Other` - for technical stuff.
|
||||||
|
|
||||||
## [Unreleased]
|
## [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
|
## [v0.18.0] - 2025-03-20
|
||||||
### Added
|
### Added
|
||||||
|
@@ -104,6 +104,7 @@ class BangumiApi(
|
|||||||
.awaitSuccess()
|
.awaitSuccess()
|
||||||
.parseAs<BGMSearchResult>()
|
.parseAs<BGMSearchResult>()
|
||||||
.data
|
.data
|
||||||
|
.filter { it.platform == null || it.platform == "漫画" }
|
||||||
.map { it.toTrackSearch(trackId) }
|
.map { it.toTrackSearch(trackId) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -25,6 +25,7 @@ data class BGMSubject(
|
|||||||
val volumes: Long = 0,
|
val volumes: Long = 0,
|
||||||
val eps: Long = 0,
|
val eps: Long = 0,
|
||||||
val rating: BGMSubjectRating?,
|
val rating: BGMSubjectRating?,
|
||||||
|
val platform: String?,
|
||||||
) {
|
) {
|
||||||
fun toTrackSearch(trackId: Long): TrackSearch = TrackSearch.create(trackId).apply {
|
fun toTrackSearch(trackId: Long): TrackSearch = TrackSearch.create(trackId).apply {
|
||||||
remote_id = this@BGMSubject.id
|
remote_id = this@BGMSubject.id
|
||||||
|
Reference in New Issue
Block a user