Skip to content
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

Fix metadata 403's and Add images to search results #54

Merged
merged 3 commits into from
Mar 15, 2020
Merged

Fix metadata 403's and Add images to search results #54

merged 3 commits into from
Mar 15, 2020

Conversation

Musi13
Copy link
Contributor

@Musi13 Musi13 commented Mar 9, 2020

Somewhat recently it seems AniDB started responding with 403 when a request for the anime titles didn't include a User-Agent header (#50). This PR fixes that, so searching will re-download the anime titles and work again.

Additionally, since searching already involves querying for the full metadata of an anime, we can include ImageUrls in the results for free.

Screenshots

search-image

@Musi13 Musi13 changed the title Fix search 403's and Add images to search results Fix metadata 403's and Add images to search results Mar 9, 2020
Copy link
Member

@dkanada dkanada left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This pull request is blocked until we confirm this new user agent with the provider.

{
static class Constants
{
public const string UserAgent = "jellyfin-plugin-anime";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would propose we use a more proper user-agent string, such as;
jellyfin-plugin-anime/5.0.0.0 (+https://github.com/jellyfin/jellyfin-plugin-anime/issues) Jellyfin/10.5.0

https://en.wikipedia.org/wiki/User_agent has examples of how browsers and bots behave in this regard

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's save that for another pull request. This is an improvement and I'm sure people want it working again after the update so I'll push a new version for now.

@dkanada dkanada merged commit 5272775 into jellyfin-archive:master Mar 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants