Hi
Is there any way to renumber the channels by it's SID ?
I'm using xbmc eden + vdr + xvdr plugin
Other issue: I loose the channel groups I create in every reboot. How can we fix them ?
have you set XBMC to use the channel numbering from the backend?
To set the channel numbers put them in the order you require in your vdr channels.conf file
Well, I was looking at
http://www.vdr-wiki.de/wiki/index.php/Vd...9#CHANNELS
So I found what I wanted. Now I can number the channels the way I want. (and make channel groups too)
I even did a somewhat dirty shell script to number the channels by its SID and sort them in channels.conf file
Code:
#!/bin/bash
exchange(){
temp=${array[$1]}
array[$1]=${array[$2]}
array[$2]=$temp
}
Well, it could be better, but worked for me.
numlines=$(cat channels.conf | wc -l)
i=0
while read line
do
chan_num=$(echo $line | cut -d: -f10 ) #get channel number
array[i]=$chan_num
i=$((i+1))
array[i]=$line
i=$((i+1))
done < channels.conf
arraysize=${#array[@]}
#bublesort, as said by Schildt, "the evil of swaps"
for ((last=arraysize-2;last>0;last=last-2))
do
for((i=0;i<last;i=i+2))
do
j=$((i+2))
if [ ${array[i]} -gt ${array[j]} ]
then
exchange $i $j
exchange $((i+1)) $((j+1))
fi
done
done
for((i=0;i<arraysize-2;i=i+2))
do
echo -e ":@${array[i]}\n${array[$((i+1))]}" >> channels.conf.sorted
done