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

if [[ $1 == '-q' ]]
then
	echo "FLVGET_PLUGIN|TacoBomb|tacobomb.com"
	exit 0
fi

url="http://www.tacobomb.com$(wget -q "$1" -O - | grep EMBED | cut -d'"' -f28)"
filename=$(echo "$url" | sed -e 's/.*\/\(.*\)$/\1/')

echo "$url|$filename"
