turlando / airhead Goto Github PK
View Code? Open in Web Editor NEWA REST application to run a radio where the listeners build the library and pick the tracks.
A REST application to run a radio where the listeners build the library and pick the tracks.
Api endpoint to serve static informations like page title or stream url
Download tracks from a generic URL using youtube-dl
How to reproduce
Debug = True
in airhead.ini
.Backtrace
* Running on http://0.0.0.0:8080/ (Press CTRL+C to quit)
* Restarting with stat
Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/lib64/python3.6/threading.py", line 916, in _bootstrap_inner
self.run()
File "/home/turlando/Projects/airhead/airhead/transmitter.py", line 37, in run
with shouty.connect(**self.params) as connection:
File "/usr/lib64/python3.6/contextlib.py", line 82, in __enter__
return next(self.gen)
File "/home/turlando/Projects/airhead/env/lib/python3.6/site-packages/shouty/utils.py", line 8, in connect
cn.open()
File "/home/turlando/Projects/airhead/env/lib/python3.6/site-packages/shouty/connection.py", line 30, in decorated
err_name, err_str))
Exception: Failed open
Error code: NOLOGIN
Error description: Login failed
* Debugger is active!
* Debugger PIN: 253-663-331
Saluti dalla giungla
Create the airhead/uploads
and airhead/tracks
folders if missing, or notify the user asking to set a valid path in the configuration
Actually this project is not Free Software
(https://choosealicense.com/no-license/)
Now the index.html
has to be explicitly written in the URL
Now if N user press skip
at the same time N tracks are skipped, not just the current one.
aiohttp provides native support for testing with pytest but it also provides framework-agnostic APIs.
Discussion is open about how to test the current code.
Provide some sort of API to rewind the current playing track at its beginning and to skip the current track and stream the next one.
Play random tracks when the play-list is empty.
Send updates about tracks and queue via websockets
Traceback (most recent call last):
File "/usr/lib/python3.5/threading.py", line 914, in _bootstrap_inner
self.run()
File "/home/edne/spazi/airhead/airhead/transcoder.py", line 86, in run
save_tags(in_path, out_path, uuid)
File "/home/edne/spazi/airhead/airhead/transcoder.py", line 44, in save_tags
tags['import_date'] = datetime.now().strftime("%Y-%m-%d %H:%M:%S")
UnboundLocalError: local variable 'tags' referenced before assignment
when uploading a .flac
file
Discuss here about internals refactoring. Split the issue when the discussion grows and things become more clear.
The software does not crash. It just raise an exception and run.
% python3 api.py
DEBUG:asyncio:Using selector: EpollSelector
DEBUG:shouty.connection:Init connection
======== Running on http://0.0.0.0:8080 ========
(Press CTRL+C to quit)
DEBUG:shouty.connection:Open connection
Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/lib64/python3.6/threading.py", line 916, in _bootstrap_inner
self.run()
File "/home/tancredi/Projects/airhead/airhead/broadcaster.py", line 47, in run
uuid = self._playlist.pop()
File "/home/tancredi/Projects/airhead/airhead/playlist.py", line 46, in pop
track = random_track(self._library)
File "/home/tancredi/Projects/airhead/airhead/playlist.py", line 15, in random_track
track = random.choice(library.query())
File "/home/tancredi/Projects/airhead/env/lib/python3.6/random.py", line 257, in choice
raise IndexError('Cannot choose from an empty sequence') from None
IndexError: Cannot choose from an empty sequence
Allow user using GET /api/library
to use parameters such as ?order_by=
or ?sort_by=
.
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.