@@ -241,6 +241,18 @@ then
241
241
sed ' s/<channel id="/"[VODAFONE DE] /g;s/">/" "" on \\/g' /tmp/xmlch >> /tmp/chmenu
242
242
fi
243
243
244
+ if [ -e xml/tvtv_us.xml ]
245
+ then
246
+ grep ' channel id=' xml/tvtv_us.xml > /tmp/xmlch && cat /tmp/xmlch >> /tmp/xmlch2
247
+ sed ' s/<channel id="/"[TVTV USA] /g;s/">/" "" on \\/g' /tmp/xmlch >> /tmp/chmenu
248
+ fi
249
+
250
+ if [ -e xml/tvtv_ca.xml ]
251
+ then
252
+ grep ' channel id=' xml/tvtv_ca.xml > /tmp/xmlch && cat /tmp/xmlch >> /tmp/xmlch2
253
+ sed ' s/<channel id="/"[TVTV CANNADA] /g;s/">/" "" on \\/g' /tmp/xmlch >> /tmp/chmenu
254
+ fi
255
+
244
256
if [ -e xml/external_oa.xml ]
245
257
then
246
258
grep ' channel id=' xml/external_oa.xml > /tmp/xmlch && cat /tmp/xmlch >> /tmp/xmlch2
268
280
rm /tmp/setupname /tmp/chduplicates 2> /dev/null
269
281
else
270
282
sed ' s/\\\[/[/g;s/\\\]/]/g;s/\\(/(/g;s/\\)/)/g;s/\\\&/\&/g' /tmp/channels > /tmp/xmlch2
271
- sed -i ' s/ "\[HORIZON [A-Z][A-Z]\] /\n/g;s/"\[HORIZON [A-Z][A-Z]\] //g;s/ "\[ZATTOO [A-Z][A-Z]\] /\n/g;s/"\[ZATTOO [A-Z][A-Z]\] //g;s/ "\[SWISSCOM [A-Z][A-Z]\] /\n/g;s/"\[SWISSCOM [A-Z][A-Z]\] //g;s/ "\[TVPLAYER [A-Z][A-Z]\] /\n/g;s/"\[TVPLAYER [A-Z][A-Z]\] //g;s/ "\[MAGENTATV [A-Z][A-Z]\] /\n/g;s/"\[MAGENTATV [A-Z][A-Z]\] //g;s/ "\[RADIOTIMES [A-Z][A-Z]\] /\n/g;s/"\[RADIOTIMES [A-Z][A-Z]\] //g;s/ "\[WAIPU.TV [A-Z][A-Z]\] /\n/g;s/"\[WAIPU.TV [A-Z][A-Z]\] //g;s/ "\[TV-SPIELFILM [A-Z][A-Z]\] /\n/g;s/"\[TV-SPIELFILM [A-Z][A-Z]\] //g;s/ "\[VODAFONE [A-Z][A-Z]\] /\n/g;s/"\[VODAFONE [A-Z][A-Z]\] //g;s/ "\[EXTERNAL [A-Z][A-Z]\] /\n/g;s/"\[EXTERNAL [A-Z][A-Z]\] //g;s/"//g;s/"//g' /tmp/xmlch2
283
+ sed -i ' s/ "\[HORIZON [A-Z][A-Z]\] /\n/g;s/"\[HORIZON [A-Z][A-Z]\] //g;s/ "\[ZATTOO [A-Z][A-Z]\] /\n/g;s/"\[ZATTOO [A-Z][A-Z]\] //g;s/ "\[SWISSCOM [A-Z][A-Z]\] /\n/g;s/"\[SWISSCOM [A-Z][A-Z]\] //g;s/ "\[TVPLAYER [A-Z][A-Z]\] /\n/g;s/"\[TVPLAYER [A-Z][A-Z]\] //g;s/ "\[MAGENTATV [A-Z][A-Z]\] /\n/g;s/"\[MAGENTATV [A-Z][A-Z]\] //g;s/ "\[RADIOTIMES [A-Z][A-Z]\] /\n/g;s/"\[RADIOTIMES [A-Z][A-Z]\] //g;s/ "\[WAIPU.TV [A-Z][A-Z]\] /\n/g;s/"\[WAIPU.TV [A-Z][A-Z]\] //g;s/ "\[TV-SPIELFILM [A-Z][A-Z]\] /\n/g;s/"\[TV-SPIELFILM [A-Z][A-Z]\] //g;s/ "\[VODAFONE [A-Z][A-Z]\] /\n/g;s/"\[VODAFONE [A-Z][A-Z]\] //g;s/ "\[TVTV [A-Z][A-Z]\] /\n/g;s/"\[TVTV [A-Z][A-Z]\] //g;s/ "\[ EXTERNAL [A-Z][A-Z]\] /\n/g;s/"\[EXTERNAL [A-Z][A-Z]\] //g;s/"//g;s/"//g' /tmp/xmlch2
272
284
sort /tmp/xmlch2 | uniq -d > /tmp/chduplicates
273
285
274
286
if [ -s /tmp/chduplicates ]
288
300
if [ -s /tmp/channels ]
289
301
then
290
302
sed -i ' s/\\\[/[/g;s/\\\]/]/g;s/\\(/(/g;s/\\)/)/g;s/\\\&/\&/g' /tmp/channels
291
- sed -i ' s/ "\[HORIZON/\n"\[HORIZON/g;s/ "\[ZATTOO/\n"\[ZATTOO/g;s/ "\[SWISSCOM/\n"\[SWISSCOM/g;s/ "\[TVPLAYER/\n"\[TVPLAYER/g;s/ "\[MAGENTATV/\n"\[MAGENTATV/g;s/ "\[RADIOTIMES/\n"\[RADIOTIMES/g;s/ "\[WAIPU.TV/\n"\[WAIPU.TV/g;s/ "\[TV-SPIELFILM/\n"\[TV-SPIELFILM/g;s/ "\[VODAFONE/\n"\[VODAFONE/g;s/ "\[EXTERNAL/\n"\[EXTERNAL/g' /tmp/channels
303
+ sed -i ' s/ "\[HORIZON/\n"\[HORIZON/g;s/ "\[ZATTOO/\n"\[ZATTOO/g;s/ "\[SWISSCOM/\n"\[SWISSCOM/g;s/ "\[TVPLAYER/\n"\[TVPLAYER/g;s/ "\[MAGENTATV/\n"\[MAGENTATV/g;s/ "\[RADIOTIMES/\n"\[RADIOTIMES/g;s/ "\[WAIPU.TV/\n"\[WAIPU.TV/g;s/ "\[TV-SPIELFILM/\n"\[TV-SPIELFILM/g;s/ "\[VODAFONE/\n"\[VODAFONE/g;s/ "\[TVTV/\n"\[TVTV/g;s/ "\[ EXTERNAL/\n"\[EXTERNAL/g' /tmp/channels
292
304
293
305
if [ -e /tmp/setupname ]
294
306
then
@@ -387,6 +399,16 @@ then
387
399
grep " VODAFONE DE" /tmp/channels | sed ' /VODAFONE DE/s/\[VODAFONE DE\] //g;s/.*/&,/g;$s/,/]\n}/g;1i{"channels":\[' > combine/$( < /tmp/setupname) /vdf_de_channels.json
388
400
fi
389
401
402
+ if [ -e xml/tvtv_us.xml ]
403
+ then
404
+ grep " TVTV USA" /tmp/channels | sed ' /TVTV USA/s/\[TVTV USA\] //g;s/.*/&,/g;$s/,/]\n}/g;1i{"channels":\[' > combine/$( < /tmp/setupname) /tvtv_us_channels.json
405
+ fi
406
+
407
+ if [ -e xml/tvtv_ca.xml ]
408
+ then
409
+ grep " TVTV CANNADA" /tmp/channels | sed ' /TVTV CANNADA/s/\[TVTV CANNADA\] //g;s/.*/&,/g;$s/,/]\n}/g;1i{"channels":\[' > combine/$( < /tmp/setupname) /tvtv_ca_channels.json
410
+ fi
411
+
390
412
if [ -e xml/external_oa.xml ]
391
413
then
392
414
grep " EXTERNAL OA" /tmp/channels | sed ' /EXTERNAL OA/s/\[EXTERNAL OA\] //g;s/.*/&,/g;$s/,/]\n}/g;1i{"channels":\[' > combine/$( < /tmp/setupname) /ext_oa_channels.json
@@ -998,6 +1020,56 @@ then
998
1020
999
1021
cd - > /dev/null
1000
1022
1023
+ # TVTV US
1024
+ if [ -e xml/tvtv_us.xml ]
1025
+ then
1026
+ grep ' channel id=' xml/tvtv_us.xml > /tmp/xmlch_tvtvus
1027
+ sed -i ' s/<channel id="/[TVTV USA] /g;s/">//g;s/\&/\&/g' /tmp/xmlch_tvtvus
1028
+ else
1029
+ rm combine/$( sed -n " $( < /tmp/selectedsetup) p" /tmp/combine) /tvtv_us_channels.json 2> /dev/null
1030
+ fi
1031
+
1032
+ touch combine/$( sed -n " $( < /tmp/selectedsetup) p" /tmp/combine) /tvtv_us_channels.json /tmp/xmlch_zde
1033
+ cd combine/$( sed -n " $( < /tmp/selectedsetup) p" /tmp/combine)
1034
+
1035
+ if [ -e tvtv_us_channels.json ]
1036
+ then
1037
+ sed ' /{"channels":\[/d;/}/d;s/",//g;s/"\]//g;s/"//g' tvtv_us_channels.json > /tmp/channels_tvtvus && cat /tmp/channels_tvtvus >> /tmp/xmlch2
1038
+ sed -i ' s/.*/[TVTV USA] &/g' /tmp/channels_tvtvus
1039
+
1040
+ comm -12 <( sort -u /tmp/xmlch_tvtvus) <( sort -u /tmp/channels_tvtvus) > /tmp/comm_menu_enabled
1041
+ comm -2 -3 <( sort -u /tmp/xmlch_tvtvus) <( sort -u /tmp/channels_tvtvus) > /tmp/comm_menu_disabled
1042
+ sed ' s/.*/"&" "" on \\/g' /tmp/comm_menu_enabled >> /tmp/chmenu
1043
+ sed ' s/.*/"&" "" off \\/g' /tmp/comm_menu_disabled >> /tmp/chmenu
1044
+ fi
1045
+
1046
+ cd - > /dev/null
1047
+
1048
+ # TVTV CA
1049
+ if [ -e xml/tvtv_ca.xml ]
1050
+ then
1051
+ grep ' channel id=' xml/tvtv_ca.xml > /tmp/xmlch_tvtvca
1052
+ sed -i ' s/<channel id="/[TVTV CANNADA] /g;s/">//g;s/\&/\&/g' /tmp/xmlch_tvtvca
1053
+ else
1054
+ rm combine/$( sed -n " $( < /tmp/selectedsetup) p" /tmp/combine) /tvtv_ca_channels.json 2> /dev/null
1055
+ fi
1056
+
1057
+ touch combine/$( sed -n " $( < /tmp/selectedsetup) p" /tmp/combine) /tvtv_ca_channels.json /tmp/xmlch_zch
1058
+ cd combine/$( sed -n " $( < /tmp/selectedsetup) p" /tmp/combine)
1059
+
1060
+ if [ -e tvtv_ca_channels.json ]
1061
+ then
1062
+ sed ' /{"channels":\[/d;/}/d;s/",//g;s/"\]//g;s/"//g' tvtv_ca_channels.json > /tmp/channels_tvtvca && cat /tmp/channels_tvtvca >> /tmp/xmlch2
1063
+ sed -i ' s/.*/[TVTV CANNADA] &/g' /tmp/channels_tvtvca
1064
+
1065
+ comm -12 <( sort -u /tmp/xmlch_tvtvca) <( sort -u /tmp/channels_tvtvca) > /tmp/comm_menu_enabled
1066
+ comm -2 -3 <( sort -u /tmp/xmlch_tvtvca) <( sort -u /tmp/channels_tvtvca) > /tmp/comm_menu_disabled
1067
+ sed ' s/.*/"&" "" on \\/g' /tmp/comm_menu_enabled >> /tmp/chmenu
1068
+ sed ' s/.*/"&" "" off \\/g' /tmp/comm_menu_disabled >> /tmp/chmenu
1069
+ fi
1070
+
1071
+ cd - > /dev/null
1072
+
1001
1073
# EXTERNAL SLOT 1
1002
1074
if [ -e xml/external_oa.xml ]
1003
1075
then
@@ -1091,7 +1163,7 @@ then
1091
1163
1092
1164
if [ -e /tmp/menu ]
1093
1165
then
1094
- if grep -q -E " \[HORIZON [A-Z][A-Z]\]|\[ZATTOO [A-Z][A-Z]\]|\[SWISSCOM [A-Z][A-Z]\]|\[TVPLAYER [A-Z][A-Z]\]|\[MAGENTATV [A-Z][A-Z]\]|\[RADIOTIMES [A-Z][A-Z]\]|\[WAIPU.TV [A-Z][A-Z]\]|\[TV-SPIELFILM [A-Z][A-Z]\]|\[VODAFONE [A-Z][A-Z]\]|\[EXTERNAL [A-Z][A-Z]\]" /tmp/chmenu
1166
+ if grep -q -E " \[HORIZON [A-Z][A-Z]\]|\[ZATTOO [A-Z][A-Z]\]|\[SWISSCOM [A-Z][A-Z]\]|\[TVPLAYER [A-Z][A-Z]\]|\[MAGENTATV [A-Z][A-Z]\]|\[RADIOTIMES [A-Z][A-Z]\]|\[WAIPU.TV [A-Z][A-Z]\]|\[TV-SPIELFILM [A-Z][A-Z]\]|\[VODAFONE [A-Z][A-Z]\]|\[TVTV [A-Z][A-Z]\]|\[ EXTERNAL [A-Z][A-Z]\]" /tmp/chmenu
1095
1167
then
1096
1168
bash /tmp/chmenu
1097
1169
@@ -1127,9 +1199,9 @@ then
1127
1199
if [ -s /tmp/channels ]
1128
1200
then
1129
1201
sed -i ' s/\\\[/[/g;s/\\\]/]/g;s/\\(/(/g;s/\\)/)/g;s/\\\&/\&/g' /tmp/channels
1130
- sed ' s/ "\[HORIZON [A-Z][A-Z]\] /\n/g;s/"\[HORIZON [A-Z][A-Z]\] //g;s/ "\[ZATTOO [A-Z][A-Z]\] /\n/g;s/"\[ZATTOO [A-Z][A-Z]\] //g;s/ "\[SWISSCOM [A-Z][A-Z]\] /\n/g;s/"\[SWISSCOM [A-Z][A-Z]\] //g;s/ "\[TVPLAYER [A-Z][A-Z]\] /\n/g;s/"\[TVPLAYER [A-Z][A-Z]\] //g;s/ "\[MAGENTATV [A-Z][A-Z]\] /\n/g;s/"\[MAGENTATV [A-Z][A-Z]\] //g;s/ "\[RADIOTIMES [A-Z][A-Z]\] /\n/g;s/"\[RADIOTIMES [A-Z][A-Z]\] //g;s/ "\[WAIPU.TV [A-Z][A-Z]\] /\n/g;s/"\[WAIPU.TV [A-Z][A-Z]\] //g;s/ "\[TV-SPIELFILM [A-Z][A-Z]\] /\n/g;s/"\[TV-SPIELFILM [A-Z][A-Z]\] //g;s/ "\[VODAFONE [A-Z][A-Z]\] /\n/g;s/"\[VODAFONE [A-Z][A-Z]\] //g;s/ "\[EXTERNAL [A-Z][A-Z]\] /\n/g;s/"\[EXTERNAL [A-Z][A-Z]\] //g;s/"//g' /tmp/channels > /tmp/xmlch2
1202
+ sed ' s/ "\[HORIZON [A-Z][A-Z]\] /\n/g;s/"\[HORIZON [A-Z][A-Z]\] //g;s/ "\[ZATTOO [A-Z][A-Z]\] /\n/g;s/"\[ZATTOO [A-Z][A-Z]\] //g;s/ "\[SWISSCOM [A-Z][A-Z]\] /\n/g;s/"\[SWISSCOM [A-Z][A-Z]\] //g;s/ "\[TVPLAYER [A-Z][A-Z]\] /\n/g;s/"\[TVPLAYER [A-Z][A-Z]\] //g;s/ "\[MAGENTATV [A-Z][A-Z]\] /\n/g;s/"\[MAGENTATV [A-Z][A-Z]\] //g;s/ "\[RADIOTIMES [A-Z][A-Z]\] /\n/g;s/"\[RADIOTIMES [A-Z][A-Z]\] //g;s/ "\[WAIPU.TV [A-Z][A-Z]\] /\n/g;s/"\[WAIPU.TV [A-Z][A-Z]\] //g;s/ "\[TV-SPIELFILM [A-Z][A-Z]\] /\n/g;s/"\[TV-SPIELFILM [A-Z][A-Z]\] //g;s/ "\[VODAFONE [A-Z][A-Z]\] /\n/g;s/"\[VODAFONE [A-Z][A-Z]\] //g;s/ "\[TVTV [A-Z][A-Z]\] /\n/g;s/"\[TVTV [A-Z][A-Z]\] //g;s/ "\[ EXTERNAL [A-Z][A-Z]\] /\n/g;s/"\[EXTERNAL [A-Z][A-Z]\] //g;s/"//g' /tmp/channels > /tmp/xmlch2
1131
1203
1132
- sed -i ' s/ "\[HORIZON/\n"\[HORIZON/g;s/ "\[ZATTOO/\n"\[ZATTOO/g;s/ "\[SWISSCOM/\n"\[SWISSCOM/g;s/ "\[TVPLAYER/\n"\[TVPLAYER/g;s/ "\[MAGENTATV/\n"\[MAGENTATV/g;s/ "\[RADIOTIMES/\n"\[RADIOTIMES/g;s/ "\[WAIPU.TV/\n"\[WAIPU.TV/g;s/ "\[TV-SPIELFILM/\n"\[TV-SPIELFILM/g;s/ "\[VODAFONE/\n"\[VODAFONE/g;s/ "\[EXTERNAL/\n"\[EXTERNAL/g;' /tmp/channels
1204
+ sed -i ' s/ "\[HORIZON/\n"\[HORIZON/g;s/ "\[ZATTOO/\n"\[ZATTOO/g;s/ "\[SWISSCOM/\n"\[SWISSCOM/g;s/ "\[TVPLAYER/\n"\[TVPLAYER/g;s/ "\[MAGENTATV/\n"\[MAGENTATV/g;s/ "\[RADIOTIMES/\n"\[RADIOTIMES/g;s/ "\[WAIPU.TV/\n"\[WAIPU.TV/g;s/ "\[TV-SPIELFILM/\n"\[TV-SPIELFILM/g;s/ "\[VODAFONE/\n"\[VODAFONE/g;s/ "\[TVTV/\n"\[TVTV/g;s/ "\[ EXTERNAL/\n"\[EXTERNAL/g;' /tmp/channels
1133
1205
1134
1206
if [ -e combine/$( sed -n " $( < /tmp/selectedsetup) p" /tmp/combine) ]
1135
1207
then
@@ -1228,6 +1300,16 @@ then
1228
1300
grep " VODAFONE DE" /tmp/channels | sed ' /VODAFONE DE/s/\[VODAFONE DE\] //g;s/.*/&,/g;$s/,/]\n}/g;1i{"channels":\[' > combine/$( sed -n " $( < /tmp/selectedsetup) p" /tmp/combine) /vdf_de_channels.json
1229
1301
fi
1230
1302
1303
+ if [ -e xml/tvtv_us.xml ]
1304
+ then
1305
+ grep " TVTV USA" /tmp/channels | sed ' /TVTV USA/s/\[TVTV USA\] //g;s/.*/&,/g;$s/,/]\n}/g;1i{"channels":\[' > combine/$( sed -n " $( < /tmp/selectedsetup) p" /tmp/combine) /tvtv_us_channels.json
1306
+ fi
1307
+
1308
+ if [ -e xml/tvtv_ca.xml ]
1309
+ then
1310
+ grep " TVTV CANNADA" /tmp/channels | sed ' /TVTV CANNADA/s/\[TVTV CANNADA\] //g;s/.*/&,/g;$s/,/]\n}/g;1i{"channels":\[' > combine/$( sed -n " $( < /tmp/selectedsetup) p" /tmp/combine) /tvtv_ca_channels.json
1311
+ fi
1312
+
1231
1313
if [ -e xml/external_oa.xml ]
1232
1314
then
1233
1315
grep " EXTERNAL OA" /tmp/channels | sed ' /EXTERNAL OA/s/\[EXTERNAL OA\] //g;s/.*/&,/g;$s/,/]\n}/g;1i{"channels":\[' > combine/$( sed -n " $( < /tmp/selectedsetup) p" /tmp/combine) /ext_oa_channels.json
@@ -1873,6 +1955,42 @@ then
1873
1955
fi
1874
1956
fi
1875
1957
1958
+ # TVTV US
1959
+ if [ -s combine/$folder /tvtv_us_channels.json ]
1960
+ then
1961
+ if [ -s xml/tvtv_us.xml ]
1962
+ then
1963
+ sed ' s/fileNAME/tvtv_us.xml/g' ch_combine.pl > /tmp/ch_combine.pl
1964
+ sed -i " s/channelsFILE/$folder \/tvtv_us_channels.json/g" /tmp/ch_combine.pl
1965
+ printf " \n<!-- CHANNEL LIST: TVTV USA -->\n\n" >> /tmp/combined_channels
1966
+ perl /tmp/ch_combine.pl >> /tmp/combined_channels
1967
+
1968
+ sed ' s/fileNAME/tvtv_us.xml/g' prog_combine.pl > /tmp/prog_combine.pl
1969
+ sed -i " s/channelsFILE/$folder \/tvtv_us_channels.json/g" /tmp/prog_combine.pl
1970
+ sed -i " s/settingsFILE/$folder \/settings.json/g" /tmp/prog_combine.pl
1971
+ printf " \n<!-- PROGRAMMES: TVTV USA -->\n\n" >> /tmp/combined_programmes
1972
+ perl /tmp/prog_combine.pl >> /tmp/combined_programmes
1973
+ fi
1974
+ fi
1975
+
1976
+ # TVTV CA
1977
+ if [ -s combine/$folder /tvtv_ca_channels.json ]
1978
+ then
1979
+ if [ -s xml/tvtv_ca.xml ]
1980
+ then
1981
+ sed ' s/fileNAME/tvtv_ca.xml/g' ch_combine.pl > /tmp/ch_combine.pl
1982
+ sed -i " s/channelsFILE/$folder \/tvtv_ca_channels.json/g" /tmp/ch_combine.pl
1983
+ printf " \n<!-- CHANNEL LIST: TVTV CANNADA -->\n\n" >> /tmp/combined_channels
1984
+ perl /tmp/ch_combine.pl >> /tmp/combined_channels
1985
+
1986
+ sed ' s/fileNAME/tvtv_ca.xml/g' prog_combine.pl > /tmp/prog_combine.pl
1987
+ sed -i " s/channelsFILE/$folder \/tvtv_ca_channels.json/g" /tmp/prog_combine.pl
1988
+ sed -i " s/settingsFILE/$folder \/settings.json/g" /tmp/prog_combine.pl
1989
+ printf " \n<!-- PROGRAMMES: TVTV CANNADA -->\n\n" >> /tmp/combined_programmes
1990
+ perl /tmp/prog_combine.pl >> /tmp/combined_programmes
1991
+ fi
1992
+ fi
1993
+
1876
1994
# EXTERNAL SLOT 1
1877
1995
if [ -s combine/$folder /ext_oa_channels.json ]
1878
1996
then
0 commit comments