RTAinJapan / rtainjapan-layouts

The on-stream layouts for RTA in Japan events
Apache License 2.0
37 stars 5 forks source link

再生中の曲名を API 経由で更新できるようにする #725

Closed cma2819 closed 1 year ago

cma2819 commented 1 year ago

resolve #724

https://github.com/Hoishin/http-on-file-change からのリクエストを受けて再生中の曲名を更新できるようにした。

脱 spotify に伴い、曲名の prefix, suffix の設定を spotify から剥がした

        "spotify": {
            "type": "object",
            "additionalProperties": false,
            "required": ["clientId", "clientSecret"],
            "properties": {
                "clientId": {"type": "string"},
                "clientSecret": {"type": "string"}
            }
        },
        "music": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
                "textPrefix": {"type": "string", "default": ""},
                "textSuffix": {"type": "string", "default": ""}
            }
        },

セットアップ画面で表示されることを確認済み

curl --request PUT --url http://localhost:9090/playing-music \
--header 'content-type: application/json' \
--data '{"id": "hogehogesomeid","data": "EarthBound \"Twoson Hits the Road\" by djpretzel"}'
    "music": {
        "textSuffix": "(https://ocremix.org)"
    },

image