fossasia / susi_linux

Hardware for SUSI AI https://susi.ai
Apache License 2.0
1.61k stars 148 forks source link

use palf directly instead of quering server #507

Closed norbusan closed 5 years ago

norbusan commented 5 years ago

Currently we are using a Flask server that does nothing else but quering youtube and returning infos about videos. Move the respective three lines of code into the busy state replacing the server query.

In former times the server in susi_installer/raspi/youtube_player/music_server.py might have had further usage (which can be seen from the complete useless loading and initialization of vlc, which is never used!), but currently it only uses pafy to query youtube and return this info. We can do that directly in the python code without an external server running.

We also fix the harcoded stream index 3 of the original server which might fail.