Skip to content

Commit 07ad43b

Browse files
committed
removed unncessary changes
1 parent a945efe commit 07ad43b

3 files changed

Lines changed: 5 additions & 12 deletions

File tree

docker-compose.dev.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ services:
1212
command:
1313
- --videopath=/tmp/videos
1414
- --rtmp-stream-url=rtmp://nms:1935/live/mystream
15-
- --hls-file-path=/tmp/hls/
15+
- --hls-file-path=/tmp/hls
1616
# uncomment the below to test an interlude. a file called
1717
# interlude.mp4 must exist in this project in the `videos` folder.
1818
# there is an unresolved bug where the server doesn't reload

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ services:
1717
- --videopath=/tmp/videos
1818
- --rtmp-stream-url=rtmp://nms:1935/live/mystream
1919
- --cache-state-file=/tmp/videos/state.json
20-
- --hls-file-path=/tmp/hls/
20+
- --hls-file-path=/tmp/hls
2121
volumes:
2222
- ./server.py:/app/server.py
2323
- ./static/:/app/static/

server.py

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -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
166166
def 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
174174
def 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")
366365
async 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

Comments
 (0)