jcarbaugh / python-roku

Screw remotes. Control your Roku with Python.
https://pypi.python.org/pypi/roku
BSD 3-Clause "New" or "Revised" License
288 stars 94 forks source link

Enhancing Search #42

Closed keatontaylor closed 4 years ago

keatontaylor commented 4 years ago

This PR modifies the command parser to include the keyword arguments passed in by the caller. Effectively allowing search to allow for any of the parameters defined by the ECP protocol.

Ensures that search calls can be flexible for any number of params.

iantrich commented 4 years ago

Can you provide me a test case I can run locally to highlight this change? Thanks.

keatontaylor commented 4 years ago

Can you provide me a test case I can run locally to highlight this change? Thanks.

Sure! Something like this:

from roku.core import Roku

roku = Roku('10.0.10.13')

# Search for One Punch Man matching the first result, and launch using prime video
roku.search(title="One Punch Man", provider="Prime Video", launch="true", match_any="true")

# Search for Tom Hanks with type person
roku.search(title="Tom Hanks", type="person")

# Returns search for all providers for "Voyage of the Damned via tmsid"
roku.search(keyword="voyage", tmsid="MV000058030000")
keatontaylor commented 4 years ago

@jcarbaugh looks like the CI failed, but looking at the logs this seems to be a travis-ci error not my actual code changes, is there any way to retry without submitting a change against this PR?

iantrich commented 4 years ago

@keatontaylor, I restarted it twice and looks to be having issues getting some images. Not going to worry about it. Sorry, this PR slipped my mind. I'll try to test soon

keatontaylor commented 4 years ago

@iantrich no worries, let me know if you run into any issues.

jcarbaugh commented 4 years ago

@keatontaylor I just updated CI config and dependency versions... could you rebase? Thanks!

keatontaylor commented 4 years ago

Updated.