Complete the script for transferring the hls list and media segments.