rpitv / glimpse

Monorepo for the RPI TV Glimpse project
MIT License
3 stars 1 forks source link

Feature: Private/Recorded productions #11

Open robere2 opened 1 year ago

robere2 commented 1 year ago

Not all productions that RPI TV produces are available for livestreaming (e.g. Players). Additionally, not all productions that RPI TV produces are viewable by the public (e.g. ESPN+ streams).

One solution to this would be to just add a private field to the Production type. Then, in both cases, mark the productions as private. However this has a few downsides:

To solve both of these problems might require some more changes, such as:

robere2 commented 9 months ago

The ADDINTERVAL function that can be used within conditions in conjunction with tags mostly resolves this issue. For example, the following conditions for reading Productions would block Player's videos permanently, and ESPN streams for one month.

{
    "OR": [
        {
            "tags": {
                "none": {
                    "tag": {
                        "in": [
                            "Players Private Performance",
                            "Men's Hockey"
                        ]
                    }
                }
            }
        },
        {
            "AND": [
                {
                    "startTime": {
                        "lte": "ADDINTERVAL($now, P-1M)"
                    }
                },
                {
                    "tags": {
                        "some": {
                            "tag": "Men's Hockey"
                        }
                    }
                }
            ]
        }
    ]
}

A better solution would allow us to keep the production public but hide the Video. This involves going multiple relation levels deep in our conditions, which I believe does not work, currently.