]> code.delx.au - monosys/commitdiff
Fixes
authorJames Bunton <jamesbunton@delx.net.au>
Sat, 6 Aug 2011 02:52:06 +0000 (12:52 +1000)
committerJames Bunton <jamesbunton@delx.net.au>
Sat, 6 Aug 2011 02:52:06 +0000 (12:52 +1000)
scripts/iview-downloader
scripts/pulse_rip

index 1aa11fcb19b4969795b6c79bdcd8701df8411ecf..e8d2ba032b78bfe9b707ba2d6d98e6137eb5e0ea 100755 (executable)
@@ -85,7 +85,7 @@ def get_categories():
                categories[name] = cid
        return categories
 
-def get_series(cid):
+def get_episodes(cid):
        series_list_doc = grab_json(PARAMS["api"] + "seriesIndex")
        episode_list = {}
        for series in series_list_doc:
@@ -115,15 +115,11 @@ def main():
                if cid is None:
                        continue
                while True:
-                       sid = choose(get_series(cid), allow_multi=False)
-                       if sid is None:
+                       generator = choose(get_episodes(cid), allow_multi=True)
+                       if generator is None:
                                break
-                       while True:
-                               generator = choose(get_episodes(sid), allow_multi=True)
-                               if generator is None:
-                                       break
-                               for title, vpath in generator:
-                                       download_video(title, vpath)
+                       for title, vpath in generator:
+                               download_video(title, vpath)
 
 if __name__ == "__main__":
        try:
index ec4fc4d8d72531d0f99b64e5651a731d0c07571d..687e3ad9d0ba35cd2a7d5f4ae31962ea07c516cd 100755 (executable)
@@ -8,6 +8,8 @@ echo
 echo "Recording now!"
 
 src="$(pactl list | grep -A2 '^Source #' | grep 'Name: .*\.monitor$' | awk '{print $NF}' | tail -n1)"
-parec -d "$src" --rate=44100 --format=s16le --channels=1 "$1".raw
-sox -e 'signed-integer' -r 44100 -b 16 -L -c 1 "$1".raw "$1".wav
+dest="$1"
+shift
+parec -d "$src" --rate=44100 --format=s16le --channels=1 /dev/stdout | \
+       lame -r -s '44.1' --signed --bitwidth 16 --little-endian -m m "$@" /dev/stdin "$dest"