fix: lmcli: make 'sectors list' DDO-aware

This commit is contained in:
Łukasz Magiera 2024-04-05 09:11:28 +02:00 committed by Rod Vagg
parent 01e24969df
commit ba11769228

View File

@ -487,6 +487,13 @@ var sectorsListCmd = &cli.Command{
}
}
var pams int
for _, p := range st.Pieces {
if p.DealInfo != nil && p.DealInfo.PieceActivationManifest != nil {
pams++
}
}
exp := st.Expiration
if st.OnTime > 0 && st.OnTime < exp {
exp = st.OnTime // Can be different when the sector was CC upgraded
@ -501,6 +508,8 @@ var sectorsListCmd = &cli.Command{
if deals > 0 {
m["Deals"] = color.GreenString("%d", deals)
} else if pams > 0 {
m["Deals"] = color.MagentaString("DDO:%d", pams)
} else {
m["Deals"] = color.BlueString("CC")
if st.ToUpgrade {