Download video to sync to local cache #113
|
@ -17,12 +17,13 @@ import (
|
|||
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
||||
)
|
||||
|
||||
type SyncContext struct {
|
||||
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 :-)
|
||||
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 :-)
|
||||
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
|
||||
}
|
||||
|
||||
|
@ -57,6 +58,7 @@ func AddCommand(rootCmd *cobra.Command) {
|
|||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how 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.DryRun, "dry-run", false, "Display information about the stream publishing, but do not publish the stream")
|
||||
cmd.Flags().BoolVar(&syncContext.KeepCache, "keep-cache", false, "Don't delete local files after publishing.")
|
||||
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")
|
||||
cmd.Flags().Float64Var(&syncContext.PublishBid, "publish-bid", 0.01, "Bid amount for the stream claim")
|
||||
cmd.Flags().StringVar(&syncContext.LbrynetAddr, "lbrynet-address", getEnvDefault("LBRYNET_ADDRESS", ""), "JSONRPC address of the local LBRYNet daemon")
|
||||
|
@ -119,15 +121,19 @@ func localCmd(cmd *cobra.Command, args []string) {
|
|||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
||||
log.Debugf("Object to be published: %v", processedVideo)
|
||||
|
||||
} else {
|
||||
done, err := publisher.Publish(*processedVideo)
|
||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
||||
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 {
|
||||
log.Errorf("Error publishing video: %v", err)
|
||||
return
|
||||
}
|
||||
|
||||
err = <-done
|
||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
||||
if err != nil {
|
||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
||||
log.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 :-)
|
||||
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 :-)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -227,13 +233,14 @@ func getAbbrevDescription(v SourceVideo) string {
|
|||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
||||
return v.SourceURL
|
||||
}
|
||||
|
||||
maxLength := 2800
|
||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of 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)
|
||||
additionalDescription := "\n" + v.SourceURL
|
||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
||||
if len(description) > maxLength {
|
||||
description = description[:maxLength]
|
||||
}
|
||||
return description + "\n..." + 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 :-)
|
||||
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 :-)
|
||||
}
|
||||
|
||||
type VideoSource interface {
|
||||
|
@ -242,5 +249,5 @@ 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 :-)
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of 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 {
|
||||
Publish(video PublishableVideo) (chan error, error)
|
||||
i recommend os.ReadFile() to read the file in one go i recommend os.ReadFile() to read the file in one go
id call this something other than id call this something other than `done` to make it clear its a channel that lets you know when the video is done reflecting
minor nit, but doesn't this potentially make the description longer than the max length? minor nit, but doesn't this potentially make the description longer than the max length?
This was mostly ripped from This was mostly ripped from `getAbbrevDescription` in sources/youtubeVideo.go. I didn't know exactly where the value of 2800 came from, so I just assumed the logic was correct. If it is supposed to be a limit on the total description length, I'll fix this.
i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-) i think that's an estimate of how long the description can get before we hit the max claim size limit. id still fix it so the math is right though :-)
|
||||
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 :-)
|
|
@ -48,7 +48,7 @@ func NewLocalSDKPublisher(sdkAddr, channelID string, publishBid float64) (*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
|
||||
return &publisher, nil
|
||||
}
|
||||
|
||||
func (p *LocalSDKPublisher) Publish(video PublishableVideo) (chan error, error) {
|
||||
if this is an error (or an unexpected thing), it should prolly send an error to if this is an error (or an unexpected thing), it should prolly send an error to `done`, right?
The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected. The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected.
yea id either make it an option or just assume that all streams will be reflected. option is better but more work yea id either make it an option or just assume that all streams will be reflected. option is better but more work
|
||||
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 {
|
||||
ClaimCreateOptions: jsonrpc.ClaimCreateOptions {
|
||||
Title: &video.Title,
|
||||
|
@ -67,6 +67,10 @@ func (p *LocalSDKPublisher) Publish(video PublishableVideo) (chan error, error)
|
|||
if this is an error (or an unexpected thing), it should prolly send an error to if this is an error (or an unexpected thing), it should prolly send an error to `done`, right?
The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected. The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected.
yea id either make it an option or just assume that all streams will be reflected. option is better but more work yea id either make it an option or just assume that all streams will be reflected. option is better but more work
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 !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)
|
||||
go func() {
|
||||
for {
|
||||
|
@ -88,8 +92,9 @@ func (p *LocalSDKPublisher) Publish(video PublishableVideo) (chan error, error)
|
|||
if this is an error (or an unexpected thing), it should prolly send an error to if this is an error (or an unexpected thing), it should prolly send an error to `done`, right?
The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected. The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected.
yea id either make it an option or just assume that all streams will be reflected. option is better but more work yea id either make it an option or just assume that all streams will be reflected. option is better but more work
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 !fileStatus.UploadingToReflector {
|
||||
log.Warn("Stream is not being uploaded to a reflector. Check your lbrynet settings if this is a mistake.")
|
||||
if this is an error (or an unexpected thing), it should prolly send an error to if this is an error (or an unexpected thing), it should prolly send an error to `done`, right?
The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected. The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected.
yea id either make it an option or just assume that all streams will be reflected. option is better but more work yea id either make it an option or just assume that all streams will be reflected. option is better but more work
|
||||
break
|
||||
if this is an error (or an unexpected thing), it should prolly send an error to if this is an error (or an unexpected thing), it should prolly send an error to `done`, right?
The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected. The thinking was that this may be intentional since it is driven by lbrynet settings. I could turn this into an error if that case is unlikely. I could also add a command line flag to indicate that streams won't be reflected.
yea id either make it an option or just assume that all streams will be reflected. option is better but more work yea id either make it an option or just assume that all streams will be reflected. option is better but more work
|
||||
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
|
||||
}
|
||||
log.Infof("Stream reflector progress: %d%%", fileStatus.ReflectorProgress)
|
||||
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
|
|
@ -5,6 +5,7 @@
|
|||
- LBRY SDK (what do we actually need this for?)
|
||||
- youtube-dl
|
||||
- enough space to cache stuff
|
||||
- YouTube data API key
|
||||
|
||||
|
||||
## Process
|
||||
|
@ -15,6 +16,21 @@
|
|||
- or easier, just error if no channel
|
||||
- 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
|
||||
|
||||
- simplest: assume nothing is synced yet
|
||||
|
@ -50,4 +66,4 @@
|
|||
|
||||
### Debugging
|
||||
|
||||
- dry-running the whole thing
|
||||
- dry-running the whole thing
|
||||
|
|
i recommend os.ReadFile() to read the file in one go