bitfocus / companion-module-getontime-ontime

MIT License
8 stars 5 forks source link

Add action to select event from dropdown (V3) #11

Closed markspolakovs closed 1 year ago

cpvalente commented 1 year ago

Thank you again for your excellent work here, Ideally, we would have #9 merged before reviewing this, as the code changes are too overwhelming to be able to see what the feature introduces objectively. However, everything works as it should, good stuff.

It was already correctly pointed out that the list would become stale during the usage of the application. This should be indicated to the users so it doesn't seem like an application malfunction. As a possible solution: if the ontime server were to implement a refetch message over WebSocket, which streamed whenever there were changes to the server data, would it then be possible to refetch this at runtime?

markspolakovs commented 1 year ago

@cpvalente

Thank you again for your excellent work here, Ideally, we would have #9 merged before reviewing this, as the code changes are too overwhelming to be able to see what the feature introduces objectively. However, everything works as it should, good stuff.

Thanks! You can see just the changes from this PR in 208ecff.

It was already correctly pointed out that the list would become stale during the usage of the application. This should be indicated to the users so it doesn't seem like an application malfunction. As a possible solution: if the ontime server were to implement a refetch message over WebSocket, which streamed whenever there were changes to the server data, would it then be possible to refetch this at runtime?

I imagine it should be doable - add a new socket.io event handler that calls update_events().

kellhogs commented 1 year ago

hey @markspolakovs i've added your code as part of the integration to the Ontime V2 API.

I have also extended your code with the help of @cpvalente to include an refetch once the rundown get's updated in Ontime

I will file the PR once my other PR got merged. You can have a look at the code here (that's the whole PR for the addition of the v2 api so there are a lot of changes)

I think you can close this PR then