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

Custom Show Programming Picker - next steps #172

Merged
merged 1 commit into from
Mar 13, 2024

Conversation

chrisbenincasa
Copy link
Owner

Fairly big overhaul of the way the programming picker to start to generalize over different types of media sources. This lays the groundwork for future features, like adding different media server types (or supporting local files without a media server at all)

This includes the beginning implementation of choosing the dizqueTV concept of 'Custom Shows' in the program picker, just like you could do in dizque. There is sitll some work to be done on actually adding the result of the selected programming to the current channel, since that is still Plex specific. That will happen in a follow-up PR.

@chrisbenincasa chrisbenincasa force-pushed the custom-show-programming-list branch from b135d2e to ae1e1e0 Compare March 13, 2024 19:47
Copy link
Collaborator

@markdavella markdavella left a comment

Choose a reason for hiding this comment

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

LGTM, just 1 Q non-blocker

@@ -89,11 +91,7 @@ export default function ProgrammingSelector({ onAddSelectedMedia }: Props) {
});

useEffect(() => {
if (
mediaSource === 'custom-shows' &&
customShows &&
Copy link
Collaborator

Choose a reason for hiding this comment

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

Q. if useCustomShows fails won't customShows be undefined? or because you pass in the initial data it will always exist?

Copy link
Owner Author

Choose a reason for hiding this comment

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

yea it will always exist bc of the initialData value being the empty array. if we wanted to handle errors we'd have to check the error field. The query options return a special subtype called DefinedInitialDataOptions which guarantees that the data field doesn't have the | undefined type part

DefinedInitialDataOptions<

@chrisbenincasa chrisbenincasa merged commit 2fe9c8c into main Mar 13, 2024
2 checks passed
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.

2 participants