Skip to content

Conversation

@ltctceplrm
Copy link
Contributor

This is separate from the series search so users can choose which to use or use both if they want to. It only works with tmdbAPI and here is how it looks
Step 1:
image

Step 2:
image

Step 3:
image

Note that if you try to add multiple series it won't work, only choose one series in the series modal and then as many seasons as you want in the season modal.

I used @ZackBoe's tmdb PR as a base.

Refactored TMDBSeasonAPI to improve API calls and data handling.

I also added metadata from the main series that is missing in the season details (actors, writers, genre,...) this might be inaccurate for some seasons however but there's no other option
You can now search for a series, select it and it'll list all the seasons for that series. With the new modal you can then select the seasons you want to add.
Copy link
Owner

@mProjectsCode mProjectsCode left a comment

Choose a reason for hiding this comment

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

It would also be nice if you could add types for the API responses, similar to the other APIs.

(await this.modalHelper.openSelectModal({ elements: apiSearchResults }, async selectModalData => {
return await this.queryDetails(selectModalData.selected);
})) ?? [];
if (types.length === 1 && types[0] === 'season') {
Copy link
Owner

Choose a reason for hiding this comment

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

I am not sure I like this check here and the one in handleSeasonSelectModal. Maybe it's better to move the season import to its own thing (own command and ui, I mean). I am open to other suggestions, though.

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 would keep the code more readable for the future but won't making it a separate command and ui make it confusing for users?

It's definitely something to think about but I'm not sure yet how I'd go about it

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If I understand it correctly I'd have to make a new function like createEntryWithSeasonSearchModal that skips type selection and defaults to tmdbseasonapi and therefore also create a new modal like MediaDBSeasonSearchModal in /src/modals? I feel like that would lead to a lot of duplicate code

Switched dynamic import to a static one
Changed tmdbSeasonAPI variables to lowercase
@ZackBoe
Copy link
Contributor

ZackBoe commented Jan 13, 2026

Heads up: since implementing TMDB's OpenAPI specs, auth in my PR was changed from API Key as a query param to API Read Access Token in a header auth field.

* Using types from open api schema
* Changed api key to api read access token
@ltctceplrm
Copy link
Contributor Author

Thanks for the heads up, I've updated it for the seasons search

The last modal now says "create entry" instead of "Ok"
When searching for seasons the modal specifies that you must select only one series to proceed to the season selection screen
@ltctceplrm
Copy link
Contributor Author

Added some clarity for the season search

image image image

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.

3 participants