File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -69,6 +69,9 @@ def __init__(self, username):
69
69
self .cookieUpdater = None
70
70
self .cookie_update_interval = 0
71
71
72
+ #this will store the latest status of the current model
73
+ self .previous_status = None
74
+
72
75
self .lastInfo = {} # This dict will hold information about stream after getStatus is called. One can use this in getVideoUrl
73
76
self .running = False
74
77
self .quitting = False
@@ -132,7 +135,10 @@ def run(self):
132
135
while self .running :
133
136
try :
134
137
self .sc = self .getStatus ()
135
- self .log (self .status ())
138
+ # Check if the status has changed and log the update if it's different from the previous status
139
+ if self .sc != self .previous_status :
140
+ self .log (self .status ())
141
+ self .previous_status = self .sc
136
142
if self .sc == self .Status .ERROR :
137
143
self ._sleep (self .sleep_on_error )
138
144
if self .sc == self .Status .OFFLINE :
You can’t perform that action at this time.
0 commit comments