Code Monkey home page Code Monkey logo

snapcast-autoconfig's Issues

When clients are in an Idle group and one client's preferred stream starts, both clients play it

os: Arch linux
snapclient: 0.25.0
snapserver: 0.25.0

First off, I realise this is a side-effect of how Snapcast works when removing clients from groups ;)

In this scenario:

  • there are two clients c1 and c2
  • each client has its own preferred stream (s1, s2)
  • a "party" stream s0 is lower priority and plays to both s1 and s2

To repro:

  • Play s0 such that c1 and c2 form a playing group g0.
  • Pause s0 -> c1 and c2 remain in g0 which is Idle
  • Play s1 -> the group splits

Result:

  • c1 is in group g1 playing s1
  • c2 is in group g2 playing s1 <-- DOH!

Expected:

  • c2 remains in group g0 which is Idle

Config:

---
server: tcp://localhost:1705
streams:
  Canard:
    clients:
      - canard
  Kitchen:
    clients:
      - kitchen
  Party 1:
    clients:
      - canard
      - kitchen

The result is the same even with more clients in g0. All clients end up in individual groups playing s1.
log.txt

TODO: Write better documentation

This actually works pretty well for me, but the README is snarky and not helpful. We should re-write it to actually better describe what this does and how to use it.

I don't like how the group configuration / selection works, really

This script is highly specific to how I run my home audio system, but it could be a lot more flexible. The configuration file should express three concepts:

  • Streams to watch
  • Clients to care about
  • Rules

That would allow us to build a more flexible system, and specify what to do for undefined situations (eg: if a group exists with a configured client but doesn't match a rule, what should be done? Leave it alone? Forcibly move it? To where? etc).

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.