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

if [[ $1 == '-q' ]]
then
	echo "FLVGET_PLUGIN|Thor Links.com!|thorlinks.com"
	exit 0
fi

url=$(wget -q "$1" -O - | grep Download | cut -d'"' -f16)
filename=$(echo "$1" | sed -e 's/.*\/\(.*\)$/\1/').flv

echo "$url|$filename"
