• Welcome to IPTV Community! You need login/register in-order to access forum without restriction.

Remove not used countries from the list

Cookie77

New Member
Jan 21, 2018
4
5
3
47
In my opinion the RasPi needs too much time to load the whole channel list (5-10 minutes). So i thought that i make a little crontab and only take the channels that i need.
This is a dirty fix and could be improved but it's a good start i think.
Here's how i did it :
Connect via SSH to your RasPi
Code:
ssh IP-OF-YOUR-RASPI -l USERNAME
Now create a file called tv.sh in your homedir
Code:
nano tv.sh
Now put this into the file (note this is for the german channels but should work with any other country)
Code:
rm TV.m3u
wget 'YOUR-LIST-URL' -O ~/Channels.m3u
grep 'LIVE: Austria' Channels.m3u -A1 > ~/austria.m3u
grep 'LIVE: Germany' Channels.m3u -A1 > ~/germany.m3u
grep 'LIVE: Switzerland' Channels.m3u -A1 > ~/switzerland.m3u
grep 'MOVIE: German' Channels.m3u -A1 > ~/movie.m3u
echo '#EXTM3U' > TV.m3u
cat austria.m3u germany.m3u switzerland.m3u movie.m3u >> TV.m3u
sed -i '/--/d' ~/TV.m3u
rm Channels.m3u austria.m3u germany.m3u movie.m3u switzerland.m3u xmltv.xml
Now create a crontab. You can do it like this
Code:
crontab -e
and put the following inside
Code:
0 12 * * * /home/osmc/tv.sh
The new list is named TV.m3u and you will find it in your homedir.
The last thing you need to do is : import it into your addon.
 

Cookie77

New Member
Jan 21, 2018
4
5
3
47
Found an error but can't edit the above.
Code:
0 12 * * * /home/osmc/tv.sh
should be
Code:
0 12 * * * ~/tv.sh
If you also use osmc, you can leave it like the above.
 

Sense

Well-Known Member
Reseller
Mar 25, 2017
629
451
113
Sweden
www.sensus-tv.com
Reseller ID
Sense
Found an error but can't edit the above.
Code:
0 12 * * * /home/osmc/tv.sh
should be
Code:
0 12 * * * ~/tv.sh
If you also use osmc, you can leave it like the above.
Nice work @Cookie77 and thanks for sharing with the community :)

This can however be done using your dashboard where you can simply " uncheck " the countries you dont want in the list.

Here you can find a guide on how to do that ;) https://iptv.community/threads/a-way-for-you-to-get-the-most-out-of-your-iptv-experience.11610/