File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed
Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -427,12 +427,15 @@ fetch_m3u() {
427427 2* |3* )
428428 local ROOM_STATUS=" $( echo " ${CONNECT_DUMP} " | grep -oE ' "room_status":[ ]?"[^"]+"' | head -n 1 | cut -d ' "' -f4) "
429429 [ -n " $( echo " ${CONNECT_DUMP} " | grep -oE ' http[s]?://edge[^ ]+\.m3u8' | head -n 1) " ] && {
430- STREAM_URL=$( echo " ${CONNECT_DUMP} " \
431- | grep -oE ' http[s]?://edge[^ ]+\.m3u8' \
432- | head -n 1 \
433- | sed ' s|playlist.m3u8|playlist_sfm4s.m3u8|g' \
434- | sed ' s|live-hls|live-c-fhls|g'
435- )
430+ STREAM_URL=$( echo " ${CONNECT_DUMP} " | grep -oE ' http[s]?://edge[^ ]+\.m3u8' | head -n 1)
431+ [ " $( utils connect_status " ${STREAM_URL} " ) " -ge 400 ] && {
432+ STREAM_URL=$( echo " ${STREAM_URL} " | sed ' s|playlist.m3u8|playlist_sfm4s.m3u8|g' | sed ' s|live-hls|live-c-fhls|g' )
433+ [ " $( utils connect_status " ${STREAM_URL} " ) " -ge 400 ] && {
434+ unset STREAM_URL
435+ echo " [$( date " +%Y%m%d-%H%M%S" ) ] (ERROR) [${MODEL} ] is Online now, but looks like the backend of [${PLATFORM} ] has been changed." >&2
436+ return 1
437+ }
438+ }
436439 true
437440 } || {
438441 echo " [$( date " +%Y%m%d-%H%M%S" ) ] [${MODEL} ] is ${ROOM_STATUS} now. [${CONNECT_STATUS} ]"
You can’t perform that action at this time.
0 commit comments