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

feat: add tvdb indexer #899

Open
wants to merge 20 commits into
base: develop
Choose a base branch
from

Conversation

TOomaAh
Copy link
Contributor

@TOomaAh TOomaAh commented Jul 26, 2024

Description

Screenshot (if UI-related)

To-Dos

  • Successful build pnpm build
  • Translation keys pnpm i18n:extract
  • Database migration (if required)

Issues Fixed or Closed

  • Fixes #XXXX

@Fallenbagel Fallenbagel changed the title Feat add tvdb indexer feat: add tvdb indexer Jul 27, 2024
@github-actions github-actions bot added the merge conflict Cannot merge due to merge conflicts label Aug 7, 2024
Copy link

github-actions bot commented Aug 7, 2024

This pull request has merge conflicts. Please resolve the conflicts so the PR can be successfully reviewed and merged.

@DjordyKoert
Copy link

DjordyKoert commented Oct 19, 2024

Any update on this feature? 👀

I think this would help with the issue described here #648

@TOomaAh
Copy link
Contributor Author

TOomaAh commented Oct 19, 2024

Any update on this feature? 👀

I think this would help with the issue described here #648

Sorry, I've got a lot of work at the moment but I've continued to work on it, I'm trying to use directly the api that sonarr uses, skyhook.

# Conflicts:
#	server/routes/tv.ts
#	src/components/TvDetails/index.tsx
@github-actions github-actions bot removed the merge conflict Cannot merge due to merge conflicts label Oct 19, 2024
@gauthier-th
Copy link
Collaborator

Looks like half of the tests are failing. Could you take a look and try to fix them? And add some for TVDB?

@TOomaAh
Copy link
Contributor Author

TOomaAh commented Oct 27, 2024

Looks like half of the tests are failing. Could you take a look and try to fix them? And add some for TVDB?

Hello, indeed, I solved the problem of the existing tests and I added tests for tvdb.

@gauthier-th gauthier-th marked this pull request as ready for review October 28, 2024 21:30
Copy link
Collaborator

@gauthier-th gauthier-th left a comment

Choose a reason for hiding this comment

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

I didn't go into detail, but the overall looks good.
I'll make a more in-depth review later.

Comment on lines 312 to 317
data.episodes = data.episodes.map((episode) => {
if (episode.still_path != null && episode.still_path !== '') {
episode.still_path = `https://image.tmdb.org/t/p/original/${episode.still_path}`;
}
return episode;
});
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why did you made this change?
For src/components/TvDetails/Season/index.tsx?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's right, since episodes can differ between tvdb and tmdb, images from tvdb are used in some cases and those from tmdb in others. I had to move the url creation to the indexer classes.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Makes sense.
You could write your if condition like this (and you shouldn't use loose equality != or ==).

Suggested change
data.episodes = data.episodes.map((episode) => {
if (episode.still_path != null && episode.still_path !== '') {
episode.still_path = `https://image.tmdb.org/t/p/original/${episode.still_path}`;
}
return episode;
});
data.episodes = data.episodes.map((episode) => {
if (episode.still_path) {
episode.still_path = `https://image.tmdb.org/t/p/original/${episode.still_path}`;
}
return episode;
});

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

server/lib/settings/index.ts Outdated Show resolved Hide resolved
server/routes/settings/tvdb.ts Outdated Show resolved Hide resolved
Copy link

github-actions bot commented Nov 3, 2024

This pull request has merge conflicts. Please resolve the conflicts so the PR can be successfully reviewed and merged.

@github-actions github-actions bot added the merge conflict Cannot merge due to merge conflicts label Nov 3, 2024
@github-actions github-actions bot removed the merge conflict Cannot merge due to merge conflicts label Nov 3, 2024
@gauthier-th
Copy link
Collaborator

This can be tested with the preview-tvdb-indexer tag.

@gauthier-th gauthier-th added the preview PRs deployed for testing with tag `:preview-prxx` label Nov 17, 2024
@gauthier-th
Copy link
Collaborator

@TOomaAh next time you should rebase instead of merge. Merging makes the history look messy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
preview PRs deployed for testing with tag `:preview-prxx`
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants