From a8a6347d5282f053c9cd7e804308f0ca79dd969f Mon Sep 17 00:00:00 2001 From: Ivan Date: Mon, 7 Feb 2022 20:17:41 +0200 Subject: [PATCH] add shared video sync statuses array for validation purposes --- manager/transfer.go | 2 +- shared/shared.go | 12 +++++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/manager/transfer.go b/manager/transfer.go index a492f38..b8d4843 100644 --- a/manager/transfer.go +++ b/manager/transfer.go @@ -293,7 +293,7 @@ func (s *Sync) streamUpdate(ui *updateInfo) error { timing.TimedComponent("transferStreamUpdate").Add(time.Since(start)) if updateError != nil { ui.videoStatus.FailureReason = updateError.Error() - ui.videoStatus.Status = shared.VideoStatusTranferFailed + ui.videoStatus.Status = shared.VideoStatusTransferFailed ui.videoStatus.IsTransferred = util.PtrToBool(false) } else { ui.videoStatus.IsTransferred = util.PtrToBool(len(result.Outputs) != 0) diff --git a/shared/shared.go b/shared/shared.go index 67b8274..310bfa6 100644 --- a/shared/shared.go +++ b/shared/shared.go @@ -199,13 +199,15 @@ var SyncStatuses = []string{StatusPending, StatusPendingEmail, StatusPendingUpgr const LatestMetadataVersion = 2 const ( - VideoStatusPublished = "published" - VideoStatusFailed = "failed" - VideoStatusUpgradeFailed = "upgradefailed" - VideoStatusUnpublished = "unpublished" - VideoStatusTranferFailed = "transferfailed" + VideoStatusPublished = "published" + VideoStatusFailed = "failed" + VideoStatusUpgradeFailed = "upgradefailed" + VideoStatusUnpublished = "unpublished" + VideoStatusTransferFailed = "transferfailed" ) +var VideoSyncStatuses = []string{VideoStatusPublished, VideoStatusFailed, VideoStatusUpgradeFailed, VideoStatusUnpublished, VideoStatusTransferFailed} + const ( TransferStateNotTouched = iota TransferStatePending -- 2.45.2