-
Notifications
You must be signed in to change notification settings - Fork 558
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Various improvements to Bangumi search #1396
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AntsyLich
reviewed
Oct 28, 2024
app/src/main/java/eu/kanade/tachiyomi/data/track/bangumi/dto/BGMSearch.kt
Outdated
Show resolved
Hide resolved
b4f51d8
to
ec8d14d
Compare
Rebased as well because why not |
Where changelog |
AntsyLich
reviewed
Oct 29, 2024
app/src/main/java/eu/kanade/tachiyomi/data/track/bangumi/dto/BGMSearch.kt
Outdated
Show resolved
Hide resolved
AntsyLich
approved these changes
Oct 30, 2024
In short: - fetch & show actual summary - fallback to "name" if "name_cn" is empty - request larger responseGroup to get & display the summary & rating - add type filter query param to make Bangumi filter, not us Previously, we only displayed the "name" in the summary area and used "name_cn" as the entry name. However, "name_cn" (Chinese name) can be an empty string at times, resulting in an awkward looking search result list where some, many, or even all the results have no title displayed and only show the "name" (Japanese name) in the summary area. This has been solved by using "name" as a fallback value should "name_cn" be empty. By using the "responseGroup=large" query parameter, we can request the required data we need to display the actual summary for an entry and the entry's average rating. The "name" is prepended to the summary contents, if any exist, so it is still accessible for series identification if a "name_cn" exists too and was used for the result title. Adding the "type=1" filter query parameter means Bangumi will only return entries of type 1 ("book") instead of all types and Mihon needing to filter, resulting in potentially missed entry matches.
If a Chinese name is available, the original name is prepended to the summary with the addition "作品原名:" (meaning "original series title").
871b3ac
to
97c36b2
Compare
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In short:
Previously, we only displayed the "name" in the summary area and used "name_cn" as the entry name. However, "name_cn" (Chinese name) can be an empty string at times, resulting in an awkward looking search result list where some, many, or even all the results have no title displayed and only show the "name" (Japanese name) in the summary area. This has been solved by using "name" as a fallback value should "name_cn" be empty.
By using the "responseGroup=large" query parameter, we can request the required data we need to display the actual summary for an entry and the entry's average rating.
The "name" is prepended to the summary contents, if any exist, so it is still accessible for series identification if a "name_cn" exists too and was used for the result title.
Adding the "type=1" filter query parameter means Bangumi will only return entries of type 1 ("book") instead of all types and Mihon needing to filter, resulting in potentially missed entry matches.
Sadly, Bangumi does not return any data on start or end dates in the search, no matter what responseGroup is used. Their data on this is sometimes contradictory at best anyway and often mixes Japanese and Chinese release dates.