From 51504a1bf1481dac3aed39b3bfce652ea69467bb Mon Sep 17 00:00:00 2001 From: Alex Grintsvayg Date: Tue, 17 Oct 2017 20:35:19 -0400 Subject: [PATCH] minor --- README.md | 8 ++++---- ytsync.go | 10 ++++++---- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 6321b81..214a7ca 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,10 @@ # Current YT Sync Process - start daemon with clean `.lbryum` dir -- `wallet_list` to get an address +- `wallet_unused_address` to get an address - send credits to address. make sure the send is split into 50 or so txns, and that there are enough credits to publish all the videos - wait for credits to arrive and be confirmed -- run `lbry ytsync YOUTUBE_KEY CHANNEL_ID CHANNEL_NAME --max-tries=5` +- run `lbry ytsync YOUTUBE_KEY YOUTUBE_CHANNEL_ID LBRY_CHANNEL_NAME --max-tries=5` - `max-tries` will retry errors that you will undoubtedly get -- after sync is done, stop daemon and move `.lbryum`dir somewhere safe -- mark content synced in doc +- after sync is done, stop daemon and move `.lbryum` dir somewhere safe +- mark content as synced in doc diff --git a/ytsync.go b/ytsync.go index 999028a..075fb76 100644 --- a/ytsync.go +++ b/ytsync.go @@ -24,8 +24,10 @@ import ( ) const ( - redisHashKey = "ytsync" - redisSyncedVal = "t" + redisHashKey = "ytsync" + redisSyncedVal = "t" + channelClaimAmount = 0.01 + publishAmount = 0.01 ) // Sync stores the options that control how syncing happens @@ -185,7 +187,7 @@ func (s *Sync) ensureChannelOwnership() error { return errors.New("Channel exists and we don't own it. Pick another channel.") } - _, err = s.daemon.ChannelNew(s.LbryChannelName, 0.01) + _, err = s.daemon.ChannelNew(s.LbryChannelName, channelClaimAmount) if err != nil { return err } @@ -407,7 +409,7 @@ func (s *Sync) publish(v video, conn redis.Conn) error { options.ChannelName = &s.LbryChannelName } - _, err := s.daemon.Publish(v.getClaimName(), v.getFilename(), 0.01, options) + _, err := s.daemon.Publish(v.getClaimName(), v.getFilename(), publishAmount, options) if err != nil { return err }