Download video to sync to local cache #113
239
local/local.go
|
@ -1,22 +1,253 @@
|
||||||
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how 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 :-)
|
|||||||
package local
|
package local
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"errors"
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how 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 :-)
|
|||||||
|
"os"
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
|
"regexp"
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of 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"
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of 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"
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of 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 "github.com/sirupsen/logrus"
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of 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/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
|
"github.com/abadojack/whatlanggo"
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how 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/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 :-)
|
|||||||
|
"github.com/lbryio/ytsync/v5/namer"
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of 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/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 :-)
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
type SyncContext 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 :-)
|
|||||||
|
DryRun bool
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
|
KeepCache bool
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
|
ReflectStreams bool
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
|
TempDir 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 :-)
|
|||||||
|
LbrynetAddr 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 :-)
|
|||||||
|
ChannelID 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 :-)
|
|||||||
|
PublishBid float64
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
|
YouTubeSourceConfig *YouTubeSourceConfig
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how 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 (c *SyncContext) Validate() 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 :-)
|
|||||||
|
if c.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 :-)
|
|||||||
|
return errors.New("No TempDir provided")
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how 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 c.LbrynetAddr == "" {
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of 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 errors.New("No Lbrynet address provided")
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how 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 c.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 :-)
|
|||||||
|
return errors.New("No channel ID provided")
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how 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 c.PublishBid <= 0.0 {
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of 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 errors.New("Publish bid is not greater than zero")
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how 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
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how 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 YouTubeSourceConfig 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 :-)
|
|||||||
|
YouTubeAPIKey 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 :-)
|
|||||||
|
var syncContext SyncContext
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how 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 AddCommand(rootCmd *cobra.Command) {
|
func AddCommand(rootCmd *cobra.Command) {
|
||||||
cmd := &cobra.Command{
|
cmd := &cobra.Command{
|
||||||
Use: "local",
|
Use: "local",
|
||||||
Short: "run a personal ytsync",
|
Short: "run a personal ytsync",
|
||||||
Run: localCmd,
|
Run: localCmd,
|
||||||
|
Args: cobra.ExactArgs(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 :-)
|
|||||||
}
|
}
|
||||||
//cmd.Flags().StringVar(&cache, "cache", "", "path to cache")
|
cmd.Flags().BoolVar(&syncContext.DryRun, "dry-run", false, "Display information about the stream publishing, but do not publish the stream")
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how 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 :-)
|
|||||||
rootCmd.AddCommand(cmd)
|
cmd.Flags().BoolVar(&syncContext.KeepCache, "keep-cache", false, "Don't delete local files after publishing.")
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how 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 :-)
|
|||||||
|
cmd.Flags().BoolVar(&syncContext.ReflectStreams, "reflect-streams", true, "Require published streams to be 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 :-)
|
|||||||
|
cmd.Flags().StringVar(&syncContext.TempDir, "temp-dir", getEnvDefault("TEMP_DIR", ""), "directory to use for temporary files")
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
|
cmd.Flags().Float64Var(&syncContext.PublishBid, "publish-bid", 0.01, "Bid amount for the stream claim")
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
|
cmd.Flags().StringVar(&syncContext.LbrynetAddr, "lbrynet-address", getEnvDefault("LBRYNET_ADDRESS", ""), "JSONRPC address of the local LBRYNet daemon")
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
|
cmd.Flags().StringVar(&syncContext.ChannelID, "channel-id", "", "LBRY channel ID to publish to")
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of 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 now, assume source is always YouTube
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
|
syncContext.YouTubeSourceConfig = &YouTubeSourceConfig{}
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
|
cmd.Flags().StringVar(&syncContext.YouTubeSourceConfig.YouTubeAPIKey, "youtube-api-key", getEnvDefault("YOUTUBE_API_KEY", ""), "YouTube API Key")
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
|
rootCmd.AddCommand(cmd)
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how 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 getEnvDefault(key, defaultValue string) 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 :-)
|
|||||||
|
if value, ok := os.LookupEnv(key); ok {
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of 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 value
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how 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 defaultValue
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of 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 localCmd(cmd *cobra.Command, args []string) {
|
func localCmd(cmd *cobra.Command, args []string) {
|
||||||
fmt.Println("local")
|
err := syncContext.Validate()
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how 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 :-)
|
|||||||
|
log.Error(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 :-)
|
|||||||
|
videoID := args[0]
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how 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("Running sync for 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 :-)
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
|
|||||||
|
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 :-)
|
|||||||
|
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 {
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of 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 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 :-)
|
|||||||
|
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 :-)
|
|||||||
|
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 :-)
|
|||||||
|
if syncContext.YouTubeSourceConfig != 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 :-)
|
|||||||
|
videoSource, err = NewYtdlVideoSource(syncContext.TempDir, syncContext.YouTubeSourceConfig)
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of 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 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
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how 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 :-)
|
|||||||
|
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 :-)
|
|||||||
|
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 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 :-)
|
|||||||
|
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 :-)
|
|||||||
|
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 :-)
|
|||||||
|
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 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 :-)
|
|||||||
|
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 :-)
|
|||||||
|
if syncContext.DryRun {
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of 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.Infoln("This is a dry run. Nothing will be published.")
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of 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("The local file %s would be published to channel ID %s as %s.", processedVideo.FullLocalPath, syncContext.ChannelID, processedVideo.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 :-)
|
|||||||
|
log.Debugf("Object to be published: %v", 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 :-)
|
|||||||
|
} else {
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
|||||||
|
doneReflectingCh, err := publisher.Publish(*processedVideo, syncContext.ReflectStreams)
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of 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 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 :-)
|
|||||||
|
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 :-)
|
|||||||
|
if syncContext.ReflectStreams {
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of 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 = <-doneReflectingCh
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of 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 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 :-)
|
|||||||
|
} else {
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of 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.Debugln("Not waiting for stream to reflect.")
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how 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 !syncContext.KeepCache {
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of 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("Deleting local files.")
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of 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 = videoSource.DeleteLocalCache(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 {
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of 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 deleting local files for video %s: %v", videoID, 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 :-)
|
|||||||
|
log.Info("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 :-)
|
|||||||
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of 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 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 :-)
|
|||||||
|
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 :-)
|
|||||||
|
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 :-)
|
|||||||
|
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 :-)
|
|||||||
|
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 :-)
|
|||||||
|
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 :-)
|
|||||||
|
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 :-)
|
|||||||
|
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 :-)
|
|||||||
|
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 :-)
|
|||||||
|
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 :-)
|
|||||||
|
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 := 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 :-)
|
|||||||
|
if 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 = util.PtrToString("")
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how 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 :-)
|
|||||||
|
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 :-)
|
|||||||
|
if releaseTime == 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 :-)
|
|||||||
|
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 :-)
|
|||||||
|
}
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how 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: *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 :-)
|
|||||||
|
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 :-)
|
|||||||
|
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 :-)
|
|||||||
|
additionalDescription := "\n...\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 :-)
|
|||||||
|
maxLength := 2800 - len(additionalDescription)
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how 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 := 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 :-)
|
|||||||
|
if len(description) > maxLength {
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of 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 = description[:maxLength]
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how 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 description + additionalDescription
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how 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 :-)
|
|||||||
|
DeleteLocalCache(id 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 :-)
|
|||||||
|
|
||||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of 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, reflectStream bool) (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 :-)
|
125
local/localSDKPublisher.go
Normal file
|
@ -0,0 +1,125 @@
|
||||||
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, reflectStream bool) (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
|
|||||||
|
if !reflectStream {
|
||||||
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, 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
|
|||||||
|
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.Error("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
|
|||||||
|
done <- errors.New("Stream is not being reflected (check lbrynet settings).")
|
||||||
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
|
|||||||
|
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
|
|
@ -5,6 +5,7 @@
|
||||||
- LBRY SDK (what do we actually need this for?)
|
- LBRY SDK (what do we actually need this for?)
|
||||||
- youtube-dl
|
- youtube-dl
|
||||||
- enough space to cache stuff
|
- enough space to cache stuff
|
||||||
|
- YouTube data API key
|
||||||
|
|
||||||
|
|
||||||
## Process
|
## Process
|
||||||
|
@ -15,6 +16,21 @@
|
||||||
- or easier, just error if no channel
|
- or easier, just error if no channel
|
||||||
- enough lbc in wallet?
|
- enough lbc in wallet?
|
||||||
|
|
||||||
|
### Getting a YouTube API key
|
||||||
|
|
||||||
|
To access the YouTube data API, you will first need some kind of google account.
|
||||||
|
|
||||||
|
The API has two methods of authentication, OAuth2 and API keys. This application uses API keys.
|
||||||
|
These API keys are basically like passwords, and so once obtained, they should not be shared.
|
||||||
|
|
||||||
|
The instructions for obtaining an API key are copied below from [here](https://developers.google.com/youtube/registering_an_application):
|
||||||
|
|
||||||
|
|
||||||
|
1. Open the [Credentials page](https://console.developers.google.com/apis/credentials) in the API Console.
|
||||||
|
2. Create an API key in the Console by clicking **Create credentials > API key**. You can restrict the key before using it in production by clicking **Restrict key** and selecting one of the **Restrictions**.
|
||||||
|
|
||||||
|
To keep your API keys secure, follow the [best practices for securely using API keys](https://cloud.google.com/docs/authentication/api-keys).
|
||||||
|
|
||||||
### Options to figure out what's already synced
|
### Options to figure out what's already synced
|
||||||
|
|
||||||
- simplest: assume nothing is synced yet
|
- simplest: assume nothing is synced yet
|
||||||
|
|
45
local/youtubeEnricher.go
Normal file
|
@ -0,0 +1,45 @@
|
||||||
|
package local
|
||||||
|
|
||||||
|
import (
|
||||||
|
"time"
|
||||||
|
|
||||||
|
log "github.com/sirupsen/logrus"
|
||||||
|
|
||||||
|
"github.com/lbryio/lbry.go/v2/extras/util"
|
||||||
|
)
|
||||||
|
|
||||||
|
type YouTubeVideoEnricher interface {
|
||||||
|
EnrichMissing(source *SourceVideo) error
|
||||||
|
}
|
||||||
|
|
||||||
|
type YouTubeAPIVideoEnricher struct {
|
||||||
|
api *YouTubeAPI
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewYouTubeAPIVideoEnricher(apiKey string) (*YouTubeAPIVideoEnricher) {
|
||||||
|
enricher := YouTubeAPIVideoEnricher{
|
||||||
|
api: NewYouTubeAPI(apiKey),
|
||||||
so the best way to get the release time was via the api? if so, can you include instructions in your PR on what a user would need to do to get an api key? we'd also want to add handling in a later version for exceeding api limits so the best way to get the release time was via the api? if so, can you include instructions in your PR on what a user would need to do to get an api key? we'd also want to add handling in a later version for exceeding api limits
This was the simplest and most direct way, and the API limits seem like more than enough for the single channel use-case (except on initial channel sync). Should I add the instructions to the local/readme.md? This was the simplest and most direct way, and the API limits seem like more than enough for the single channel use-case (except on initial channel sync). Should I add the instructions to the local/readme.md?
yea yea
maybe add a note to the issue to give the user a good error message if the api runs out of credits, and stop the sync. getting the release time right is fairly important so we don't want to guess or leave it empty. this could go under v4 maybe add a note to the issue to give the user a good error message if the api runs out of credits, and stop the sync. getting the release time right is fairly important so we don't want to guess or leave it empty. this could go under v4
|
|||||||
|
}
|
||||||
|
return &enricher
|
||||||
|
}
|
||||||
|
|
||||||
|
func (e *YouTubeAPIVideoEnricher) EnrichMissing(source *SourceVideo) error {
|
||||||
|
if source.ReleaseTime != nil {
|
||||||
|
log.Debugf("Video %s does not need enrichment. YouTubeAPIVideoEnricher is skipping.", source.ID)
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
snippet, err := e.api.GetVideoSnippet(source.ID)
|
||||||
|
if err != nil {
|
||||||
|
log.Errorf("Error snippet data for video %s: %v", err)
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
publishedAt, err := time.Parse(time.RFC3339, snippet.PublishedAt)
|
||||||
|
if err != nil {
|
||||||
|
log.Errorf("Error converting publishedAt to timestamp: %v", err)
|
||||||
|
} else {
|
||||||
|
source.ReleaseTime = util.PtrToInt64(publishedAt.Unix())
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
83
local/ytapi.go
Normal file
|
@ -0,0 +1,83 @@
|
||||||
|
package local
|
||||||
|
|
||||||
|
import (
|
||||||
|
"encoding/json"
|
||||||
|
"fmt"
|
||||||
|
"io"
|
||||||
|
"net/http"
|
||||||
|
"time"
|
||||||
|
|
||||||
|
log "github.com/sirupsen/logrus"
|
||||||
|
)
|
||||||
|
|
||||||
|
type YouTubeAPI struct {
|
||||||
|
apiKey string
|
||||||
|
client *http.Client
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewYouTubeAPI(apiKey string) (*YouTubeAPI) {
|
||||||
|
client := &http.Client {
|
||||||
|
Transport: &http.Transport{
|
||||||
|
MaxIdleConns: 10,
|
||||||
|
IdleConnTimeout: 30 * time.Second,
|
||||||
|
DisableCompression: true,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
api := YouTubeAPI {
|
||||||
|
apiKey: apiKey,
|
||||||
|
client: client,
|
||||||
|
}
|
||||||
|
|
||||||
|
return &api
|
||||||
|
}
|
||||||
|
|
||||||
|
func (a *YouTubeAPI) GetVideoSnippet(videoID string) (*VideoSnippet, error) {
|
||||||
|
req, err := http.NewRequest("GET", "https://youtube.googleapis.com/youtube/v3/videos", nil)
|
||||||
|
if err != nil {
|
||||||
|
log.Errorf("Error creating http client for YouTube API: %v", err)
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
query := req.URL.Query()
|
||||||
|
query.Add("part", "snippet")
|
||||||
|
query.Add("id", videoID)
|
||||||
|
query.Add("key", a.apiKey)
|
||||||
|
req.URL.RawQuery = query.Encode()
|
||||||
|
|
||||||
|
req.Header.Add("Accept", "application/json")
|
||||||
|
|
||||||
|
resp, err := a.client.Do(req)
|
||||||
|
defer resp.Body.Close()
|
||||||
|
if err != nil {
|
||||||
|
log.Errorf("Error from YouTube API: %v", err)
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
body, err := io.ReadAll(resp.Body)
|
||||||
|
log.Tracef("Response from YouTube API: %s", string(body[:]))
|
||||||
|
|
||||||
|
var result videoListResponse
|
||||||
|
err = json.Unmarshal(body, &result)
|
||||||
|
if err != nil {
|
||||||
|
log.Errorf("Error deserializing video list response from YouTube API: %v", err)
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if len(result.Items) != 1 {
|
||||||
|
err = fmt.Errorf("YouTube API responded with incorrect number of snippets (%d) while attempting to get snippet data for video %s", len(result.Items), videoID)
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
return &result.Items[0].Snippet, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
type videoListResponse struct {
|
||||||
|
Items []struct {
|
||||||
|
Snippet VideoSnippet `json:"snippet"`
|
||||||
|
} `json:"items"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type VideoSnippet struct {
|
||||||
|
PublishedAt string `json:"publishedAt"`
|
||||||
|
}
|
239
local/ytdl.go
Normal file
|
@ -0,0 +1,239 @@
|
||||||
|
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 (y *Ytdl) DeleteVideoFiles(videoID string) error {
|
||||||
|
files, err := ioutil.ReadDir(y.DownloadDir)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
for _, f := range files {
|
||||||
|
if f.IsDir() {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
if strings.Contains(f.Name(), videoID) {
|
||||||
|
videoPath := path.Join(y.DownloadDir, f.Name())
|
||||||
|
err = os.Remove(videoPath)
|
||||||
|
if err != nil {
|
||||||
|
log.Errorf("Error while deleting file %s: %v", y.DownloadDir, err)
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func deleteFile(path string) error {
|
||||||
|
_, err := os.Stat(path)
|
||||||
|
if err != nil && !os.IsNotExist(err) {
|
||||||
|
log.Errorf("Error determining if file %s exists: %v", path, err)
|
||||||
|
return err
|
||||||
|
} else if err != nil {
|
||||||
|
log.Debugf("File %s does not exist. Skipping deletion.", path)
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
return os.Remove(path)
|
||||||
|
}
|
||||||
|
|
||||||
|
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
|
||||||
|
}
|
||||||
|
}
|
76
local/ytdlVideoSource.go
Normal file
|
@ -0,0 +1,76 @@
|
||||||
|
package local
|
||||||
|
|
||||||
|
import (
|
||||||
|
log "github.com/sirupsen/logrus"
|
||||||
|
|
||||||
|
"github.com/lbryio/ytsync/v5/downloader/ytdl"
|
||||||
|
)
|
||||||
|
|
||||||
|
type YtdlVideoSource struct {
|
||||||
|
downloader Ytdl
|
||||||
|
enrichers []YouTubeVideoEnricher
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewYtdlVideoSource(downloadDir string, config *YouTubeSourceConfig) (*YtdlVideoSource, error) {
|
||||||
|
ytdl, err := NewYtdl(downloadDir)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
source := YtdlVideoSource {
|
||||||
|
downloader: *ytdl,
|
||||||
|
}
|
||||||
|
|
||||||
|
if config.YouTubeAPIKey != "" {
|
||||||
|
ytapiEnricher := NewYouTubeAPIVideoEnricher(config.YouTubeAPIKey)
|
||||||
|
source.enrichers = append(source.enrichers, ytapiEnricher)
|
||||||
|
}
|
||||||
|
|
||||||
|
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
|
||||||
|
}
|
||||||
|
|
||||||
|
var bestThumbnail *ytdl.Thumbnail = nil
|
||||||
|
for i, thumbnail := range metadata.Thumbnails {
|
||||||
|
if i == 0 || bestThumbnail.Width < thumbnail.Width {
|
||||||
|
bestThumbnail = &thumbnail
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
sourceVideo := SourceVideo {
|
||||||
|
ID: id,
|
||||||
|
Title: &metadata.Title,
|
||||||
|
Description: &metadata.Description,
|
||||||
|
SourceURL: "\nhttps://www.youtube.com/watch?v=" + id,
|
||||||
|
Languages: []string{},
|
||||||
|
Tags: metadata.Tags,
|
||||||
|
ReleaseTime: nil,
|
||||||
|
ThumbnailURL: &bestThumbnail.URL,
|
||||||
|
FullLocalPath: videoPath,
|
||||||
|
}
|
||||||
|
|
||||||
|
for _, enricher := range s.enrichers {
|
||||||
this is an interesting design. what other enrichers did you envision? this is an interesting design. what other enrichers did you envision?
This mainly came out of trying to accommodate easy switching between methods of getting release date and also allowing for fallback to multiple methods. The other methods in mind were things like the odysee API, multiple YouTube API keys, a future update to yt-dlp that might provide it, web scraping (although I don't think this would currently work as only the date is provided), or some 3rd party metadata provider. In the single video use-case, there could even be an enricher that just supplies values specified on the command line. The design here is meant to put together a list of enrichers based on command line options. The enrichers will then take turns trying fill-in the missing video metadata (although right now, it is only trying to fill-in release date) This mainly came out of trying to accommodate easy switching between methods of getting release date and also allowing for fallback to multiple methods. The other methods in mind were things like the odysee API, multiple YouTube API keys, a future update to yt-dlp that might provide it, web scraping (although I don't think this would currently work as only the date is provided), or some 3rd party metadata provider. In the single video use-case, there could even be an enricher that just supplies values specified on the command line.
The design here is meant to put together a list of enrichers based on command line options. The enrichers will then take turns trying fill-in the missing video metadata (although right now, it is only trying to fill-in release date)
👍 :+1:
|
|||||||
|
err = enricher.EnrichMissing(&sourceVideo)
|
||||||
|
if err != nil {
|
||||||
|
log.Warnf("Error enriching video %s, continuing enrichment: %v", id, err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
log.Debugf("Source video retrieved via ytdl: %v", sourceVideo)
|
||||||
|
|
||||||
|
return &sourceVideo, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *YtdlVideoSource) DeleteLocalCache(id string) error {
|
||||||
|
return s.downloader.DeleteVideoFiles(id)
|
||||||
|
}
|
i recommend os.ReadFile() to read the file in one go