Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add yt-upload command #19

Merged
merged 12 commits into from
Oct 8, 2023
Merged

feat: Add yt-upload command #19

merged 12 commits into from
Oct 8, 2023

Conversation

serafdev
Copy link
Member

yt-upload provides an automated video uploader based on new videos added
to a file

https://github.com/fsnotify/fsnotify to detect newly created
files

To insert new files upload() uses the following 2 apis:

Current limitation is having 10k rate limiting where Video.Insert uses
1600 and PlaylistItem.Insert uses 50

Issue #18

@serafdev serafdev self-assigned this Sep 30, 2023
yt-upload provides an automated video uploader based on new videos added
to a file

https://github.com/fsnotify/fsnotify to detect newly created
files

To insert new files upload() uses the following 2 apis:
- https://developers.google.com/youtube/v3/docs/videos/insert to add a
  new video to the channel
- https://developers.google.com/youtube/v3/docs/playlistItems/insert to
  mv the video to the backlog (PL1PP365t1jqj2xSIjh17vIB4tmDfJwJDQ) list

Current limitation is having 10k rate limiting where Video.Insert uses
1600 and PlaylistItem.Insert uses 50

Issue #18
Added:
- Error handling on Quota Exceeded: Added Retry Policy

Removed:
- Unused ./pkg/yt functions (getChannels, getVideos, etc)
@serafdev serafdev merged commit bab6d8c into master Oct 8, 2023
@serafdev serafdev deleted the automated-uploads branch October 8, 2023 13:53
serafdev and others added 2 commits October 8, 2023 10:01
replaces yt-upload(v1), simplifies the logic in detecting new files

Simply read all files and update a global files Object (using mutex to
do this safely)

If File was not uploaded, it's next in list (.file-name-upload ==
uploaded)

When Error happens, abort current flow and retry in 2 hours (quota
limit exited or whatever)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant