erdnaxeli / castblock

Automatically skip sponsor segments and ads in YouTube videos playing on Chromecast.
MIT License
182 stars 20 forks source link

Take categories in ENV too #16

Closed mchangrh closed 3 years ago

mchangrh commented 3 years ago

Currently, castblock won't run properly in docker-compose since arguments can't be passed into a non-build context.

Crystal can get the environment variables from the process https://crystal-lang.org/api/1.0.0/ENV.html

the variable might have to be set like

CATEGORIES=["sponsor", "selfpromo"]

Sample docker-compose

version: '3.3'
services:
    castblock:
        network_mode: host
        image: erdnaxeli/castblock
        environment:
        - CATEGORIES=["sponsor", "selfpromo"]
erdnaxeli commented 3 years ago

So I was thinking about it, this could be a good thing to add the the lib I use to build the cli command, Clip. Fortunately the author appears to be… me :D

This will probably not be a quick and easy thing to do though, so in the meantime I will implement it directly in castblock.