Git Product home page Git Product logo

Comments (11)

postlund avatar postlund commented on August 24, 2024

Can you try if this one works:
http://www.sample-videos.com/video/mp4/720/big_buck_bunny_720p_1mb.mp4
It is very, very picky about what it plays.

from pyatv.

postlund avatar postlund commented on August 24, 2024

Oh, also please try removing ,0 at the end. It might work and I might have broken something without realizing it.

from pyatv.

deepch avatar deepch commented on August 24, 2024

Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/pyatv/main.py", line 416, in _run_application
return (yield from cli_handler(loop))
File "/usr/local/lib/python3.6/site-packages/pyatv/main.py", line 255, in cli_handler
return (yield from _handle_autodiscover(args, loop))
File "/usr/local/lib/python3.6/site-packages/pyatv/main.py", line 299, in _handle_autodiscover
return (yield from _handle_commands(args, loop))
File "/usr/local/lib/python3.6/site-packages/pyatv/main.py", line 331, in _handle_commands
ret = yield from _handle_device_command(args, cmd, atv, loop)
File "/usr/local/lib/python3.6/site-packages/pyatv/main.py", line 367, in _handle_device_command
return (yield from _exec_command(atv.airplay, cmd, *cmd_args))
File "/usr/local/lib/python3.6/site-packages/pyatv/main.py", line 381, in _exec_command
value = yield from tmp(*args)
TypeError: play_url() missing 1 required positional argument: 'url'

from pyatv.

deepch avatar deepch commented on August 24, 2024

def play_url(self, url, position=0):

So, as it is broken url I've tried to custom url, and it was working.

But I've checked what is get from your url param. It was always 0.

Thank you very much for your help, but I think U should fix it.

from pyatv.

postlund avatar postlund commented on August 24, 2024

Humm, this is weird. The method you should look at is the one in interface,py, the one you listed is from the internal implementation which is not what atvremote is calling. Can you paste something that does work including your CLI arguments?

from pyatv.

deepch avatar deepch commented on August 24, 2024

I just checked
def play_url(self, url, position=0):
print(url)
And got 0

I thought that this is not true and indicated this manually.

bash-3.2$ atvremote -a --airplay_credentials EE109CBFE1CFE549:1E88A3CC55584CFF2DE7DB4463A2C8E34F81B0FBC843275B65329FB413CA2F11 play_url=http://171.25.232.20:8080/api/v1/stream/7APGKT890RFDK5tGByECRGDaSgjmaQ/hls/index.m3u8,0

I tried differently. But always there was a result of 0.

from pyatv.

postlund avatar postlund commented on August 24, 2024

Did you try without ,0 at the end?

from pyatv.

deepch avatar deepch commented on August 24, 2024

yes I try and error

TypeError: play_url() missing 1 required positional argument: 'url'

from pyatv.

lightbord avatar lightbord commented on August 24, 2024

If it helps at all, I have discovered that adding "0," then the url you want to play solves the problem. Possibly related to the function being defined with "self" in play_url(self, url, **kwargs). Though I'm not great with python so that may break something else. But I've had this issue with other things I've written in python too.

I thought I was doing something wrong then saw someone append a ,0 to the end in a previous issue, then thought "what if I try it with the 0, before, maybe play_url is just taking everything after the = int the command as its arguments, which would mean the URL is being passed to self instead of url". So essentially it will pass 0 to the self argument, and then whatever is after the , in the command line to the url

from pyatv.

postlund avatar postlund commented on August 24, 2024

I found the problem to be an optional argument which was a problem due to the generic argument passing I use (atvremote is more or less a wrapper on top o the public API, so I just pass arguments over to the API). Since play_url lives inside a class, the self must always be the first argument (can be called anything, but self is more or less standard). Problem will be fixed by #101 and a release out soon. I have another bug that I need to fix

from pyatv.

deepch avatar deepch commented on August 24, 2024

Thank you so much. Your code is excellent. Thanks for your work.

from pyatv.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.