Git Product home page Git Product logo

martinkirch / showergel Goto Github PK

View Code? Open in Web Editor NEW
22.0 22.0 3.0 12.8 MB

Showergel is made to live aside Liquidsoap: while a Liquidsoap script creates a radio stream, Showergel provides complementary features like logging or occasional scheduling, with a (minimalist) Web interface.

License: GNU General Public License v3.0

Python 88.01% HTML 0.34% JavaScript 1.84% Vue 7.71% CSS 0.04% Procfile 0.02% Shell 2.04%

showergel's People

Contributors

dependabot[bot] avatar martinkirch avatar martinkirch-regmind avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

showergel's Issues

Better notifications

Right now the front's notifications module is quite minimal: it relies on console.log and alert. Will be great to implement it as modern notifications

POST /metadata_log takes ~400ms

On my test server, according to server logs POST /metadata_log takes on average 400ms. That's quite long to insert a few small lines in a small DB !

Experiment with more logs or profile to see where those 400ms are spent.

Installer don't works with Liquidsoap 2.2.1

FINISHED --2023-10-11 08:27:17--
Total wall clock time: 0.7s
Downloaded: 3 files, 7.7M in 0.08s (90.2 MB/s)

************ downloaded liquidsoap_2.2.1-debian-bookworm-1_amd64.deb **************
Reading package lists...
Building dependency tree...
Reading state information...
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
liquidsoap : Depends: libfdk-aac2 (>= 2.0.1) but it is not installable
E: Unable to correct problems, you have held broken packages.

Create and package with getting_started.liq

During installation : when no .liq is selected by the user, propose to create a basic script.

This script should be heavily commented, and provide a track-insensitive fallback between:

  • a music source
  • a "recorded shows" source, one folder per program
  • an input.harbor

And a track-sensitive fallback playing a jingle every 15 minutes

To output.prefered with two commented icecast and file (1 per hour, with cleanup)

start with a translated merge of this and that

Now playing page

It would be great to enhance the "Now playing page" in some ways:

  • style the part with the song/program currently played like a real player (this one i strictly frontend)

  • add a loading/error state to deal with the API response

  • add the list of next songs/programs. For this one, it would require some data from the backend: I suggest another endpoint (maybe something like /playlist ?) which would be called only when the song/program is about to end or if the user press the skip button.

Finish front-end's integration

  • Configure Yarn to build below the showergel package, and include these files in poetry build.
  • Configure Bottle to serve built static files
  • Add a development mode:

Vue.js's live coding can be started with yarn serve, it opens a server at http://localhost:8080/ where the front-end is refreshed any time sources are saved.
In that mode, our requests should go to a running showergel instance (at least default to localhost:2345), instead of just /. It will be much easier when working on the front-end.
(see axios' baseURL parameter)

Decoding telnet commands from Liquidsoap 2.x

Following savonet/liquidsoap#1590

While testing GET /live with Liquidsoap 2 :

2021-04-22 21:46:18,841 DEBUG [worker 7][showergel.showergel_bottle:24] Caught:
Traceback (most recent call last):
  File "/home/martin/.local/lib/python3.7/site-packages/bottle/__init__.py", line 1002, in _handle
    out = route.call(**args)
  File "/home/martin/.local/lib/python3.7/site-packages/bottle/__init__.py", line 2018, in wrapper
    rv = callback(*a, **ka)
  File "/home/martin/.local/lib/python3.7/site-packages/showergel/rest/live.py", line 27, in get_live
    metadata = connection.current()
  File "/home/martin/.local/lib/python3.7/site-packages/showergel/liquidsoap_connector.py", line 153, in current
    raw = self._command("request.metadata " + current_rid)
  File "/home/martin/.local/lib/python3.7/site-packages/showergel/liquidsoap_connector.py", line 89, in _command
    line = self._connection.read_until(b'END').decode('utf8')
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xf4 in position 635: invalid continuation byte

in _command split lines before calling decode('utf8') on each ; ignore lines raising UnicodeDecodeError

Systemd process tree

systemctl status seems not completely happy about the Liquidsoap daemonization :

Dec 10 22:00:58 liquidsoap systemd[1079]: rcg_soap.service: Supervising process 14459 which is not our child. We'll most likely not notice when it exits.

needs more investigation

On packaging/distributing

I'm wondering what's the best way to package and distribute Showergel. Right now it's fine for Python developpers only ; what about someone that just knows how to install an OS ?

We could follow the current trend : distributing Docker images. Biggest upside of this method is it could embed Liquidsoap by the way; the downside is it's fat, especially if you just wanted a feature to enhance an existing LS script. And it would turn Showergel into a black box, which goes against showergel's DIY/"tune what your want" philosophy. Also I'm not sure that runnning/updating Docker images is something any radio folk would try.

There's also PyOxidizer that builds all-included, statically linked, win/mac/linux binaries (it would require switching to importlib for assets access).

Installer fails on Python 3.11

Recently attempted to install on debian-testing (which uses pip 23.0.1 on python 3.11)

$ pip install --user showergel
error: externally-managed-environment

× This environment is externally managed
╰─> To install Python packages system-wide, try apt install
    python3-xyz, where xyz is the package you are trying to
    install.
    
    If you wish to install a non-Debian-packaged Python package,
    create a virtual environment using python3 -m venv path/to/venv.
    Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
    sure you have python3-full installed.
    
    If you wish to install a non-Debian packaged Python application,
    it may be easiest to use pipx install xyz, which will manage a
    virtual environment for you. Make sure you have pipx installed.
    
    See /usr/share/doc/python3.11/README.venv for more information.

note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
hint: See PEP 668 for the detailed specification.

could be time to switch the installer to pipx

creating windows bilt.

hi. i'm new to github. i have a suggestion. can you create a windows equivlent to this? or, do something to run it in github. dvance thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.