Skip to content
This repository has been archived by the owner on Jul 26, 2021. It is now read-only.

Use **kwargs to capture (and ignore) anything Plex clients can add to… #38

Merged
merged 1 commit into from
Oct 10, 2017

Conversation

sander1
Copy link
Contributor

@sander1 sander1 commented Oct 6, 2017

… a request

@phrawzty
Copy link
Owner

phrawzty commented Oct 9, 2017

Hello,

Thanks for the PR. While I understand this small change from a code perspective, I'm not sure what the intent is here; could you explain the impetus for this modification a little more, please?

@sander1
Copy link
Contributor Author

sander1 commented Oct 9, 2017

Hi,

The CreateChannelObject function broke because some client (iOS I think in this case) added some extra parameter (includeBandwidths) to the request. I've seen other Plex clients also add extra stuff to the request (includeExtras or something similar). Since clients change all the time and we cannot predict what they will accidentally(?) add to the request, we'd have to keep adding the new parameters to the CreateChannelObject function. Instead we can use **kwargs to capture all those extra parameters (and ignore them in this case) so our function won't break.

@phrawzty
Copy link
Owner

Oh, yes, that makes sense. It broke recently with casting because of some screwy own that was being passed. Good idea! The next step after this would be removing any unnecessary items that may have accumulated organically in this plugin. :)
Thanks!

@phrawzty phrawzty merged commit 1727e0f into phrawzty:master Oct 10, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants