Download video to sync to local cache #113
306
local/local.go
|
@ -5,12 +5,9 @@ import (
|
||||||
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"time"
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
"os"
|
"os"
|
||||||
"os/exec"
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
"path"
|
"path"
|
||||||
"regexp"
|
"regexp"
|
||||||
"sort"
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
log "github.com/sirupsen/logrus"
|
log "github.com/sirupsen/logrus"
|
||||||
|
@ -20,9 +17,6 @@ import (
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
"github.com/lbryio/ytsync/v5/downloader/ytdl"
|
"github.com/lbryio/ytsync/v5/downloader/ytdl"
|
||||||
"github.com/lbryio/ytsync/v5/namer"
|
"github.com/lbryio/ytsync/v5/namer"
|
||||||
"github.com/lbryio/ytsync/v5/tags_manager"
|
"github.com/lbryio/ytsync/v5/tags_manager"
|
||||||
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
"github.com/lbryio/lbry.go/v2/extras/jsonrpc"
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
"github.com/lbryio/lbry.go/v2/extras/util"
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
)
|
)
|
||||||
|
|
||||||
type SyncContext struct {
|
type SyncContext struct {
|
||||||
|
@ -80,122 +74,45 @@ func localCmd(cmd *cobra.Command, args []string) {
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
fmt.Println(syncContext.LbrynetAddr)
|
fmt.Println(syncContext.LbrynetAddr)
|
||||||
|
|
||||||
videoID := args[0]
|
videoID := args[0]
|
||||||
fmt.Println(videoID)
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
|
|
||||||
lbrynet := jsonrpc.NewClient(syncContext.LbrynetAddr)
|
log.Debugf("Running sync for YouTube video ID %s", videoID)
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
lbrynet.SetRPCTimeout(5 * time.Minute)
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
|
|
||||||
status, err := lbrynet.Status()
|
var publisher VideoPublisher
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
|
publisher, err = NewLocalSDKPublisher(syncContext.LbrynetAddr, syncContext.ChannelID, syncContext.PublishBid)
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
log.Error(err)
|
log.Errorf("Error setting up publisher: %v", err)
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if !status.IsRunning {
|
var videoSource VideoSource
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
log.Error("SDK is not running")
|
videoSource, err = NewYtdlVideoSource(syncContext.TempDir)
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
|
if err != nil {
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
prolly need to make sure this exists prolly need to make sure this exists
This should be guaranteed by This should be guaranteed by `cobra.ExactArgs(1)`, but I can a check and error here too.
you're right, i just didnt notice that you're right, i just didnt notice that
|
|||||||
|
log.Errorf("Error setting up video source: %v", err)
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// Should check to see if the SDK owns the channel
|
sourceVideo, err := videoSource.GetVideo(videoID)
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
// Should check to see if wallet is unlocked
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
// but jsonrpc.Client doesn't have WalletStatus method
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
// so skip for now
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
// Should check to see if streams are configured to be reflected and warn if not
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
// but jsonrpc.Client doesn't have SettingsGet method to see if streams are reflected
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
// so use File.UploadingToReflector as a proxy for now
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
videoBasePath := path.Join(syncContext.TempDir, videoID)
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
videoMetadata, videoMetadataPath, err := getVideoMetadata(videoBasePath, videoID)
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
log.Errorf("Error getting video metadata: %v", err)
|
log.Errorf("Error getting source video: %v", err)
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
err = downloadVideo(videoBasePath, videoMetadataPath)
|
processedVideo, err := processVideoForPublishing(*sourceVideo, syncContext.ChannelID)
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
log.Errorf("Error downloading video: %v", err)
|
log.Errorf("Error processing source video for publishing: %v", err)
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
tags, err := tags_manager.SanitizeTags(videoMetadata.Tags, syncContext.ChannelID)
|
done, err := publisher.Publish(*processedVideo)
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
log.Errorf("Error sanitizing tags: %v", err)
|
log.Errorf("Error publishing video: %v", err)
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
urlsRegex := regexp.MustCompile(`(?m) ?(f|ht)(tp)(s?)(://)(.*)[.|/](.*)`)
|
err = <-done
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
descriptionSample := urlsRegex.ReplaceAllString(videoMetadata.Description, "")
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
info := whatlanggo.Detect(descriptionSample)
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
info2 := whatlanggo.Detect(videoMetadata.Title)
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
var languages []string = nil
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
if info.IsReliable() && info.Lang.Iso6391() != "" {
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
language := info.Lang.Iso6391()
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
languages = []string{language}
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
} else if info2.IsReliable() && info2.Lang.Iso6391() != "" {
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
language := info2.Lang.Iso6391()
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
languages = []string{language}
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
}
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
// Thumbnail and ReleaseTime need to be properly determined
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
streamCreateOptions := jsonrpc.StreamCreateOptions {
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
ClaimCreateOptions: jsonrpc.ClaimCreateOptions {
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
Title: &videoMetadata.Title,
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
Description: util.PtrToString(getAbbrevDescription(videoMetadata)),
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
Languages: languages,
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
//ThumbnailURL: &v.thumbnailURL,
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
Tags: tags,
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
},
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
ReleaseTime: util.PtrToInt64(time.Now().Unix()),
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
ChannelID: &syncContext.ChannelID,
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
License: util.PtrToString("Copyrighted (contact publisher)"),
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
}
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
videoPath, err := getVideoDownloadedPath(syncContext.TempDir, videoID)
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
log.Errorf("Error determining downloaded video path: %v", err)
|
log.Errorf("Error while wating for stream to reflect: %v", err)
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
}
|
}
|
||||||
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
fmt.Println("%s", *streamCreateOptions.ClaimCreateOptions.Title)
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
fmt.Println("%s", *streamCreateOptions.ClaimCreateOptions.Description)
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
fmt.Println("%v", streamCreateOptions.ClaimCreateOptions.Languages)
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
fmt.Println("%v", streamCreateOptions.ClaimCreateOptions.Tags)
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
claimName := namer.NewNamer().GetNextName(videoMetadata.Title)
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
log.Infof("Publishing stream as %s", claimName)
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
txSummary, err := lbrynet.StreamCreate(claimName, videoPath, syncContext.PublishBid, streamCreateOptions)
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
if err != nil {
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
log.Errorf("Error creating stream: %v", err)
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
return
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
}
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
for {
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
fileListResponse, fileIndex, err := findFileByTxid(lbrynet, txSummary.Txid)
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
if err != nil {
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
log.Errorf("Error finding file by txid: %v", err)
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
return
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
}
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
if fileListResponse == nil {
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
log.Errorf("Could not find file in list with correct txid")
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
return
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
}
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
fileStatus := fileListResponse.Items[fileIndex]
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
if fileStatus.IsFullyReflected {
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
log.Info("Stream is fully reflected")
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
break
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
}
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
if !fileStatus.UploadingToReflector {
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
log.Warn("Stream is not being uploaded to a reflector. Check your lbrynet settings if this is a mistake.")
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
break
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
}
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
log.Infof("Stream reflector progress: %d%%", fileStatus.ReflectorProgress)
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
time.Sleep(5 * time.Second)
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
}
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
log.Info("Done")
|
log.Info("Done")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -239,88 +156,6 @@ func loadVideoMetadata(path string) (*ytdl.YtdlVideo, error) {
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
return videoMetadata, nil
|
return videoMetadata, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func downloadVideoMetadata(basePath, videoID string) error {
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
ytdlArgs := []string{
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
"--skip-download",
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
"--write-info-json",
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
"--force-overwrites",
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
fmt.Sprintf("https://www.youtube.com/watch?v=%s", videoID),
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
"--cookies",
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
"cookies.txt",
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
"-o",
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
basePath,
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
}
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
ytdlCmd := exec.Command("yt-dlp", ytdlArgs...)
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
output, err := runCmd(ytdlCmd)
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
log.Debug(output)
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
return err
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
}
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
func downloadVideo(basePath, metadataPath string) error {
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
ytdlArgs := []string{
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
"--no-progress",
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
"-o",
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
basePath,
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
"--merge-output-format",
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
"mp4",
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
"--postprocessor-args",
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
"ffmpeg:-movflags faststart",
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
"--abort-on-unavailable-fragment",
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
"--fragment-retries",
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
"1",
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
"--cookies",
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
"cookies.txt",
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
"--extractor-args",
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
"youtube:player_client=android",
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
"--load-info-json",
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
metadataPath,
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
"-fbestvideo[ext=mp4][vcodec!*=av01][height<=720]+bestaudio[ext!=webm][format_id!=258][format_id!=251][format_id!=256][format_id!=327]",
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
}
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
ytdlCmd := exec.Command("yt-dlp", ytdlArgs...)
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
output, err := runCmd(ytdlCmd)
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
log.Debug(output)
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
return err
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
}
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
func runCmd(cmd *exec.Cmd) ([]string, error) {
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
log.Infof("running cmd: %s", strings.Join(cmd.Args, " "))
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
var err error
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
stderr, err := cmd.StderrPipe()
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
if err != nil {
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
return nil, err
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
}
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
stdout, err := cmd.StdoutPipe()
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
if err != nil {
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
return nil, err
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
}
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
err = cmd.Start()
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
if err != nil {
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
return nil, err
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
}
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
outLog, err := ioutil.ReadAll(stdout)
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
if err != nil {
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
return nil, err
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
}
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
errorLog, err := ioutil.ReadAll(stderr)
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
if err != nil {
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
return nil, err
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
}
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
done := make(chan error, 1)
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
go func() {
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
done <- cmd.Wait()
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
}()
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
select {
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
case err := <-done:
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
if err != nil {
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
log.Error(string(errorLog))
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
return nil, err
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
}
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
return strings.Split(strings.Replace(string(outLog), "\r\n", "\n", -1), "\n"), nil
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
}
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
}
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
func getVideoDownloadedPath(videoDir, videoID string) (string, error) {
|
func getVideoDownloadedPath(videoDir, videoID string) (string, error) {
|
||||||
files, err := ioutil.ReadDir(videoDir)
|
files, err := ioutil.ReadDir(videoDir)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -339,31 +174,100 @@ func getVideoDownloadedPath(videoDir, videoID string) (string, error) {
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func getAbbrevDescription(v *ytdl.YtdlVideo) string {
|
func getAbbrevDescription(v SourceVideo) string {
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
|
if v.Description == nil {
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
|
return v.SourceURL
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
|
}
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
maxLength := 2800
|
maxLength := 2800
|
||||||
description := strings.TrimSpace(v.Description)
|
description := strings.TrimSpace(*v.Description)
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
additionalDescription := "\nhttps://www.youtube.com/watch?v=" + v.ID
|
additionalDescription := "\n" + v.SourceURL
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
if len(description) > maxLength {
|
if len(description) > maxLength {
|
||||||
description = description[:maxLength]
|
description = description[:maxLength]
|
||||||
}
|
}
|
||||||
return description + "\n..." + additionalDescription
|
return description + "\n..." + additionalDescription
|
||||||
}
|
}
|
||||||
|
|
||||||
// if jsonrpc.Client.FileList is extended to match the actual jsonrpc schema, this can be removed
|
type SourceVideo struct {
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
func findFileByTxid(client *jsonrpc.Client, txid string) (*jsonrpc.FileListResponse, int, error) {
|
ID string
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
response, err := client.FileList(0, 20)
|
Title *string
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
for {
|
Description *string
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
if err != nil {
|
SourceURL string
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
log.Errorf("Error getting file list page: %v", err)
|
Languages []string
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
return nil, 0, err
|
Tags []string
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
}
|
ReleaseTime *int64
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
index := sort.Search(len(response.Items), func (i int) bool { return response.Items[i].Txid == txid })
|
ThumbnailURL *string
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
if index < len(response.Items) {
|
FullLocalPath string
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
return response, index, nil
|
}
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
}
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
if response.Page >= response.TotalPages {
|
type PublishableVideo struct {
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
return nil, 0, nil
|
ID string
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
}
|
ClaimName string
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
response, err = client.FileList(response.Page + 1, 20)
|
Title string
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
}
|
Description string
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
|
SourceURL string
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
|
Languages []string
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
|
Tags []string
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
|
ReleaseTime int64
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
|
ThumbnailURL string
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
|
FullLocalPath string
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
|
}
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
|
func processVideoForPublishing(source SourceVideo, channelID string) (*PublishableVideo, error) {
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
|
tags, err := tags_manager.SanitizeTags(source.Tags, channelID)
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
|
if err != nil {
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
|
log.Errorf("Error sanitizing tags: %v", err)
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
|
return nil, err
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
|
}
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
|
descriptionSample := ""
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
|
if source.Description != nil {
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
|
urlsRegex := regexp.MustCompile(`(?m) ?(f|ht)(tp)(s?)(://)(.*)[.|/](.*)`)
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
|
descriptionSample = urlsRegex.ReplaceAllString(*source.Description, "")
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
|
}
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
|
info := whatlanggo.Detect(descriptionSample)
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
|
title := ""
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
|
if source.Title != nil {
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
|
title = *source.Title
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
|
}
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
|
info2 := whatlanggo.Detect(title)
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
|
var languages []string = nil
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
|
if info.IsReliable() && info.Lang.Iso6391() != "" {
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
|
language := info.Lang.Iso6391()
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
|
languages = []string{language}
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
|
} else if info2.IsReliable() && info2.Lang.Iso6391() != "" {
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
|
language := info2.Lang.Iso6391()
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
|
languages = []string{language}
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
|
}
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
|
claimName := namer.NewNamer().GetNextName(title)
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
|
thumbnailURL := ""
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
|
if source.ThumbnailURL != nil {
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
|
thumbnailURL = *source.ThumbnailURL
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
|
}
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
|
processed := PublishableVideo {
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
|
ClaimName: claimName,
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
|
Title: title,
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
|
Description: getAbbrevDescription(source),
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
|
Languages: languages,
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
|
Tags: tags,
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
|
ReleaseTime: *source.ReleaseTime,
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
|
ThumbnailURL: thumbnailURL,
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
|
FullLocalPath: source.FullLocalPath,
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
|
}
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
|
log.Debugf("Video prepared for publication: %v", processed)
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
|
return &processed, nil
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
|
}
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
|
type VideoSource interface {
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
|
GetVideo(id string) (*SourceVideo, error)
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
|
}
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
|
type VideoPublisher interface {
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
|
Publish(video PublishableVideo) (chan error, error)
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
}
|
}
|
||||||
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
120
local/localSDKPublisher.go
Normal file
|
@ -0,0 +1,120 @@
|
||||||
if this is an error (or an unexpected thing), it should prolly send an error to if this is an error (or an unexpected thing), it should prolly send an error to `done`, right?
The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected. The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected.
yea id either make it an option or just assume that all streams will be reflected. option is better but more work yea id either make it an option or just assume that all streams will be reflected. option is better but more work
if this is an error (or an unexpected thing), it should prolly send an error to if this is an error (or an unexpected thing), it should prolly send an error to `done`, right?
The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected. The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected.
yea id either make it an option or just assume that all streams will be reflected. option is better but more work yea id either make it an option or just assume that all streams will be reflected. option is better but more work
|
|||||||
|
package local
|
||||||
if this is an error (or an unexpected thing), it should prolly send an error to if this is an error (or an unexpected thing), it should prolly send an error to `done`, right?
The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected. The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected.
yea id either make it an option or just assume that all streams will be reflected. option is better but more work yea id either make it an option or just assume that all streams will be reflected. option is better but more work
|
|||||||
|
|
||||||
if this is an error (or an unexpected thing), it should prolly send an error to if this is an error (or an unexpected thing), it should prolly send an error to `done`, right?
The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected. The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected.
yea id either make it an option or just assume that all streams will be reflected. option is better but more work yea id either make it an option or just assume that all streams will be reflected. option is better but more work
|
|||||||
|
import (
|
||||||
if this is an error (or an unexpected thing), it should prolly send an error to if this is an error (or an unexpected thing), it should prolly send an error to `done`, right?
The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected. The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected.
yea id either make it an option or just assume that all streams will be reflected. option is better but more work yea id either make it an option or just assume that all streams will be reflected. option is better but more work
|
|||||||
|
"errors"
|
||||||
if this is an error (or an unexpected thing), it should prolly send an error to if this is an error (or an unexpected thing), it should prolly send an error to `done`, right?
The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected. The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected.
yea id either make it an option or just assume that all streams will be reflected. option is better but more work yea id either make it an option or just assume that all streams will be reflected. option is better but more work
|
|||||||
|
"sort"
|
||||||
if this is an error (or an unexpected thing), it should prolly send an error to if this is an error (or an unexpected thing), it should prolly send an error to `done`, right?
The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected. The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected.
yea id either make it an option or just assume that all streams will be reflected. option is better but more work yea id either make it an option or just assume that all streams will be reflected. option is better but more work
|
|||||||
|
"time"
|
||||||
if this is an error (or an unexpected thing), it should prolly send an error to if this is an error (or an unexpected thing), it should prolly send an error to `done`, right?
The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected. The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected.
yea id either make it an option or just assume that all streams will be reflected. option is better but more work yea id either make it an option or just assume that all streams will be reflected. option is better but more work
|
|||||||
|
|
||||||
if this is an error (or an unexpected thing), it should prolly send an error to if this is an error (or an unexpected thing), it should prolly send an error to `done`, right?
The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected. The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected.
yea id either make it an option or just assume that all streams will be reflected. option is better but more work yea id either make it an option or just assume that all streams will be reflected. option is better but more work
|
|||||||
|
log "github.com/sirupsen/logrus"
|
||||||
if this is an error (or an unexpected thing), it should prolly send an error to if this is an error (or an unexpected thing), it should prolly send an error to `done`, right?
The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected. The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected.
yea id either make it an option or just assume that all streams will be reflected. option is better but more work yea id either make it an option or just assume that all streams will be reflected. option is better but more work
|
|||||||
|
|
||||||
if this is an error (or an unexpected thing), it should prolly send an error to if this is an error (or an unexpected thing), it should prolly send an error to `done`, right?
The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected. The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected.
yea id either make it an option or just assume that all streams will be reflected. option is better but more work yea id either make it an option or just assume that all streams will be reflected. option is better but more work
|
|||||||
|
"github.com/lbryio/lbry.go/v2/extras/jsonrpc"
|
||||||
if this is an error (or an unexpected thing), it should prolly send an error to if this is an error (or an unexpected thing), it should prolly send an error to `done`, right?
The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected. The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected.
yea id either make it an option or just assume that all streams will be reflected. option is better but more work yea id either make it an option or just assume that all streams will be reflected. option is better but more work
|
|||||||
|
"github.com/lbryio/lbry.go/v2/extras/util"
|
||||||
if this is an error (or an unexpected thing), it should prolly send an error to if this is an error (or an unexpected thing), it should prolly send an error to `done`, right?
The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected. The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected.
yea id either make it an option or just assume that all streams will be reflected. option is better but more work yea id either make it an option or just assume that all streams will be reflected. option is better but more work
|
|||||||
|
)
|
||||||
if this is an error (or an unexpected thing), it should prolly send an error to if this is an error (or an unexpected thing), it should prolly send an error to `done`, right?
The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected. The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected.
yea id either make it an option or just assume that all streams will be reflected. option is better but more work yea id either make it an option or just assume that all streams will be reflected. option is better but more work
|
|||||||
|
|
||||||
if this is an error (or an unexpected thing), it should prolly send an error to if this is an error (or an unexpected thing), it should prolly send an error to `done`, right?
The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected. The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected.
yea id either make it an option or just assume that all streams will be reflected. option is better but more work yea id either make it an option or just assume that all streams will be reflected. option is better but more work
|
|||||||
|
type LocalSDKPublisher struct {
|
||||||
if this is an error (or an unexpected thing), it should prolly send an error to if this is an error (or an unexpected thing), it should prolly send an error to `done`, right?
The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected. The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected.
yea id either make it an option or just assume that all streams will be reflected. option is better but more work yea id either make it an option or just assume that all streams will be reflected. option is better but more work
|
|||||||
|
channelID string
|
||||||
if this is an error (or an unexpected thing), it should prolly send an error to if this is an error (or an unexpected thing), it should prolly send an error to `done`, right?
The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected. The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected.
yea id either make it an option or just assume that all streams will be reflected. option is better but more work yea id either make it an option or just assume that all streams will be reflected. option is better but more work
|
|||||||
|
publishBid float64
|
||||||
if this is an error (or an unexpected thing), it should prolly send an error to if this is an error (or an unexpected thing), it should prolly send an error to `done`, right?
The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected. The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected.
yea id either make it an option or just assume that all streams will be reflected. option is better but more work yea id either make it an option or just assume that all streams will be reflected. option is better but more work
|
|||||||
|
lbrynet *jsonrpc.Client
|
||||||
if this is an error (or an unexpected thing), it should prolly send an error to if this is an error (or an unexpected thing), it should prolly send an error to `done`, right?
The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected. The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected.
yea id either make it an option or just assume that all streams will be reflected. option is better but more work yea id either make it an option or just assume that all streams will be reflected. option is better but more work
|
|||||||
|
}
|
||||||
if this is an error (or an unexpected thing), it should prolly send an error to if this is an error (or an unexpected thing), it should prolly send an error to `done`, right?
The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected. The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected.
yea id either make it an option or just assume that all streams will be reflected. option is better but more work yea id either make it an option or just assume that all streams will be reflected. option is better but more work
|
|||||||
|
|
||||||
if this is an error (or an unexpected thing), it should prolly send an error to if this is an error (or an unexpected thing), it should prolly send an error to `done`, right?
The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected. The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected.
yea id either make it an option or just assume that all streams will be reflected. option is better but more work yea id either make it an option or just assume that all streams will be reflected. option is better but more work
|
|||||||
|
func NewLocalSDKPublisher(sdkAddr, channelID string, publishBid float64) (*LocalSDKPublisher, error) {
|
||||||
if this is an error (or an unexpected thing), it should prolly send an error to if this is an error (or an unexpected thing), it should prolly send an error to `done`, right?
The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected. The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected.
yea id either make it an option or just assume that all streams will be reflected. option is better but more work yea id either make it an option or just assume that all streams will be reflected. option is better but more work
|
|||||||
|
lbrynet := jsonrpc.NewClient(sdkAddr)
|
||||||
if this is an error (or an unexpected thing), it should prolly send an error to if this is an error (or an unexpected thing), it should prolly send an error to `done`, right?
The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected. The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected.
yea id either make it an option or just assume that all streams will be reflected. option is better but more work yea id either make it an option or just assume that all streams will be reflected. option is better but more work
|
|||||||
|
lbrynet.SetRPCTimeout(5 * time.Minute)
|
||||||
if this is an error (or an unexpected thing), it should prolly send an error to if this is an error (or an unexpected thing), it should prolly send an error to `done`, right?
The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected. The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected.
yea id either make it an option or just assume that all streams will be reflected. option is better but more work yea id either make it an option or just assume that all streams will be reflected. option is better but more work
|
|||||||
|
|
||||||
if this is an error (or an unexpected thing), it should prolly send an error to if this is an error (or an unexpected thing), it should prolly send an error to `done`, right?
The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected. The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected.
yea id either make it an option or just assume that all streams will be reflected. option is better but more work yea id either make it an option or just assume that all streams will be reflected. option is better but more work
|
|||||||
|
status, err := lbrynet.Status()
|
||||||
if this is an error (or an unexpected thing), it should prolly send an error to if this is an error (or an unexpected thing), it should prolly send an error to `done`, right?
The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected. The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected.
yea id either make it an option or just assume that all streams will be reflected. option is better but more work yea id either make it an option or just assume that all streams will be reflected. option is better but more work
|
|||||||
|
if err != nil {
|
||||||
if this is an error (or an unexpected thing), it should prolly send an error to if this is an error (or an unexpected thing), it should prolly send an error to `done`, right?
The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected. The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected.
yea id either make it an option or just assume that all streams will be reflected. option is better but more work yea id either make it an option or just assume that all streams will be reflected. option is better but more work
|
|||||||
|
return nil, err
|
||||||
if this is an error (or an unexpected thing), it should prolly send an error to if this is an error (or an unexpected thing), it should prolly send an error to `done`, right?
The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected. The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected.
yea id either make it an option or just assume that all streams will be reflected. option is better but more work yea id either make it an option or just assume that all streams will be reflected. option is better but more work
|
|||||||
|
}
|
||||||
if this is an error (or an unexpected thing), it should prolly send an error to if this is an error (or an unexpected thing), it should prolly send an error to `done`, right?
The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected. The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected.
yea id either make it an option or just assume that all streams will be reflected. option is better but more work yea id either make it an option or just assume that all streams will be reflected. option is better but more work
|
|||||||
|
|
||||||
if this is an error (or an unexpected thing), it should prolly send an error to if this is an error (or an unexpected thing), it should prolly send an error to `done`, right?
The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected. The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected.
yea id either make it an option or just assume that all streams will be reflected. option is better but more work yea id either make it an option or just assume that all streams will be reflected. option is better but more work
|
|||||||
|
if !status.IsRunning {
|
||||||
if this is an error (or an unexpected thing), it should prolly send an error to if this is an error (or an unexpected thing), it should prolly send an error to `done`, right?
The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected. The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected.
yea id either make it an option or just assume that all streams will be reflected. option is better but more work yea id either make it an option or just assume that all streams will be reflected. option is better but more work
|
|||||||
|
return nil, errors.New("SDK is not running")
|
||||||
if this is an error (or an unexpected thing), it should prolly send an error to if this is an error (or an unexpected thing), it should prolly send an error to `done`, right?
The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected. The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected.
yea id either make it an option or just assume that all streams will be reflected. option is better but more work yea id either make it an option or just assume that all streams will be reflected. option is better but more work
|
|||||||
|
}
|
||||||
if this is an error (or an unexpected thing), it should prolly send an error to if this is an error (or an unexpected thing), it should prolly send an error to `done`, right?
The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected. The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected.
yea id either make it an option or just assume that all streams will be reflected. option is better but more work yea id either make it an option or just assume that all streams will be reflected. option is better but more work
|
|||||||
|
|
||||||
if this is an error (or an unexpected thing), it should prolly send an error to if this is an error (or an unexpected thing), it should prolly send an error to `done`, right?
The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected. The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected.
yea id either make it an option or just assume that all streams will be reflected. option is better but more work yea id either make it an option or just assume that all streams will be reflected. option is better but more work
|
|||||||
|
// Should check to see if the SDK owns the channel
|
||||||
if this is an error (or an unexpected thing), it should prolly send an error to if this is an error (or an unexpected thing), it should prolly send an error to `done`, right?
The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected. The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected.
yea id either make it an option or just assume that all streams will be reflected. option is better but more work yea id either make it an option or just assume that all streams will be reflected. option is better but more work
|
|||||||
|
|
||||||
if this is an error (or an unexpected thing), it should prolly send an error to if this is an error (or an unexpected thing), it should prolly send an error to `done`, right?
The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected. The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected.
yea id either make it an option or just assume that all streams will be reflected. option is better but more work yea id either make it an option or just assume that all streams will be reflected. option is better but more work
|
|||||||
|
// Should check to see if wallet is unlocked
|
||||||
if this is an error (or an unexpected thing), it should prolly send an error to if this is an error (or an unexpected thing), it should prolly send an error to `done`, right?
The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected. The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected.
yea id either make it an option or just assume that all streams will be reflected. option is better but more work yea id either make it an option or just assume that all streams will be reflected. option is better but more work
|
|||||||
|
// but jsonrpc.Client doesn't have WalletStatus method
|
||||||
if this is an error (or an unexpected thing), it should prolly send an error to if this is an error (or an unexpected thing), it should prolly send an error to `done`, right?
The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected. The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected.
yea id either make it an option or just assume that all streams will be reflected. option is better but more work yea id either make it an option or just assume that all streams will be reflected. option is better but more work
|
|||||||
|
// so skip for now
|
||||||
if this is an error (or an unexpected thing), it should prolly send an error to if this is an error (or an unexpected thing), it should prolly send an error to `done`, right?
The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected. The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected.
yea id either make it an option or just assume that all streams will be reflected. option is better but more work yea id either make it an option or just assume that all streams will be reflected. option is better but more work
|
|||||||
|
|
||||||
if this is an error (or an unexpected thing), it should prolly send an error to if this is an error (or an unexpected thing), it should prolly send an error to `done`, right?
The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected. The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected.
yea id either make it an option or just assume that all streams will be reflected. option is better but more work yea id either make it an option or just assume that all streams will be reflected. option is better but more work
|
|||||||
|
// Should check to see if streams are configured to be reflected and warn if not
|
||||||
if this is an error (or an unexpected thing), it should prolly send an error to if this is an error (or an unexpected thing), it should prolly send an error to `done`, right?
The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected. The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected.
yea id either make it an option or just assume that all streams will be reflected. option is better but more work yea id either make it an option or just assume that all streams will be reflected. option is better but more work
|
|||||||
|
// but jsonrpc.Client doesn't have SettingsGet method to see if streams are reflected
|
||||||
if this is an error (or an unexpected thing), it should prolly send an error to if this is an error (or an unexpected thing), it should prolly send an error to `done`, right?
The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected. The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected.
yea id either make it an option or just assume that all streams will be reflected. option is better but more work yea id either make it an option or just assume that all streams will be reflected. option is better but more work
|
|||||||
|
// so use File.UploadingToReflector as a proxy for now
|
||||||
if this is an error (or an unexpected thing), it should prolly send an error to if this is an error (or an unexpected thing), it should prolly send an error to `done`, right?
The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected. The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected.
yea id either make it an option or just assume that all streams will be reflected. option is better but more work yea id either make it an option or just assume that all streams will be reflected. option is better but more work
|
|||||||
|
|
||||||
if this is an error (or an unexpected thing), it should prolly send an error to if this is an error (or an unexpected thing), it should prolly send an error to `done`, right?
The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected. The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected.
yea id either make it an option or just assume that all streams will be reflected. option is better but more work yea id either make it an option or just assume that all streams will be reflected. option is better but more work
|
|||||||
|
publisher := LocalSDKPublisher {
|
||||||
if this is an error (or an unexpected thing), it should prolly send an error to if this is an error (or an unexpected thing), it should prolly send an error to `done`, right?
The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected. The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected.
yea id either make it an option or just assume that all streams will be reflected. option is better but more work yea id either make it an option or just assume that all streams will be reflected. option is better but more work
|
|||||||
|
channelID: channelID,
|
||||||
if this is an error (or an unexpected thing), it should prolly send an error to if this is an error (or an unexpected thing), it should prolly send an error to `done`, right?
The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected. The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected.
yea id either make it an option or just assume that all streams will be reflected. option is better but more work yea id either make it an option or just assume that all streams will be reflected. option is better but more work
|
|||||||
|
publishBid: publishBid,
|
||||||
if this is an error (or an unexpected thing), it should prolly send an error to if this is an error (or an unexpected thing), it should prolly send an error to `done`, right?
The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected. The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected.
yea id either make it an option or just assume that all streams will be reflected. option is better but more work yea id either make it an option or just assume that all streams will be reflected. option is better but more work
|
|||||||
|
lbrynet: lbrynet,
|
||||||
if this is an error (or an unexpected thing), it should prolly send an error to if this is an error (or an unexpected thing), it should prolly send an error to `done`, right?
The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected. The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected.
yea id either make it an option or just assume that all streams will be reflected. option is better but more work yea id either make it an option or just assume that all streams will be reflected. option is better but more work
|
|||||||
|
}
|
||||||
if this is an error (or an unexpected thing), it should prolly send an error to if this is an error (or an unexpected thing), it should prolly send an error to `done`, right?
The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected. The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected.
yea id either make it an option or just assume that all streams will be reflected. option is better but more work yea id either make it an option or just assume that all streams will be reflected. option is better but more work
|
|||||||
|
return &publisher, nil
|
||||||
if this is an error (or an unexpected thing), it should prolly send an error to if this is an error (or an unexpected thing), it should prolly send an error to `done`, right?
The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected. The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected.
yea id either make it an option or just assume that all streams will be reflected. option is better but more work yea id either make it an option or just assume that all streams will be reflected. option is better but more work
|
|||||||
|
}
|
||||||
if this is an error (or an unexpected thing), it should prolly send an error to if this is an error (or an unexpected thing), it should prolly send an error to `done`, right?
The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected. The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected.
yea id either make it an option or just assume that all streams will be reflected. option is better but more work yea id either make it an option or just assume that all streams will be reflected. option is better but more work
|
|||||||
|
|
||||||
if this is an error (or an unexpected thing), it should prolly send an error to if this is an error (or an unexpected thing), it should prolly send an error to `done`, right?
The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected. The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected.
yea id either make it an option or just assume that all streams will be reflected. option is better but more work yea id either make it an option or just assume that all streams will be reflected. option is better but more work
|
|||||||
|
func (p *LocalSDKPublisher) Publish(video PublishableVideo) (chan error, error) {
|
||||||
if this is an error (or an unexpected thing), it should prolly send an error to if this is an error (or an unexpected thing), it should prolly send an error to `done`, right?
The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected. The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected.
yea id either make it an option or just assume that all streams will be reflected. option is better but more work yea id either make it an option or just assume that all streams will be reflected. option is better but more work
|
|||||||
|
streamCreateOptions := jsonrpc.StreamCreateOptions {
|
||||||
if this is an error (or an unexpected thing), it should prolly send an error to if this is an error (or an unexpected thing), it should prolly send an error to `done`, right?
The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected. The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected.
yea id either make it an option or just assume that all streams will be reflected. option is better but more work yea id either make it an option or just assume that all streams will be reflected. option is better but more work
|
|||||||
|
ClaimCreateOptions: jsonrpc.ClaimCreateOptions {
|
||||||
if this is an error (or an unexpected thing), it should prolly send an error to if this is an error (or an unexpected thing), it should prolly send an error to `done`, right?
The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected. The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected.
yea id either make it an option or just assume that all streams will be reflected. option is better but more work yea id either make it an option or just assume that all streams will be reflected. option is better but more work
|
|||||||
|
Title: &video.Title,
|
||||||
if this is an error (or an unexpected thing), it should prolly send an error to if this is an error (or an unexpected thing), it should prolly send an error to `done`, right?
The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected. The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected.
yea id either make it an option or just assume that all streams will be reflected. option is better but more work yea id either make it an option or just assume that all streams will be reflected. option is better but more work
|
|||||||
|
Description: &video.Description,
|
||||||
if this is an error (or an unexpected thing), it should prolly send an error to if this is an error (or an unexpected thing), it should prolly send an error to `done`, right?
The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected. The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected.
yea id either make it an option or just assume that all streams will be reflected. option is better but more work yea id either make it an option or just assume that all streams will be reflected. option is better but more work
|
|||||||
|
Languages: video.Languages,
|
||||||
if this is an error (or an unexpected thing), it should prolly send an error to if this is an error (or an unexpected thing), it should prolly send an error to `done`, right?
The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected. The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected.
yea id either make it an option or just assume that all streams will be reflected. option is better but more work yea id either make it an option or just assume that all streams will be reflected. option is better but more work
|
|||||||
|
ThumbnailURL: &video.ThumbnailURL,
|
||||||
if this is an error (or an unexpected thing), it should prolly send an error to if this is an error (or an unexpected thing), it should prolly send an error to `done`, right?
The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected. The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected.
yea id either make it an option or just assume that all streams will be reflected. option is better but more work yea id either make it an option or just assume that all streams will be reflected. option is better but more work
|
|||||||
|
Tags: video.Tags,
|
||||||
if this is an error (or an unexpected thing), it should prolly send an error to if this is an error (or an unexpected thing), it should prolly send an error to `done`, right?
The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected. The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected.
yea id either make it an option or just assume that all streams will be reflected. option is better but more work yea id either make it an option or just assume that all streams will be reflected. option is better but more work
|
|||||||
|
},
|
||||||
if this is an error (or an unexpected thing), it should prolly send an error to if this is an error (or an unexpected thing), it should prolly send an error to `done`, right?
The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected. The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected.
yea id either make it an option or just assume that all streams will be reflected. option is better but more work yea id either make it an option or just assume that all streams will be reflected. option is better but more work
|
|||||||
|
ReleaseTime: &video.ReleaseTime,
|
||||||
if this is an error (or an unexpected thing), it should prolly send an error to if this is an error (or an unexpected thing), it should prolly send an error to `done`, right?
The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected. The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected.
yea id either make it an option or just assume that all streams will be reflected. option is better but more work yea id either make it an option or just assume that all streams will be reflected. option is better but more work
|
|||||||
|
ChannelID: &p.channelID,
|
||||||
if this is an error (or an unexpected thing), it should prolly send an error to if this is an error (or an unexpected thing), it should prolly send an error to `done`, right?
The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected. The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected.
yea id either make it an option or just assume that all streams will be reflected. option is better but more work yea id either make it an option or just assume that all streams will be reflected. option is better but more work
|
|||||||
|
License: util.PtrToString("Copyrighted (contact publisher)"),
|
||||||
if this is an error (or an unexpected thing), it should prolly send an error to if this is an error (or an unexpected thing), it should prolly send an error to `done`, right?
The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected. The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected.
yea id either make it an option or just assume that all streams will be reflected. option is better but more work yea id either make it an option or just assume that all streams will be reflected. option is better but more work
|
|||||||
|
}
|
||||||
if this is an error (or an unexpected thing), it should prolly send an error to if this is an error (or an unexpected thing), it should prolly send an error to `done`, right?
The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected. The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected.
yea id either make it an option or just assume that all streams will be reflected. option is better but more work yea id either make it an option or just assume that all streams will be reflected. option is better but more work
|
|||||||
|
|
||||||
if this is an error (or an unexpected thing), it should prolly send an error to if this is an error (or an unexpected thing), it should prolly send an error to `done`, right?
The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected. The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected.
yea id either make it an option or just assume that all streams will be reflected. option is better but more work yea id either make it an option or just assume that all streams will be reflected. option is better but more work
|
|||||||
|
txSummary, err := p.lbrynet.StreamCreate(video.ClaimName, video.FullLocalPath, p.publishBid, streamCreateOptions)
|
||||||
if this is an error (or an unexpected thing), it should prolly send an error to if this is an error (or an unexpected thing), it should prolly send an error to `done`, right?
The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected. The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected.
yea id either make it an option or just assume that all streams will be reflected. option is better but more work yea id either make it an option or just assume that all streams will be reflected. option is better but more work
|
|||||||
|
if err != nil {
|
||||||
if this is an error (or an unexpected thing), it should prolly send an error to if this is an error (or an unexpected thing), it should prolly send an error to `done`, right?
The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected. The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected.
yea id either make it an option or just assume that all streams will be reflected. option is better but more work yea id either make it an option or just assume that all streams will be reflected. option is better but more work
|
|||||||
|
return nil, err
|
||||||
if this is an error (or an unexpected thing), it should prolly send an error to if this is an error (or an unexpected thing), it should prolly send an error to `done`, right?
The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected. The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected.
yea id either make it an option or just assume that all streams will be reflected. option is better but more work yea id either make it an option or just assume that all streams will be reflected. option is better but more work
|
|||||||
|
}
|
||||||
if this is an error (or an unexpected thing), it should prolly send an error to if this is an error (or an unexpected thing), it should prolly send an error to `done`, right?
The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected. The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected.
yea id either make it an option or just assume that all streams will be reflected. option is better but more work yea id either make it an option or just assume that all streams will be reflected. option is better but more work
|
|||||||
|
|
||||||
if this is an error (or an unexpected thing), it should prolly send an error to if this is an error (or an unexpected thing), it should prolly send an error to `done`, right?
The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected. The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected.
yea id either make it an option or just assume that all streams will be reflected. option is better but more work yea id either make it an option or just assume that all streams will be reflected. option is better but more work
|
|||||||
|
done := make(chan error, 1)
|
||||||
if this is an error (or an unexpected thing), it should prolly send an error to if this is an error (or an unexpected thing), it should prolly send an error to `done`, right?
The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected. The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected.
yea id either make it an option or just assume that all streams will be reflected. option is better but more work yea id either make it an option or just assume that all streams will be reflected. option is better but more work
|
|||||||
|
go func() {
|
||||||
if this is an error (or an unexpected thing), it should prolly send an error to if this is an error (or an unexpected thing), it should prolly send an error to `done`, right?
The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected. The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected.
yea id either make it an option or just assume that all streams will be reflected. option is better but more work yea id either make it an option or just assume that all streams will be reflected. option is better but more work
|
|||||||
|
for {
|
||||||
if this is an error (or an unexpected thing), it should prolly send an error to if this is an error (or an unexpected thing), it should prolly send an error to `done`, right?
The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected. The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected.
yea id either make it an option or just assume that all streams will be reflected. option is better but more work yea id either make it an option or just assume that all streams will be reflected. option is better but more work
|
|||||||
|
fileListResponse, fileIndex, err := findFileByTxid(p.lbrynet, txSummary.Txid)
|
||||||
if this is an error (or an unexpected thing), it should prolly send an error to if this is an error (or an unexpected thing), it should prolly send an error to `done`, right?
The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected. The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected.
yea id either make it an option or just assume that all streams will be reflected. option is better but more work yea id either make it an option or just assume that all streams will be reflected. option is better but more work
|
|||||||
|
if err != nil {
|
||||||
if this is an error (or an unexpected thing), it should prolly send an error to if this is an error (or an unexpected thing), it should prolly send an error to `done`, right?
The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected. The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected.
yea id either make it an option or just assume that all streams will be reflected. option is better but more work yea id either make it an option or just assume that all streams will be reflected. option is better but more work
|
|||||||
|
log.Errorf("Error finding file by txid: %v", err)
|
||||||
if this is an error (or an unexpected thing), it should prolly send an error to if this is an error (or an unexpected thing), it should prolly send an error to `done`, right?
The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected. The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected.
yea id either make it an option or just assume that all streams will be reflected. option is better but more work yea id either make it an option or just assume that all streams will be reflected. option is better but more work
|
|||||||
|
done <- err
|
||||||
if this is an error (or an unexpected thing), it should prolly send an error to if this is an error (or an unexpected thing), it should prolly send an error to `done`, right?
The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected. The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected.
yea id either make it an option or just assume that all streams will be reflected. option is better but more work yea id either make it an option or just assume that all streams will be reflected. option is better but more work
|
|||||||
|
return
|
||||||
if this is an error (or an unexpected thing), it should prolly send an error to if this is an error (or an unexpected thing), it should prolly send an error to `done`, right?
The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected. The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected.
yea id either make it an option or just assume that all streams will be reflected. option is better but more work yea id either make it an option or just assume that all streams will be reflected. option is better but more work
|
|||||||
|
}
|
||||||
if this is an error (or an unexpected thing), it should prolly send an error to if this is an error (or an unexpected thing), it should prolly send an error to `done`, right?
The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected. The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected.
yea id either make it an option or just assume that all streams will be reflected. option is better but more work yea id either make it an option or just assume that all streams will be reflected. option is better but more work
|
|||||||
|
if fileListResponse == nil {
|
||||||
if this is an error (or an unexpected thing), it should prolly send an error to if this is an error (or an unexpected thing), it should prolly send an error to `done`, right?
The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected. The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected.
yea id either make it an option or just assume that all streams will be reflected. option is better but more work yea id either make it an option or just assume that all streams will be reflected. option is better but more work
|
|||||||
|
log.Errorf("Could not find file in list with correct txid")
|
||||||
if this is an error (or an unexpected thing), it should prolly send an error to if this is an error (or an unexpected thing), it should prolly send an error to `done`, right?
The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected. The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected.
yea id either make it an option or just assume that all streams will be reflected. option is better but more work yea id either make it an option or just assume that all streams will be reflected. option is better but more work
|
|||||||
|
done <- err
|
||||||
if this is an error (or an unexpected thing), it should prolly send an error to if this is an error (or an unexpected thing), it should prolly send an error to `done`, right?
The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected. The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected.
yea id either make it an option or just assume that all streams will be reflected. option is better but more work yea id either make it an option or just assume that all streams will be reflected. option is better but more work
|
|||||||
|
return
|
||||||
if this is an error (or an unexpected thing), it should prolly send an error to if this is an error (or an unexpected thing), it should prolly send an error to `done`, right?
The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected. The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected.
yea id either make it an option or just assume that all streams will be reflected. option is better but more work yea id either make it an option or just assume that all streams will be reflected. option is better but more work
|
|||||||
|
}
|
||||||
if this is an error (or an unexpected thing), it should prolly send an error to if this is an error (or an unexpected thing), it should prolly send an error to `done`, right?
The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected. The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected.
yea id either make it an option or just assume that all streams will be reflected. option is better but more work yea id either make it an option or just assume that all streams will be reflected. option is better but more work
|
|||||||
|
|
||||||
if this is an error (or an unexpected thing), it should prolly send an error to if this is an error (or an unexpected thing), it should prolly send an error to `done`, right?
The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected. The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected.
yea id either make it an option or just assume that all streams will be reflected. option is better but more work yea id either make it an option or just assume that all streams will be reflected. option is better but more work
|
|||||||
|
fileStatus := fileListResponse.Items[fileIndex]
|
||||||
if this is an error (or an unexpected thing), it should prolly send an error to if this is an error (or an unexpected thing), it should prolly send an error to `done`, right?
The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected. The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected.
yea id either make it an option or just assume that all streams will be reflected. option is better but more work yea id either make it an option or just assume that all streams will be reflected. option is better but more work
|
|||||||
|
if fileStatus.IsFullyReflected {
|
||||||
if this is an error (or an unexpected thing), it should prolly send an error to if this is an error (or an unexpected thing), it should prolly send an error to `done`, right?
The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected. The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected.
yea id either make it an option or just assume that all streams will be reflected. option is better but more work yea id either make it an option or just assume that all streams will be reflected. option is better but more work
|
|||||||
|
log.Info("Stream is fully reflected")
|
||||||
if this is an error (or an unexpected thing), it should prolly send an error to if this is an error (or an unexpected thing), it should prolly send an error to `done`, right?
The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected. The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected.
yea id either make it an option or just assume that all streams will be reflected. option is better but more work yea id either make it an option or just assume that all streams will be reflected. option is better but more work
|
|||||||
|
break
|
||||||
if this is an error (or an unexpected thing), it should prolly send an error to if this is an error (or an unexpected thing), it should prolly send an error to `done`, right?
The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected. The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected.
yea id either make it an option or just assume that all streams will be reflected. option is better but more work yea id either make it an option or just assume that all streams will be reflected. option is better but more work
|
|||||||
|
}
|
||||||
if this is an error (or an unexpected thing), it should prolly send an error to if this is an error (or an unexpected thing), it should prolly send an error to `done`, right?
The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected. The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected.
yea id either make it an option or just assume that all streams will be reflected. option is better but more work yea id either make it an option or just assume that all streams will be reflected. option is better but more work
|
|||||||
|
if !fileStatus.UploadingToReflector {
|
||||||
if this is an error (or an unexpected thing), it should prolly send an error to if this is an error (or an unexpected thing), it should prolly send an error to `done`, right?
The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected. The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected.
yea id either make it an option or just assume that all streams will be reflected. option is better but more work yea id either make it an option or just assume that all streams will be reflected. option is better but more work
|
|||||||
|
log.Warn("Stream is not being uploaded to a reflector. Check your lbrynet settings if this is a mistake.")
|
||||||
if this is an error (or an unexpected thing), it should prolly send an error to if this is an error (or an unexpected thing), it should prolly send an error to `done`, right?
The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected. The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected.
yea id either make it an option or just assume that all streams will be reflected. option is better but more work yea id either make it an option or just assume that all streams will be reflected. option is better but more work
|
|||||||
|
break
|
||||||
if this is an error (or an unexpected thing), it should prolly send an error to if this is an error (or an unexpected thing), it should prolly send an error to `done`, right?
The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected. The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected.
yea id either make it an option or just assume that all streams will be reflected. option is better but more work yea id either make it an option or just assume that all streams will be reflected. option is better but more work
|
|||||||
|
}
|
||||||
if this is an error (or an unexpected thing), it should prolly send an error to if this is an error (or an unexpected thing), it should prolly send an error to `done`, right?
The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected. The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected.
yea id either make it an option or just assume that all streams will be reflected. option is better but more work yea id either make it an option or just assume that all streams will be reflected. option is better but more work
|
|||||||
|
log.Infof("Stream reflector progress: %d%%", fileStatus.ReflectorProgress)
|
||||||
if this is an error (or an unexpected thing), it should prolly send an error to if this is an error (or an unexpected thing), it should prolly send an error to `done`, right?
The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected. The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected.
yea id either make it an option or just assume that all streams will be reflected. option is better but more work yea id either make it an option or just assume that all streams will be reflected. option is better but more work
|
|||||||
|
time.Sleep(5 * time.Second)
|
||||||
if this is an error (or an unexpected thing), it should prolly send an error to if this is an error (or an unexpected thing), it should prolly send an error to `done`, right?
The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected. The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected.
yea id either make it an option or just assume that all streams will be reflected. option is better but more work yea id either make it an option or just assume that all streams will be reflected. option is better but more work
|
|||||||
|
}
|
||||||
if this is an error (or an unexpected thing), it should prolly send an error to if this is an error (or an unexpected thing), it should prolly send an error to `done`, right?
The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected. The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected.
yea id either make it an option or just assume that all streams will be reflected. option is better but more work yea id either make it an option or just assume that all streams will be reflected. option is better but more work
|
|||||||
|
done <- nil
|
||||||
if this is an error (or an unexpected thing), it should prolly send an error to if this is an error (or an unexpected thing), it should prolly send an error to `done`, right?
The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected. The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected.
yea id either make it an option or just assume that all streams will be reflected. option is better but more work yea id either make it an option or just assume that all streams will be reflected. option is better but more work
|
|||||||
|
}()
|
||||||
if this is an error (or an unexpected thing), it should prolly send an error to if this is an error (or an unexpected thing), it should prolly send an error to `done`, right?
The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected. The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected.
yea id either make it an option or just assume that all streams will be reflected. option is better but more work yea id either make it an option or just assume that all streams will be reflected. option is better but more work
|
|||||||
|
|
||||||
if this is an error (or an unexpected thing), it should prolly send an error to if this is an error (or an unexpected thing), it should prolly send an error to `done`, right?
The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected. The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected.
yea id either make it an option or just assume that all streams will be reflected. option is better but more work yea id either make it an option or just assume that all streams will be reflected. option is better but more work
|
|||||||
|
return done, nil
|
||||||
if this is an error (or an unexpected thing), it should prolly send an error to if this is an error (or an unexpected thing), it should prolly send an error to `done`, right?
The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected. The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected.
yea id either make it an option or just assume that all streams will be reflected. option is better but more work yea id either make it an option or just assume that all streams will be reflected. option is better but more work
|
|||||||
|
}
|
||||||
if this is an error (or an unexpected thing), it should prolly send an error to if this is an error (or an unexpected thing), it should prolly send an error to `done`, right?
The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected. The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected.
yea id either make it an option or just assume that all streams will be reflected. option is better but more work yea id either make it an option or just assume that all streams will be reflected. option is better but more work
|
|||||||
|
|
||||||
if this is an error (or an unexpected thing), it should prolly send an error to if this is an error (or an unexpected thing), it should prolly send an error to `done`, right?
The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected. The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected.
yea id either make it an option or just assume that all streams will be reflected. option is better but more work yea id either make it an option or just assume that all streams will be reflected. option is better but more work
|
|||||||
|
// if jsonrpc.Client.FileList is extended to match the actual jsonrpc schema, this can be removed
|
||||||
if this is an error (or an unexpected thing), it should prolly send an error to if this is an error (or an unexpected thing), it should prolly send an error to `done`, right?
The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected. The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected.
yea id either make it an option or just assume that all streams will be reflected. option is better but more work yea id either make it an option or just assume that all streams will be reflected. option is better but more work
|
|||||||
|
func findFileByTxid(client *jsonrpc.Client, txid string) (*jsonrpc.FileListResponse, int, error) {
|
||||||
if this is an error (or an unexpected thing), it should prolly send an error to if this is an error (or an unexpected thing), it should prolly send an error to `done`, right?
The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected. The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected.
yea id either make it an option or just assume that all streams will be reflected. option is better but more work yea id either make it an option or just assume that all streams will be reflected. option is better but more work
|
|||||||
|
response, err := client.FileList(0, 20)
|
||||||
if this is an error (or an unexpected thing), it should prolly send an error to if this is an error (or an unexpected thing), it should prolly send an error to `done`, right?
The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected. The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected.
yea id either make it an option or just assume that all streams will be reflected. option is better but more work yea id either make it an option or just assume that all streams will be reflected. option is better but more work
|
|||||||
|
for {
|
||||||
if this is an error (or an unexpected thing), it should prolly send an error to if this is an error (or an unexpected thing), it should prolly send an error to `done`, right?
The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected. The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected.
yea id either make it an option or just assume that all streams will be reflected. option is better but more work yea id either make it an option or just assume that all streams will be reflected. option is better but more work
|
|||||||
|
if err != nil {
|
||||||
if this is an error (or an unexpected thing), it should prolly send an error to if this is an error (or an unexpected thing), it should prolly send an error to `done`, right?
The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected. The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected.
yea id either make it an option or just assume that all streams will be reflected. option is better but more work yea id either make it an option or just assume that all streams will be reflected. option is better but more work
|
|||||||
|
log.Errorf("Error getting file list page: %v", err)
|
||||||
if this is an error (or an unexpected thing), it should prolly send an error to if this is an error (or an unexpected thing), it should prolly send an error to `done`, right?
The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected. The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected.
yea id either make it an option or just assume that all streams will be reflected. option is better but more work yea id either make it an option or just assume that all streams will be reflected. option is better but more work
|
|||||||
|
return nil, 0, err
|
||||||
if this is an error (or an unexpected thing), it should prolly send an error to if this is an error (or an unexpected thing), it should prolly send an error to `done`, right?
The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected. The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected.
yea id either make it an option or just assume that all streams will be reflected. option is better but more work yea id either make it an option or just assume that all streams will be reflected. option is better but more work
|
|||||||
|
}
|
||||||
if this is an error (or an unexpected thing), it should prolly send an error to if this is an error (or an unexpected thing), it should prolly send an error to `done`, right?
The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected. The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected.
yea id either make it an option or just assume that all streams will be reflected. option is better but more work yea id either make it an option or just assume that all streams will be reflected. option is better but more work
|
|||||||
|
index := sort.Search(len(response.Items), func (i int) bool { return response.Items[i].Txid == txid })
|
||||||
if this is an error (or an unexpected thing), it should prolly send an error to if this is an error (or an unexpected thing), it should prolly send an error to `done`, right?
The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected. The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected.
yea id either make it an option or just assume that all streams will be reflected. option is better but more work yea id either make it an option or just assume that all streams will be reflected. option is better but more work
|
|||||||
|
if index < len(response.Items) {
|
||||||
if this is an error (or an unexpected thing), it should prolly send an error to if this is an error (or an unexpected thing), it should prolly send an error to `done`, right?
The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected. The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected.
yea id either make it an option or just assume that all streams will be reflected. option is better but more work yea id either make it an option or just assume that all streams will be reflected. option is better but more work
|
|||||||
|
return response, index, nil
|
||||||
if this is an error (or an unexpected thing), it should prolly send an error to if this is an error (or an unexpected thing), it should prolly send an error to `done`, right?
The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected. The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected.
yea id either make it an option or just assume that all streams will be reflected. option is better but more work yea id either make it an option or just assume that all streams will be reflected. option is better but more work
|
|||||||
|
}
|
||||||
if this is an error (or an unexpected thing), it should prolly send an error to if this is an error (or an unexpected thing), it should prolly send an error to `done`, right?
The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected. The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected.
yea id either make it an option or just assume that all streams will be reflected. option is better but more work yea id either make it an option or just assume that all streams will be reflected. option is better but more work
|
|||||||
|
if response.Page >= response.TotalPages {
|
||||||
if this is an error (or an unexpected thing), it should prolly send an error to if this is an error (or an unexpected thing), it should prolly send an error to `done`, right?
The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected. The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected.
yea id either make it an option or just assume that all streams will be reflected. option is better but more work yea id either make it an option or just assume that all streams will be reflected. option is better but more work
|
|||||||
|
return nil, 0, nil
|
||||||
if this is an error (or an unexpected thing), it should prolly send an error to if this is an error (or an unexpected thing), it should prolly send an error to `done`, right?
The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected. The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected.
yea id either make it an option or just assume that all streams will be reflected. option is better but more work yea id either make it an option or just assume that all streams will be reflected. option is better but more work
|
|||||||
|
}
|
||||||
if this is an error (or an unexpected thing), it should prolly send an error to if this is an error (or an unexpected thing), it should prolly send an error to `done`, right?
The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected. The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected.
yea id either make it an option or just assume that all streams will be reflected. option is better but more work yea id either make it an option or just assume that all streams will be reflected. option is better but more work
|
|||||||
|
response, err = client.FileList(response.Page + 1, 20)
|
||||||
if this is an error (or an unexpected thing), it should prolly send an error to if this is an error (or an unexpected thing), it should prolly send an error to `done`, right?
The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected. The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected.
yea id either make it an option or just assume that all streams will be reflected. option is better but more work yea id either make it an option or just assume that all streams will be reflected. option is better but more work
|
|||||||
|
}
|
||||||
if this is an error (or an unexpected thing), it should prolly send an error to if this is an error (or an unexpected thing), it should prolly send an error to `done`, right?
The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected. The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected.
yea id either make it an option or just assume that all streams will be reflected. option is better but more work yea id either make it an option or just assume that all streams will be reflected. option is better but more work
|
|||||||
|
}
|
||||||
if this is an error (or an unexpected thing), it should prolly send an error to if this is an error (or an unexpected thing), it should prolly send an error to `done`, right?
The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected. The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected.
yea id either make it an option or just assume that all streams will be reflected. option is better but more work yea id either make it an option or just assume that all streams will be reflected. option is better but more work
|
202
local/ytdl.go
Normal file
|
@ -0,0 +1,202 @@
|
||||||
|
package local
|
||||||
|
|
||||||
|
import (
|
||||||
|
"encoding/json"
|
||||||
|
"errors"
|
||||||
|
"fmt"
|
||||||
|
"io/ioutil"
|
||||||
|
"os"
|
||||||
|
"os/exec"
|
||||||
|
"path"
|
||||||
|
"strings"
|
||||||
|
|
||||||
|
log "github.com/sirupsen/logrus"
|
||||||
|
|
||||||
|
"github.com/lbryio/ytsync/v5/downloader/ytdl"
|
||||||
|
)
|
||||||
|
|
||||||
|
type Ytdl struct {
|
||||||
|
DownloadDir string
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewYtdl(downloadDir string) (*Ytdl, error) {
|
||||||
|
// TODO validate download dir
|
||||||
|
|
||||||
|
y := Ytdl {
|
||||||
|
DownloadDir: downloadDir,
|
||||||
|
}
|
||||||
|
|
||||||
|
return &y, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (y *Ytdl) GetVideoMetadata(videoID string) (*ytdl.YtdlVideo, error) {
|
||||||
|
metadataPath, err := y.GetVideoMetadataFile(videoID)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
metadataBytes, err := os.ReadFile(metadataPath)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
var metadata *ytdl.YtdlVideo
|
||||||
|
err = json.Unmarshal(metadataBytes, &metadata)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
return metadata, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (y *Ytdl) GetVideoMetadataFile(videoID string) (string, error) {
|
||||||
|
basePath := path.Join(y.DownloadDir, videoID)
|
||||||
|
metadataPath := basePath + ".info.json"
|
||||||
|
|
||||||
|
_, err := os.Stat(metadataPath)
|
||||||
|
if err != nil && !os.IsNotExist(err) {
|
||||||
|
log.Errorf("Error determining if video metadata already exists: %v", err)
|
||||||
|
return "", err
|
||||||
|
} else if err != nil {
|
||||||
|
log.Debugf("Metadata file for video %s does not exist. Downloading now.", videoID)
|
||||||
|
err = downloadVideoMetadata(basePath, videoID)
|
||||||
|
if err != nil {
|
||||||
|
return "", err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return metadataPath, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (y *Ytdl) GetVideoFile(videoID string) (string, error) {
|
||||||
|
videoPath, err := findDownloadedVideo(y.DownloadDir, videoID)
|
||||||
|
if err != nil {
|
||||||
|
return "", err
|
||||||
|
}
|
||||||
|
|
||||||
|
if videoPath != nil {
|
||||||
|
return *videoPath, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
basePath := path.Join(y.DownloadDir, videoID)
|
||||||
|
metadataPath, err := y.GetVideoMetadataFile(videoID)
|
||||||
|
if err != nil {
|
||||||
|
log.Errorf("Error getting metadata path in preparation for video download: %v", err)
|
||||||
|
return "", err
|
||||||
|
}
|
||||||
|
err = downloadVideo(basePath, metadataPath)
|
||||||
|
if err != nil {
|
||||||
|
return "", nil
|
||||||
|
}
|
||||||
|
|
||||||
|
videoPath, err = findDownloadedVideo(y.DownloadDir, videoID)
|
||||||
|
if err != nil {
|
||||||
|
log.Errorf("Error from findDownloadedVideo() after already succeeding once: %v", err)
|
||||||
|
return "", err
|
||||||
|
}
|
||||||
|
if videoPath == nil {
|
||||||
|
return "", errors.New("Could not find a downloaded video after successful download.")
|
||||||
|
}
|
||||||
|
|
||||||
|
return *videoPath, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func findDownloadedVideo(videoDir, videoID string) (*string, error) {
|
||||||
|
files, err := ioutil.ReadDir(videoDir)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
for _, f := range files {
|
||||||
|
if f.IsDir() {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
if path.Ext(f.Name()) == ".mp4" && strings.Contains(f.Name(), videoID) {
|
||||||
|
videoPath := path.Join(videoDir, f.Name())
|
||||||
|
return &videoPath, nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return nil, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func downloadVideoMetadata(basePath, videoID string) error {
|
||||||
|
ytdlArgs := []string{
|
||||||
|
"--skip-download",
|
||||||
|
"--write-info-json",
|
||||||
|
"--force-overwrites",
|
||||||
|
fmt.Sprintf("https://www.youtube.com/watch?v=%s", videoID),
|
||||||
|
"--cookies",
|
||||||
|
"cookies.txt",
|
||||||
|
"-o",
|
||||||
|
basePath,
|
||||||
|
}
|
||||||
|
ytdlCmd := exec.Command("yt-dlp", ytdlArgs...)
|
||||||
|
output, err := runCmd(ytdlCmd)
|
||||||
|
log.Debug(output)
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
func downloadVideo(basePath, metadataPath string) error {
|
||||||
|
ytdlArgs := []string{
|
||||||
|
"--no-progress",
|
||||||
|
"-o",
|
||||||
|
basePath,
|
||||||
|
"--merge-output-format",
|
||||||
|
"mp4",
|
||||||
|
"--postprocessor-args",
|
||||||
|
"ffmpeg:-movflags faststart",
|
||||||
|
"--abort-on-unavailable-fragment",
|
||||||
|
"--fragment-retries",
|
||||||
|
"1",
|
||||||
|
"--cookies",
|
||||||
|
"cookies.txt",
|
||||||
|
"--extractor-args",
|
||||||
|
"youtube:player_client=android",
|
||||||
|
"--load-info-json",
|
||||||
|
metadataPath,
|
||||||
|
"-fbestvideo[ext=mp4][vcodec!*=av01][height<=720]+bestaudio[ext!=webm][format_id!=258][format_id!=251][format_id!=256][format_id!=327]",
|
||||||
|
}
|
||||||
|
|
||||||
|
ytdlCmd := exec.Command("yt-dlp", ytdlArgs...)
|
||||||
|
output, err := runCmd(ytdlCmd)
|
||||||
|
log.Debug(output)
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
func runCmd(cmd *exec.Cmd) ([]string, error) {
|
||||||
|
log.Infof("running cmd: %s", strings.Join(cmd.Args, " "))
|
||||||
|
var err error
|
||||||
|
stderr, err := cmd.StderrPipe()
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
stdout, err := cmd.StdoutPipe()
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
err = cmd.Start()
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
outLog, err := ioutil.ReadAll(stdout)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
errorLog, err := ioutil.ReadAll(stderr)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
done := make(chan error, 1)
|
||||||
|
go func() {
|
||||||
|
done <- cmd.Wait()
|
||||||
|
}()
|
||||||
|
|
||||||
|
select {
|
||||||
|
case err := <-done:
|
||||||
|
if err != nil {
|
||||||
|
log.Error(string(errorLog))
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return strings.Split(strings.Replace(string(outLog), "\r\n", "\n", -1), "\n"), nil
|
||||||
|
}
|
||||||
|
}
|
54
local/ytdlVideoSource.go
Normal file
|
@ -0,0 +1,54 @@
|
||||||
|
package local
|
||||||
|
|
||||||
|
import (
|
||||||
|
"time"
|
||||||
|
|
||||||
|
log "github.com/sirupsen/logrus"
|
||||||
|
|
||||||
|
"github.com/lbryio/lbry.go/v2/extras/util"
|
||||||
|
)
|
||||||
|
|
||||||
|
type YtdlVideoSource struct {
|
||||||
|
downloader Ytdl
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewYtdlVideoSource(downloadDir string) (*YtdlVideoSource, error) {
|
||||||
|
ytdl, err := NewYtdl(downloadDir)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
source := YtdlVideoSource {
|
||||||
|
downloader: *ytdl,
|
||||||
|
}
|
||||||
|
|
||||||
|
return &source, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *YtdlVideoSource) GetVideo(id string) (*SourceVideo, error) {
|
||||||
|
metadata, err := s.downloader.GetVideoMetadata(id)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
videoPath, err := s.downloader.GetVideoFile(id)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
sourceVideo := SourceVideo {
|
||||||
|
ID: id,
|
||||||
|
Title: &metadata.Title,
|
||||||
|
Description: &metadata.Description,
|
||||||
|
SourceURL: "\nhttps://www.youtube.com/watch?v=" + id,
|
||||||
|
Languages: []string{},
|
||||||
|
Tags: metadata.Tags,
|
||||||
|
ReleaseTime: util.PtrToInt64(time.Now().Unix()),
|
||||||
|
ThumbnailURL: nil,
|
||||||
|
FullLocalPath: videoPath,
|
||||||
|
}
|
||||||
|
|
||||||
|
log.Debugf("Source video retrieved via ytdl: %v", sourceVideo)
|
||||||
|
|
||||||
|
return &sourceVideo, nil
|
||||||
|
}
|
i recommend os.ReadFile() to read the file in one go