Bugfix
Bugfix

--- a/HLS-Stream-Creator.sh
+++ b/HLS-Stream-Creator.sh
@@ -168,7 +168,7 @@
 	  then
 		echo "Encoding for bitrate ${BITRATE_PROCESSES[$i]}k completed"
 
-		if [ "$LIVE_STREAM" == "1" ]
+		if [ "$LIVE_STREAM" == "1" ] && [ `grep 'EXT-X-ENDLIST' "$OUTPUT_DIRECTORY/${PLAYLIST_PREFIX}_${BITRATE_PROCESSES[$i]}.m3u8" | wc -l ` == "0" ]
 		then
 		    # Correctly terminate the manifest. See HLS-15 for info on why
 		    echo "#EXT-X-ENDLIST" >> "$OUTPUT_DIRECTORY/${PLAYLIST_PREFIX}_${BITRATE_PROCESSES[$i]}.m3u8"