#!/bin/bash
#
# FLVGET Plugin for "Lulu TV" version 1.1
# http://www.lulu.tv/
#
# This plugin is released under GPL free license.
#
# Pablo Chinea <khertz@gmail.com>
#################################################

if [[ $1 == '-q' ]]
then
	echo "FLVGET_PLUGIN|Lulu TV|lulu.tv"
	exit 0
fi

url="$(wget -q -O - "$1" | grep SWFObject | sed -e 's/.*file=\(.*\)\&vwidth.*/\1/')"
filename=$(echo "$url" | sed -e 's/.*\/\(.*\)$/\1/')

echo "$url|$filename"
