Skip to content

Commit a937394

Browse files
authored
Merge pull request #27 from ccil-kbw/feat/add-hardcoded-recordtimes
feat: add hardcoded record times
2 parents 03a1c12 + 54dfb0d commit a937394

File tree

2 files changed

+25
-3
lines changed

2 files changed

+25
-3
lines changed

rec/rec_iqama.go

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,28 @@ type RecordConfigDataS struct {
2020
}
2121

2222
func NewRecordConfigDataS() *RecordConfigDataS {
23-
rc := &RecordConfigDataS{}
23+
rc := &RecordConfigDataS{
24+
data: &[]RecordConfig{
25+
{
26+
Description: "Jumuaa Recording",
27+
StartTime: time.Date(2024, 1, 1, 11, 55, 0, 0, time.Local),
28+
Duration: JumuaaRecordDuration,
29+
RecordingDays: []time.Weekday{time.Friday},
30+
},
31+
{
32+
Description: "Fajr Recording",
33+
StartTime: time.Date(2024, 1, 1, 5, 30, 0, 0, time.Local),
34+
Duration: DarsRecordDuration,
35+
RecordingDays: EveryDay,
36+
},
37+
{
38+
Description: "Tarawih Recording",
39+
StartTime: time.Date(2024, 1, 1, 20, 0, 0, 0, time.Local),
40+
Duration: 3 * time.Hour,
41+
RecordingDays: EveryDay,
42+
},
43+
},
44+
}
2445
//rc.Refresh()
2546
return rc
2647
}

rec/server.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package rec
22

33
import (
44
"fmt"
5+
"time"
56
)
67

78
func StartRecServer(host, password string, data *RecordConfigDataS) (*Recorder, error) {
@@ -12,7 +13,7 @@ func StartRecServer(host, password string, data *RecordConfigDataS) (*Recorder,
1213
}
1314

1415
fmt.Println("Starting OBS recording control routine")
15-
/* go func() {
16+
go func() {
1617
for {
1718

1819
isRecording, err := client.IsRecording()
@@ -45,7 +46,7 @@ func StartRecServer(host, password string, data *RecordConfigDataS) (*Recorder,
4546

4647
time.Sleep(1 * time.Minute)
4748
}
48-
}()*/
49+
}()
4950

5051
return client, nil
5152
}

0 commit comments

Comments
 (0)