From 038af0f3f3317a58b75b09a32cb3ab800e43ef45 Mon Sep 17 00:00:00 2001 From: JustHumanz Date: Mon, 22 Mar 2021 20:53:36 +0700 Subject: [PATCH] Fix livestream conter not running --- service/livestream/youtube/youtube.go | 39 +++++++-------------------- 1 file changed, 10 insertions(+), 29 deletions(-) diff --git a/service/livestream/youtube/youtube.go b/service/livestream/youtube/youtube.go index da4ce5ef..a590911e 100755 --- a/service/livestream/youtube/youtube.go +++ b/service/livestream/youtube/youtube.go @@ -98,43 +98,24 @@ func CheckYtByTime() { log.Error(err) } - Youtube.UpdateYt("live") //.SendNude() + Youtube.UpdateYt(config.LiveStatus) + err = SendNude(Youtube) + if err != nil { + log.Error(err) + } } } } - Youtube.UpdateStatus("reminder") //.SendNude() - } - } - } - } -} - -/* -func CheckYtScheduleTest(GroupName string) { - yttoken = engine.GetYtToken() - for _, Group := range engine.GroupData { - if GroupName == Group.GroupName { - var wg sync.WaitGroup - for i, Member := range database.GetMembers(Group.ID) { - if Member.YoutubeID != "" { - wg.Add(1) - log.WithFields(log.Fields{ - "Vtuber": Member.EnName, - "Group": Group.GroupName, - "Youtube ID": Member.YoutubeID, - "Vtuber Region": Member.Region, - }).Info("Checking Youtube") - go StartCheckYT(Member, Group, &wg) - } - if i%10 == 0 { - wg.Wait() + Youtube.UpdateStatus("reminder") + err = SendNude(Youtube) + if err != nil { + log.Error(err) + } } } - wg.Wait() } } } -*/ func GetWaiting(VideoID string) (string, error) { var (