M3U8 parsing problem

Hello all,

I am using CNTV-live addon to watch live streams on cntv.com and found that recently all streamings failed sliently with this addon, while it plays find using browser. The streaming urls are unchanged by looking at the source of the live streaming page, and go into Kodi log I found this:

Code:
13:57:51 T:5316   DEBUG: CurlFile::Open(12763F60) http://cctv1.vtime.cntv.wscdns.com/live/cctv1hls_/index.m3u8?ptype=1&amode=1&AUTH=2+Hr/2qnowAXrzXsiy2CTuNRlVwwa2hYF9UL8jUQghyF9Yog747ALHh/XGL3BVwUORYN0zKOdUht1qTeesX/zg==
13:57:51 T:6172   DEBUG: Thread GUIDialogCache 6172 terminating (autodelete)
13:57:51 T:4676   DEBUG: Updating channel anhui
13:57:51 T:5304   DEBUG: ------ Window Init (DialogBusy.xml) ------
13:57:51 T:5304   DEBUG: ------ Window Deinit (DialogProgress.xml) ------
13:57:51 T:6984   DEBUG: Thread FileCache start, auto delete: false
13:57:51 T:6984    INFO: CFileCache::Process - Hit eof.
13:57:51 T:6984   DEBUG: Thread FileCache 6984 terminating
13:57:51 T:5316    INFO: CDVDInputStreamFFmpeg: Auto-selecting /cache/11_/seg0/index.m3u8?AUTH=2+Hr/2qnowAXrzXsiy2CTuNRlVwwa2hYF9UL8jUQghyF9Yog747ALHh/XGL3BVwUORYN0zKOdUht1qTeesX/zg== based on configured bandwidth.
13:57:51 T:5316  NOTICE: Creating Demuxer
13:57:51 T:5316   DEBUG: Error, could not open file /cache/11_/seg0/index.m3u8?AUTH=2+Hr/2qnowAXrzXsiy2CTuNRlVwwa2hYF9UL8jUQghyF9Yog747ALHh/XGL3BVwUORYN0zKOdUht1qTeesX/zg==
13:57:51 T:5316   ERROR: CDVDPlayer::OpenDemuxStream - Error creating demuxer

Kodi cannot find the media file of the stream. I downloaded the m3u8 from browser manually, and this is the content:

Code:
#EXTM3U
#EXT-X-STREAM-INF:PROGRAM-ID=0,BANDWIDTH=850000
/cache/13_/seg0/index.m3u8?AUTH=2+Hr/2qnowAXrzXsiy2CTuNRlVwwa2hYF9UL8jUQghyF9Yog747ALHh/XGL3BVwUORYN0zKOdUht1qTeesX/zg==
#EXT-X-STREAM-INF:PROGRAM-ID=0,BANDWIDTH=500000
/cache/14_/seg0/index.m3u8?AUTH=2+Hr/2qnowAXrzXsiy2CTuNRlVwwa2hYF9UL8jUQghyF9Yog747ALHh/XGL3BVwUORYN0zKOdUht1qTeesX/zg==
#EXT-X-STREAM-INF:PROGRAM-ID=0,BANDWIDTH=1500000
/cache/12_/seg0/index.m3u8?AUTH=2+Hr/2qnowAXrzXsiy2CTuNRlVwwa2hYF9UL8jUQghyF9Yog747ALHh/XGL3BVwUORYN0zKOdUht1qTeesX/zg==
#EXT-X-STREAM-INF:PROGRAM-ID=0,BANDWIDTH=2000000
/cache/11_/seg0/index.m3u8?AUTH=2+Hr/2qnowAXrzXsiy2CTuNRlVwwa2hYF9UL8jUQghyF9Yog747ALHh/XGL3BVwUORYN0zKOdUht1qTeesX/zg==

Obviously, the m3u8 playlist write the path to other m3u8s in a fashion that Kodi thinks it’s a local path and tries to find it on local filesystem, and of course it will fail. However, VLC plays the address fine.

So I wonder, is there any way I can rewrite the M3U8 on the fly to add the domain part so that Kodi can follow the m3u8 correctly?

Thanks.