restrict length amount on small youtubers

This commit is contained in:
Niko Storni 2020-03-12 04:08:50 +01:00
parent 5460224cd6
commit 259df8d257
2 changed files with 4 additions and 0 deletions

View file

@ -168,6 +168,9 @@ func (s *SyncManager) Start() error {
}
for i, c := range channels {
log.Infof("There are %d channels in the \"%s\" queue", len(channels)-i, q)
if c.TotalSubscribers < 1000 {
s.maxVideoLength = 1.0
}
syncs = append(syncs, Sync{
APIConfig: s.apiConfig,
YoutubeChannelID: c.ChannelId,

View file

@ -56,6 +56,7 @@ type Fee struct {
type YoutubeChannel struct {
ChannelId string `json:"channel_id"`
TotalVideos uint `json:"total_videos"`
TotalSubscribers uint `json:"total_subscribers"`
DesiredChannelName string `json:"desired_channel_name"`
Fee *Fee `json:"fee"`
ChannelClaimID string `json:"channel_claim_id"`