diff --git a/ytsync.go b/ytsync.go index 3db8a8e..1b3087b 100644 --- a/ytsync.go +++ b/ytsync.go @@ -85,8 +85,10 @@ func (s *Sync) FullCycle() error { } s.YoutubeChannelID = channelID } - defaultWalletDir := os.Getenv("HOME") + "/.lbryum/wallets/default_wallet" + if os.Getenv("REGTEST") == "true" { + defaultWalletDir = os.Getenv("HOME") + "/.lbryum_regtest/wallets/default_wallet" + } walletBackupDir := os.Getenv("HOME") + "/wallets/" + strings.Replace(s.LbryChannelName, "@", "", 1) if _, err := os.Stat(defaultWalletDir); !os.IsNotExist(err) { @@ -185,7 +187,7 @@ func (s *Sync) doSync() error { err = s.walletSetup() if err != nil { - return err + return errors.Err("Initial wallet setup failed! Manual Intervention is required. Reason: %v", err) } if s.StopOnError { @@ -276,7 +278,7 @@ func (s *Sync) startWorker(workerNum int) { log.Println("Retrying") continue } - util.SendToSlackError("Video failed after %d retries, skipping. Stack: %s", s.MaxTries, logMsg) + util.SendToSlackError("Video failed after %d retries, skipping. Stack: %s", tryCount, logMsg) } } break