add support for transferring videos after transferring everything
This commit is contained in:
parent
2f701a887a
commit
0d473cc4f6
2 changed files with 10 additions and 1 deletions
|
@ -52,6 +52,10 @@ func abandonSupports(s *Sync) (float64, error) {
|
||||||
if ok {
|
if ok {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
supportOnTransferredClaim := support.Address == s.publishAddress
|
||||||
|
if supportOnTransferredClaim {
|
||||||
|
continue
|
||||||
|
}
|
||||||
alreadyAbandoned[support.ClaimID] = true
|
alreadyAbandoned[support.ClaimID] = true
|
||||||
summary, err := s.daemon.SupportAbandon(&support.ClaimID, nil, nil, nil, nil)
|
summary, err := s.daemon.SupportAbandon(&support.ClaimID, nil, nil, nil, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -136,6 +140,9 @@ func transferChannel(s *Sync) error {
|
||||||
if channelClaim == nil || len(channelClaim.Claims) == 0 {
|
if channelClaim == nil || len(channelClaim.Claims) == 0 {
|
||||||
return errors.Err("There is no channel claim for channel %s", s.LbryChannelName)
|
return errors.Err("There is no channel claim for channel %s", s.LbryChannelName)
|
||||||
}
|
}
|
||||||
|
if channelClaim.Claims[0].Address == s.publishAddress {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
updateOptions := jsonrpc.ChannelUpdateOptions{
|
updateOptions := jsonrpc.ChannelUpdateOptions{
|
||||||
ChannelCreateOptions: jsonrpc.ChannelCreateOptions{
|
ChannelCreateOptions: jsonrpc.ChannelCreateOptions{
|
||||||
ClaimCreateOptions: jsonrpc.ClaimCreateOptions{
|
ClaimCreateOptions: jsonrpc.ClaimCreateOptions{
|
||||||
|
|
|
@ -362,9 +362,11 @@ func deleteSyncFolder(videoDirectory string) {
|
||||||
_ = util.SendToSlack(err.Error())
|
_ = util.SendToSlack(err.Error())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *Sync) shouldTransfer() bool {
|
func (s *Sync) shouldTransfer() bool {
|
||||||
return s.transferState == 1 && s.publishAddress != "" && !s.Manager.SyncFlags.DisableTransfers
|
return s.transferState >= 1 && s.publishAddress != "" && !s.Manager.SyncFlags.DisableTransfers
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *Sync) setChannelTerminationStatus(e *error) {
|
func (s *Sync) setChannelTerminationStatus(e *error) {
|
||||||
var transferState *int
|
var transferState *int
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue