Skip to content

Fix discrepancies with new Open Subtitles API Results, #4749 #4755

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

Merged
merged 1 commit into from
Jan 7, 2024

Conversation

low-batt
Copy link
Contributor

@low-batt low-batt commented Jan 7, 2024

This commit will:

  • Add a guessit method to OpenSubClient class
  • Add a GuessitResponse struct to hold the results of a call to the Open Subtitles guessit API
  • Change the subtitles method to accept a GuessitResponse and pass information such as season and episode number as query parameters
  • Add a guessit method to OpenSub class
  • Change the searchForSubtitles method to accept a GuessitResponse and pass it on when calling OpenSubClient.subtitles
  • Change the OpenSub.Fetcher.fetch method to call guessit and pass the results to searchForSubtitles

With these changes it is more likely that the results of searching for a particular episode of a TV series will be narrowed to subtitles for that episode.


Description:

This commit will:
- Add a guessit method to OpenSubClient class
- Add a GuessitResponse struct to hold the results of a call to the
  Open Subtitles guessit API
- Change the subtitles method to accept a GuessitResponse and pass
  information such as season and episode number as query parameters
- Add a guessit method to OpenSub class
- Change the searchForSubtitles method  to accept a GuessitResponse
  and pass it on when calling OpenSubClient.subtitles
- Change the OpenSub.Fetcher.fetch method to call guessit and pass the
  results to searchForSubtitles

With these changes it is more likely that the results of searching for
a particular episode of a TV series will be narrowed to subtitles for
that episode.
@low-batt low-batt linked an issue Jan 7, 2024 that may be closed by this pull request
@low-batt low-batt requested a review from uiryuu January 7, 2024 01:48
Copy link
Member

@uiryuu uiryuu left a comment

Choose a reason for hiding this comment

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

LGTM

@low-batt low-batt merged commit 19beb74 into develop Jan 7, 2024
@low-batt low-batt deleted the osub-guessit branch January 7, 2024 21:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Discrepancies with new Open Subtitles API Results When Using IINA
2 participants