hechtus / mopidy-radio-de Goto Github PK
View Code? Open in Web Editor NEWradio.de Extension for Mopidy
License: Apache License 2.0
radio.de Extension for Mopidy
License: Apache License 2.0
Hey,
i take the configuration like given on GitHub, but this happens:
INFO Starting Mopidy backends: RadioDeBackend, StreamBackend, M3UBackend, FileBackend, SpotifyBackend, SpotifyTunigoBackend
ERROR Got un-handled exception from RadioDeBackend
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/mopidy/commands.py", line 237, in actorerror_handling
yield
File "/usr/lib/python2.7/dist-packages/mopidy/commands.py", line 385, in start_backends
config=config, audio=audio).proxy()
File "/usr/lib/python2.7/dist-packages/pykka/actor.py", line 94, in start
obj = cls(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/mopidy_radio_de/actor.py", line 48, in init
proxy=proxy)
File "/usr/local/lib/python2.7/dist-packages/mopidy_radio_de/api.py", line 57, in init
if len(proxy):
TypeError: object of type 'NoneType' has no len()
My Configuration:
[radio-de]
enabled = true
language = german
favorites = Tagesschau, NDR 2, NDR Kultur
How you configured your extension Radio-De???
The pip package should be updated to include pull request #8
Some stations, e.g. "ANTENNE BAYERN" can not be configured as favorites. The plugin says "Favorite radio station 'ANTENNE BAYERN' not found".
This bug is due to the fact that the playlist refresh()
function is too optimistic in searching a station. The number of search results must be increased from 5 to lets say 20.
It seems that it is not possible to connect to the different url's without credentials anymore.
My configuration looks like:
[radio-de]
language = german
favorites = Tagesschau
Log output:
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/pykka/actor.py", line 192, in _actor_loop
self.on_start()
File "/usr/local/lib/python2.7/dist-packages/mopidy_radio_de/actor.py", line 53, in on_start
self.playlists.refresh()
File "/usr/local/lib/python2.7/dist-packages/mopidy_radio_de/playlists.py", line 40, in refresh
stations = self.backend.api.search_stations_by_string(favorite, 20)
File "/usr/local/lib/python2.7/dist-packages/mopidy_radio_de/api.py", line 119, in search_stations_by_string
return self.__api_call(path, param)
File "/usr/local/lib/python2.7/dist-packages/mopidy_radio_de/api.py", line 174, in __api_call
response = self.__urlopen(url)
File "/usr/local/lib/python2.7/dist-packages/mopidy_radio_de/api.py", line 186, in __urlopen
raise RadioDeApiError('HTTPError: %s' % error)
RadioDeApiError: HTTPError: HTTP Error 401: Unauthorized
mopidy-radio-de or mopidy-rad-io since I guess this also works for rad.io? Anyway I just suspect mopidy-radio will imply a larger scope than you intended and easily be confused. Of course in the end it's up to you :-)
I added the plugin and mopidy runs it. But how to play radio or search for it with mpc or another software!?
Thx
I just tried out the extension (I installed in using pip install ...) with mopidy 0.18.3. After specifying the configuration values (language, favorites), mopidy crashed on startup. Below you can see the error message. As I did not specify a proxy in my mopidy configuration, I just commented out lines 57-60 in api.py. After doing so, both mopidy and the extension worked again.
ERROR object of type 'NoneType' has no len()
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/mopidy/__main__.py", line 128, in main
return args.command.run(args, proxied_config)
File "/usr/local/lib/python2.7/dist-packages/mopidy/commands.py", line 268, in run
backends = self.start_backends(config, backend_classes, audio)
File "/usr/local/lib/python2.7/dist-packages/mopidy/commands.py", line 294, in start_backends
backend = backend_class.start(config=config, audio=audio).proxy()
File "/usr/lib/python2.7/dist-packages/pykka/actor.py", line 93, in start
obj = cls(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/mopidy_radio_de/actor.py", line 48, in __init__
proxy=proxy)
File "/usr/local/lib/python2.7/dist-packages/mopidy_radio_de/api.py", line 57, in __init__
if len(proxy):
TypeError: object of type 'NoneType' has no len()
Traceback (most recent call last):
File "/usr/local/bin/mopidy", line 9, in <module>
load_entry_point('Mopidy==0.18.3', 'console_scripts', 'mopidy')()
File "/usr/local/lib/python2.7/dist-packages/mopidy/__main__.py", line 128, in main
return args.command.run(args, proxied_config)
File "/usr/local/lib/python2.7/dist-packages/mopidy/commands.py", line 268, in run
backends = self.start_backends(config, backend_classes, audio)
File "/usr/local/lib/python2.7/dist-packages/mopidy/commands.py", line 294, in start_backends
backend = backend_class.start(config=config, audio=audio).proxy()
File "/usr/lib/python2.7/dist-packages/pykka/actor.py", line 93, in start
obj = cls(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/mopidy_radio_de/actor.py", line 48, in __init__
proxy=proxy)
File "/usr/local/lib/python2.7/dist-packages/mopidy_radio_de/api.py", line 57, in __init__
if len(proxy):
TypeError: object of type 'NoneType' has no len()
It's hard to find if you don't know where pip puts the packages....
Thanks!
Question: Can I use this module as standalone python module to extract stream urls from radio de playlist?
Background: I used mopidy as server on a raspberry pi server but I am unhappy with performance. Now I replaced mopidy with a standalone MPD server and I am happy with resource consumption. Also playing local audio files is fine. For radio MPD only needs the audio stream url. My goal is to write a script that extract url of a radio channel playlist and feed mpd (optional by creating a radio playlist) by remote. I don't want to crawl the web for radio stations myself.
To many people will blindly copy such commands, so we shouldn't be encouraging installing pip packages globally. See https://github.com/mopidy/cookiecutter-mopidy-ext/tree/master/%7B%7Bcookiecutter.repo_name%7D%7D for the currently suggested README format.
Hi,
I just installed you extension. I also had to install python-dateutil or it would crash
Hello i have installed sucessfully mopidy-radio-de but when i start mopidy there ist an error
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/mopidy/commands.py", line 272, in run
backends = self.start_backends(config, backend_classes, audio)
File "/usr/lib/python2.7/dist-packages/mopidy/commands.py", line 343, in start_backends
config=config, audio=audio).proxy()
File "/usr/lib/python2.7/dist-packages/pykka/actor.py", line 93, in start
obj = cls(_args, *_kwargs)
File "/usr/local/lib/python2.7/dist-packages/mopidy_radio_de/actor.py", line 48, in init
proxy=proxy)
File "/usr/local/lib/python2.7/dist-packages/mopidy_radio_de/api.py", line 57, in init
if len(proxy):
TypeError: object of type 'NoneType' has no len()
It seems to be a problem about proxy configuration maybe?
Anybody has an idea what could i do? Thx for help
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.