Skip to content

Commit

Permalink
fix: remove subLabel
Browse files Browse the repository at this point in the history
  • Loading branch information
OldTyT authored Dec 23, 2024
1 parent cf051d8 commit 8ed5f32
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions internal/frigate/frigate.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ type EventsStruct []struct {
PlusID interface{} `json:"plus_id"`
RetainIndefinitely bool `json:"retain_indefinitely"`
StartTime float64 `json:"start_time"`
SubLabel []any `json:"sub_label"`
// SubLabel []any `json:"sub_label"`
Thumbnail string `json:"thumbnail"`
TopScore interface{} `json:"top_score"`
Zones []any `json:"zones"`
Expand All @@ -65,7 +65,7 @@ type EventStruct struct {
PlusID interface{} `json:"plus_id"`
RetainIndefinitely bool `json:"retain_indefinitely"`
StartTime float64 `json:"start_time"`
SubLabel []any `json:"sub_label"`
// SubLabel []any `json:"sub_label"`
Thumbnail string `json:"thumbnail"`
TopScore interface{} `json:"top_score"`
Zones []any `json:"zones"`
Expand Down Expand Up @@ -225,9 +225,9 @@ func SendMessageEvent(FrigateEvent EventStruct, bot *tgbotapi.BotAPI) {
text := "*Event*\n"
text += "┣*Camera*\n┗ #" + NormalizeTagText(FrigateEvent.Camera) + "\n"
text += "┣*Label*\n┗ #" + NormalizeTagText(FrigateEvent.Label) + "\n"
if FrigateEvent.SubLabel != nil {
text += "┣*SubLabel*\n┗ #" + strings.Join(GetTagList(FrigateEvent.SubLabel), ", #") + "\n"
}
// if FrigateEvent.SubLabel != nil {
// text += "┣*SubLabel*\n┗ #" + strings.Join(GetTagList(FrigateEvent.SubLabel), ", #") + "\n"
// }
t_start := time.Unix(int64(FrigateEvent.StartTime), 0)
text += fmt.Sprintf("┣*Start time*\n┗ `%s", t_start) + "`\n"
if FrigateEvent.EndTime == 0 {
Expand Down

0 comments on commit 8ed5f32

Please sign in to comment.