summaryrefslogtreecommitdiff
path: root/src/menuscripts/stream-quvi
blob: b1d766253bd7ea77f235f8e1fd13361e837849b3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/bash

set -e

. utils.sh

if [ "x$1" = "x" ]; then
    exit 1
fi

Q=$(quvi "$1")
if [ "x$Q" = "x" ]; then
    exit 1
fi

STREAMURL=$(echo "$Q" | sed -n 's/.*"url": "\(.*\)".*/\1/p' | head -n1)
STREAMTITLE=$(echo "$Q" | sed -n 's/.*"page_title": "\(.*\)".*/\1/p' | head -n1)

outputWebviMenu "$STREAMURL" "$STREAMTITLE"