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

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


url="http://www.racegarden.com/filestore/videos/$(echo $1 | cut -d'=' -f2).flv"
filename=$(echo "$url" | sed -e 's/.*\/\(.*\)$/\1/')

echo "$url|$filename"
