Comments (10)
Or something like this?
!findradio <station name>
Output:
<Station_Name> - <Station_ID>
!radio <Station_ID>
from botamusique.
As @andreztz seems not to solve the requirements problem with pyradios, I had a short look into the project´s code. It should be no problem to include radios.py from it into Botamusique. A small function like
from radios import RadioBrowser
rb = RadioBrowser()
def getstations_byname(query):
results = rb.stations_byname(query)
stations = []
for st in results:
try:
url = rb.playable_station(st['id'])['url']
station = {'stationname': st['name'], 'url': url}
stations.append(station)
except:
pass
return stations
if __name__ == "__main__":
r = getstations_byname('r.sh')
pass
would then return an array of stations and playable urls.
My python skills are quite poor, so this could shurely be done in a better way. Just an example.
from botamusique.
Thank for the report.
I don't have time right now, but I will take a look asap.
Az
from botamusique.
I just found a Python library for radio-browser which could make things easier: https://pypi.org/project/pyradios/
from botamusique.
How to you want to select a radio ? with the name ? the id ?
from botamusique.
If I had a free wish:
Input:
!listradio <station name>
Output:
1) <Match 1>
2) <Match 2>
...
Input:
!radio 1
Or something similar...
from botamusique.
I need to test something similar, botamusique don't have interaction process.
from botamusique.
I'm currently waiting for andreztz/pyradios#1 to work on it.
from botamusique.
Finally found some time to add it. Hope, it´s okay, see pr #52
from botamusique.
Thanks a lot.
I'm reading the commit,
Let's close the ticket and continue on the PR.
from botamusique.
Related Issues (20)
- Temporary internet connectivity loss causes botamusique to crash HOT 2
- Web Interface: POST request always return 400 HOT 7
- After 22.04LTS upgrade ModuleNotFoundError: No module named 'pymumble_py3' HOT 5
- Flac files not found through !file command but work fine via web interface.
- Songs with japanese file names do not show up in web interface. HOT 4
- Documentation: reverse proxy on subpath HOT 1
- Docker Hub Image Rebuild
- Add option for download by URL to download music to music directory, not temporary directory. HOT 4
- Bot does not start: AttributeError: 'Authenticate' object has no attribute 'client_type' HOT 9
- A question about default radio channels HOT 2
- Sound comes out as garbage HOT 1
- youtube issues with master git HOT 1
- Azuracast radio urls support
- botamusique/media/file.py", line 88, in _get_info_from_tag assert match is not None HOT 4
- Integration with a Large Language Model like LLama HOT 2
- Shortlist empty when querying the next page of a YouTube search HOT 1
- Invalid command suggested with !ytsearch HOT 1
- 403 on youtube downloads with the latest docker
- Bot should parsing HTML entity in reading text chat message as bot command
- I have encountered some problems HOT 5
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 botamusique.