I am attempting to create a small IPTV client. The client will download the IPTV channel list (a m3u file) for channel access. I need to find the fastest way to download the m3u file (right now I am using OkHttpUtils2) and then to split the data into "categories". An example of the m3u is below. I am looking for the most effective way to split this data as such:
Group Title
- Channel Name
- Video source
So, I for example, I would have:
*Sports
-Sky Sports Cricket HD
-http://video.source.com/play/2479.ts?token=***token***
-Sky Sports Action HD
-http://video.source.com/play/2480.ts?token=***token***
-Sky Sports Golf HD
-http://video.source.com/play/2481.ts?token=***token***
*United States
-FOX HD
-http://video.source.com/play/2448.ts?token=***token***
*Premium Movies
-HDNet Movies HD
-http://video.source.com/play/74791.ts?token=***token***
The below is just a snippet of the channel list. The actual list can range from a small amount of channels to 1000+ channels...
Group Title
- Channel Name
- Video source
So, I for example, I would have:
*Sports
-Sky Sports Cricket HD
-http://video.source.com/play/2479.ts?token=***token***
-Sky Sports Action HD
-http://video.source.com/play/2480.ts?token=***token***
-Sky Sports Golf HD
-http://video.source.com/play/2481.ts?token=***token***
*United States
-FOX HD
-http://video.source.com/play/2448.ts?token=***token***
*Premium Movies
-HDNet Movies HD
-http://video.source.com/play/74791.ts?token=***token***
The below is just a snippet of the channel list. The actual list can range from a small amount of channels to 1000+ channels...
B4X:
#EXTM3U
#EXTINF:-1 catchup="default" catchup-source="http://video.source.com/play/dvr/${start}/2479.ts?token=***token***&duration=3600" catchup-days=511206 tvg-name="Sky Sports Cricket HD" tvg-id="SkySportsCricket.uk" tvg-logo="http://logo.source/logos/sky%20sports%20cricket%20hd.png" group-title="Sports",Sky Sports Cricket HD
http://video.source.com/play/2479.ts?token=***token***
#EXTINF:-1 catchup="default" catchup-source="http://video.source.com/play/dvr/${start}/2480.ts?token=***token***&duration=3600" catchup-days=511208 tvg-name="Sky Sports Action HD" tvg-id="SkySportsAction.uk" tvg-logo="http://logo.source/logos/sky%20sports%20action%20hd.png" group-title="Sports",Sky Sports Action HD
http://video.source.com/play/2480.ts?token=***token***
#EXTINF:-1 catchup="default" catchup-source="http://video.source.com/play/dvr/${start}/2481.ts?token=***token***&duration=3600" catchup-days=507609 tvg-name="Sky Sports Golf HD" tvg-id="SkySportsGolf.uk" tvg-logo="http://logo.source/logos/sky%20sports%20golf%20hd.png" group-title="Sports",Sky Sports Golf HD
http://video.source.com/play/2481.ts?token=***token***
#EXTINF:-1 catchup="default" catchup-source="http://video.source.com/play/dvr/${start}/2448.ts?token=***token***&duration=3600" catchup-days=507594 tvg-name="FOX HD" tvg-id="I398.11746.schedulesdirect.org" tvg-logo="http://logo.source/logos/usa%20fox%20hd.png" group-title="United States",FOX HD
http://video.source.com/play/2448.ts?token=***token***
#EXTINF:-1 tvg-name="HDNet Movies HD" tvg-id="I566.33668.schedulesdirect.org" tvg-logo="http://logo.source/logos/hdnet%20movies.png" group-title="Premium Movies",HDNet Movies HD
http://video.source.com/play/74791.ts?token=***token***