Local ytsync #112
Labels
No labels
area: devops
area: discovery
area: docs
area: livestream
area: proposal
consider soon
dependencies
Epic
good first issue
hacktoberfest
help wanted
icebox
level: 1
level: 2
level: 3
level: 4
needs: exploration
needs: grooming
needs: priority
needs: repro
needs: tech design
on hold
priority: blocker
priority: high
priority: low
priority: medium
resilience
sdk dependent
Tom's Wishlist
type: bug
type: discussion
type: improvement
type: new feature
type: refactor
type: task
type: testing
unplanned
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: LBRYCommunity/ytsync#112
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
We'd like to let users run their own ytsync process to sync their youtube channel to LBRY without relying on the Odysee service.
Assumptions
Corner cases
Iterations
v1 - Sync a single video
Get local sync working for a single video. Don't worry about any corner cases yet.
Inputs: youtube video ID, LBRY channel ID, path to temp dir
Outputs: a video is published to the LBRY channel
v2 - Identify synced videos
Go through a youtube channel and figure out which videos have already been synced to a LBRY channel
If a video has already been synced (by Odysee or by a previous run of local ytsync), it should never be synced again. Local ytsync should detect that, or in the worst case should make a strong guess or get a human involved.
Inputs: youtube channel ID, LBRY channel ID
Outputs: a list of youtube video IDs that have not been synced yet
There are several options:
In addition we may want to update claim protobuf so you can explicitly tag videos as having been synced from youtube. This would be the best way to identify synced content in the future.
In any case, its a good idea to locally cache what videos have been synced successfully.
v3 - Continuous sync
v4 - Hardening and optimization
v5 - Contribute to Odysee
Figure out how to help odysee with centralized ytsync. Simplest form is detecting new videos from other syncing channels. Harder is participating in sync for those channels.
v6 - Cluster
Run a local cluster of ytsync nodes that split the work of syncing content. They should share a queue and data store, keep lists of synced content up to date, etc.
Notes on Odysee API endpoints
One gotcha is duplicate syncs (race condition). Make sure you don't start syncing something at the same time that odysee starts syncing it. Maybe need a way to mark a sync as in-progress.
Another gotcha is what happens if you start syncing a video but Odysee doesn't know about this video yet (maybe notification didn't arrive or was missed). How can you mark it as synced? Maybe once you turn sync off, you're just taking responsibility for it?
Note for beyond v1:
Check for YouTube API request limits and halt sync if gone over.
Getting the release date right is pretty important, and any failure to determine it should probably stop the sync.