Comments (11)
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.
Oh, also please try removing ,0 at the end. It might work and I might have broken something without realizing it.
from pyatv.
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.
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.
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.
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.
Did you try without ,0 at the end?
from pyatv.
yes I try and error
TypeError: play_url() missing 1 required positional argument: 'url'
from pyatv.
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.
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.
Thank you so much. Your code is excellent. Thanks for your work.
from pyatv.
Related Issues (20)
- incompatible with protobuf 5.26.1 HOT 6
- app_id: com.canalplusdistrib.mycanal.prod app_name: myCANAL app entity_picture HOT 1
- atvscript push_updates - output_devices is not supported HOT 3
- Add atv-desktop-remote to list of projects that use pyatv HOT 2
- Replicate connection in iOS native App HOT 6
- Downgrade minimum Cryptography requirement to 3.4.8 HOT 2
- Verify compatibility with tvOS 18 HOT 9
- Switch to use uv instead of regular pip
- Replace pylint, isort and black with ruff
- Container in docker won't start HOT 1
- "atvremote -s <IP> previous" won't go back to the previous page within an app
- error in fetch metadata in "playing" command HOT 5
- Stream Live Audio Output to HomePod HOT 2
- Installing pyatv on a raspberry pi to work with node-red-contrib-apple-tv-x 1.0.3 HOT 2
- Install Problem HOT 6
- NSOSStatusErrorDomain with only some mp4 files HOT 1
- AttributeError: module 'lib' has no attribute 'EVP_CIPHER_CTX_ctrl'。macbook pro m1芯片笔记本,使用pyenv安装的python无法使用, HOT 11
- Expose new tvOS 18 Companion Remote features to API (e.g. now playing images, insight, upnext) HOT 5
- White light but no audio when streaming to HomePod Mini HOT 4
- atvproxy - streaming airplay content
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pyatv.