]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
Added some extra debug and protection when getting mux config.
authorAdam Sutton <dev@adamsutton.me.uk>
Thu, 4 Oct 2012 20:36:46 +0000 (21:36 +0100)
committerAdam Sutton <dev@adamsutton.me.uk>
Thu, 4 Oct 2012 20:36:46 +0000 (21:36 +0100)
support/getmuxlist
support/mkbundle

index dae32eb1c23706c273224a1055810ac1151a6b46..c2b1b7a88f2b350b6d9861d5b9b5281bc54d6495 100755 (executable)
@@ -7,20 +7,35 @@ URL=http://linuxtv.org/hg/dvb-apps/archive/tip.tar.bz2
 TMP=/tmp/getmuxlist.$$
 TVH=$(cd $(dirname $0)/..; pwd)/data/dvb-scan
 
+function die
+{
+  [ ! -z "$1" ] && echo $1 || echo
+  rm -rf $TMP
+  rm -rf $TVH
+  exit 1
+}
+
 # Get files
 rm -rf $TMP
 mkdir -p $TMP
 cd $TMP
-(wget -O - -q $URL | tar xj) || (curl $URL | tar xj)
-cd dvb-apps*
+echo -n "fetching scan files ... "
+(wget -O - -q $URL | tar xj) 2> /dev/null ||\
+(curl $URL | tar xj) 2> /dev/null
+cd dvb-apps* 2> /dev/null || die "failed"
+echo "done"
 
 # Copy to TVH
+echo -n "moving into tvh data/ directory ... "
 rm -rf $TVH
 mkdir -p $TVH
 mv ./util/scan/* $TVH
+echo "done"
 
 # Cleanup
+echo -n "cleaning up ... "
 for f in $TVH/*; do
   [ -f $f ] && rm -f $f
 done
 rm -rf $TMP
+echo "done"
index 9bc114d01c91695235d883aff2a55e8dcf266d9c..8818c5928405795bc09b79fed29aaa4663205d10 100755 (executable)
@@ -125,7 +125,7 @@ def add_entry ( ents, path = "", name = "", idx = -1, next = -1 ):
   for k in ents:
     
     # File
-    if not ents[k]:
+    if ents[k] is None:
       output_file(d, k, idx+1, p)
       p = idx = idx + 1
       c = c + 1