Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
95890cbabf | ||
|
|
69c2a91ec7 | ||
|
|
fbe09a692c | ||
|
|
0ccc6e7979 | ||
|
|
3eb74cc8b5 | ||
|
|
9bfb1656fe |
No files matched your search
@@ -135,6 +135,7 @@ func (s *SyncManager) Start() error {
|
||||
ConcurrentVideos: s.concurrentVideos,
|
||||
Refill: s.refill,
|
||||
Manager: s,
|
||||
MaxVideoLength: s.maxVideoLength,
|
||||
LbrycrdString: s.lbrycrdString,
|
||||
AwsS3ID: s.awsS3ID,
|
||||
AwsS3Secret: s.awsS3Secret,
|
||||
|
||||
+1
-1
@@ -86,7 +86,7 @@ func abandonSupports(s *Sync) (float64, error) {
|
||||
consumerWG := &stop.Group{}
|
||||
//TODO: remove this once the SDK team fixes their RPC bugs....
|
||||
s.daemon.SetRPCTimeout(30 * time.Second)
|
||||
defer s.daemon.SetRPCTimeout(40 * time.Minute)
|
||||
defer s.daemon.SetRPCTimeout(20 * time.Minute)
|
||||
for i := 0; i < s.ConcurrentVideos; i++ {
|
||||
consumerWG.Add(1)
|
||||
go func() {
|
||||
|
||||
+3
-2
@@ -242,7 +242,7 @@ func (s *Sync) setStatusSyncing() error {
|
||||
|
||||
func (s *Sync) setExceptions() {
|
||||
if s.YoutubeChannelID == "UCwjQfNRW6sGYb__pd7d4nUg" { //@FreeTalkLive
|
||||
s.Manager.maxVideoLength = 0.0 // skips max length checks
|
||||
s.MaxVideoLength = 9999.0 // skips max length checks
|
||||
s.Manager.maxVideoSize = 0
|
||||
}
|
||||
}
|
||||
@@ -307,7 +307,7 @@ func (s *Sync) FullCycle() (e error) {
|
||||
|
||||
log.Infoln("Waiting for daemon to finish starting...")
|
||||
s.daemon = jsonrpc.NewClient(os.Getenv("LBRYNET_ADDRESS"))
|
||||
s.daemon.SetRPCTimeout(40 * time.Minute)
|
||||
s.daemon.SetRPCTimeout(20 * time.Minute)
|
||||
|
||||
err = s.waitForDaemonStart()
|
||||
if err != nil {
|
||||
@@ -904,6 +904,7 @@ func (s *Sync) startWorker(workerNum int) {
|
||||
"interrupted by user",
|
||||
"Sign in to confirm your age",
|
||||
"This video is unavailable",
|
||||
"video is a live stream and hasn't completed yet",
|
||||
}
|
||||
if util.SubstringInSlice(err.Error(), errorsNoRetry) {
|
||||
log.Println("This error should not be retried at all")
|
||||
|
||||
@@ -17,6 +17,7 @@ import (
|
||||
"github.com/lbryio/lbry.go/v2/extras/jsonrpc"
|
||||
"github.com/lbryio/lbry.go/v2/extras/stop"
|
||||
"github.com/lbryio/lbry.go/v2/extras/util"
|
||||
logUtils "github.com/lbryio/ytsync/util"
|
||||
|
||||
"github.com/lbryio/ytsync/ip_manager"
|
||||
"github.com/lbryio/ytsync/namer"
|
||||
@@ -179,6 +180,9 @@ func (v *YoutubeVideo) getAbbrevDescription() string {
|
||||
}
|
||||
|
||||
func (v *YoutubeVideo) download() error {
|
||||
if v.youtubeInfo.Snippet.LiveBroadcastContent != "none" {
|
||||
return errors.Err("video is a live stream and hasn't completed yet")
|
||||
}
|
||||
videoPath := v.getFullPath()
|
||||
|
||||
err := os.Mkdir(v.videoDir(), 0777)
|
||||
@@ -204,6 +208,7 @@ func (v *YoutubeVideo) download() error {
|
||||
"-o" + strings.TrimSuffix(v.getFullPath(), ".mp4"),
|
||||
"--merge-output-format",
|
||||
"mp4",
|
||||
"--rm-cache-dir",
|
||||
"--postprocessor-args",
|
||||
"-movflags faststart",
|
||||
"--abort-on-unavailable-fragment",
|
||||
@@ -439,6 +444,8 @@ func (v *YoutubeVideo) downloadAndPublish(daemon *jsonrpc.Client, params SyncPar
|
||||
return nil, errors.Err(err)
|
||||
}
|
||||
if videoDuration.ToDuration() > time.Duration(v.maxVideoLength*60)*time.Minute {
|
||||
log.Infof("%s is %s long and the limit is %s", v.id, videoDuration.ToDuration().String(), (time.Duration(v.maxVideoLength*60) * time.Minute).String())
|
||||
logUtils.SendErrorToSlack("%s is %s long and the limit is %s", v.id, videoDuration.ToDuration().String(), (time.Duration(v.maxVideoLength*60) * time.Minute).String())
|
||||
return nil, errors.Err("video is too long to process")
|
||||
}
|
||||
for {
|
||||
|
||||
Reference in new issue
Block a user