dbvideostriketeam / wubloader

MIT License
14 stars 6 forks source link

sheetsync rewrite for streamlog support and more #400

Closed ekimekim closed 4 weeks ago

ekimekim commented 4 weeks ago

...well this escalated.

You can attempt to following the history here by looking at the commits. Note the first two reverts were added later because it was the easiest way to deal with conflicts when trying to get this work onto latest master - note the functionality that was reverted is re-implemented (in a completely different way) later on.

Overall, this rewrite changes sheetsync from being a service for syncing events from Google Sheets, with hacked-on support for some other tables to a service for syncing any kind of table with any kind of backend service, albeit with some requirements that things still mostly smell like google sheets or can be made to appear as such.

The main reasons to do this was:

Along the way, it was realized that special-casing handling for events, archive events (ie. video trim times) and playlists was more work than having a common core that handles all three cases.

What we've ended up with is the following sets of possible functionality:

| |Events|Playlists|Archive Events| |=========|======|=========|==============| |Sheets |2-way |2-way |2-way | |Streamlog|1-way |1-way |Not supported |

And in docker-compose we can pick from 3 premade configurations:

  1. Sync all types from sheets
  2. Sync events and playlists from streamlog, but archive events from sheets
  3. As 2, but also reverse-sync events and playlists back to sheets

The other major change to note here is that the playlists database table has gone from being strictly just playlists to all "tags sheet" rows, including ones that are not playlists (this was needed for reverse sync to work).

I've tested the sheets parts of this, but not yet the streamlog parts.