|
|
|
@@ -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"
|
|
|
|
@@ -204,6 +205,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 +441,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 {
|
|
|
|
|