#!/bin/bash
#
# FLVGET Plugin for "TuVideo.Vidiac.com" version 1.0
# http://tuvideo.vidiac.com/
#
# This plugin is released under GPL free license.
#
# Pablo Chinea <khertz@gmail.com>
#################################################

if [[ $1 == '-q' ]]
then
	echo "FLVGET_PLUGIN|TuVideo.Vidiac.com|tuvideo.vidiac.com"
	exit 0
fi

id=$(echo "$1" | sed -e 's/.*\/\(.*\)\.htm.*/\1/')
url="http://209.9.234.32/flv2/${id:0:3}/$id-.flv"
filename=$(echo "$url" | sed -e 's/.*\/\(.*\)$/\1/')

echo "$url|$filename"
