@@ -161,16 +161,16 @@ def create_ffmpeg_stream(
161161
162162
163163# stop the video by type
164- # [edwaddle] have stop_video_by_type return true if kill_child_processes was called
165- # [edwaddle] else have it return false
164+ # have stop_video_by_type return true if kill_child_processes was called
165+ # else have it return false
166166def stop_video_by_type (video_type : State ):
167167 if video_type in process_dict :
168168 kill_child_processes (process_dict [video_type ])
169169 process_dict .pop (video_type )
170170 return True
171171 return False
172172
173- # [edwaddle] stop_all_videos should also return a boolean, from what stop_video_by_type returned
173+ #stop_all_videos should also return a boolean, from what stop_video_by_type returned
174174def stop_all_videos ():
175175 return stop_video_by_type (State .INTERLUDE ) or stop_video_by_type (State .PLAYING )
176176
@@ -214,7 +214,6 @@ def download_and_play_video(
214214 if video_path is None :
215215 video_cache .add (url )
216216 video_path = video_cache .find (Cache .get_video_id (url ))
217- # [edwaddle] also add the time.sleep here, if the above return value was true
218217
219218 return create_ffmpeg_stream (
220219 video_path ,
@@ -364,12 +363,6 @@ async def state():
364363
365364@app .post ("/play/file" )
366365async def play_file (file_path : str = "cache" , title : str = None , thumbnail : str = None ):
367-
368- # [edwaddle] call stop_all_videos instead,
369- # [edwaddle] then do a time.sleep for 5 seconds directly under the function call
370- # [edwaddle] call the time.sleep here if the above return value was true.
371- # [edwaddle] see other comments regarding stop_all_videos returning a boolean
372- # Start thread to stream the video and provide a response
373366 try :
374367
375368 # check if we are going to play all videos or a single video in the cache
0 commit comments