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:
To support the Streamlog backend as an alternative to google sheets
To support the "reverse sync" mode that lets us keep google sheets up to date even when using a different backend as the source of truth
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:
And in docker-compose we can pick from 3 premade configurations:
Sync all types from sheets
Sync events and playlists from streamlog, but archive events from sheets
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.
...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:
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.