/*
*
* This file is part of xVideoServiceThief,
* an open-source cross-platform Video service download
*
* Copyright (C) 2007 - 2009 Xesc & Technology
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with xVideoServiceThief. If not, see <http://www.gnu.org/licenses/>.
*
* Contact e-mail: Xesc <xeskuu.xvst@gmail.com>
* Program URL   : http://xviservicethief.sourceforge.net/
*
*/

function RegistVideoService()
{
	this.version = "1.0.1";
	this.minVersion = "2.0.0a";
	this.author = "Xesc & Technology 2009";
	this.website = "http://www.xvideos.com/";
	this.ID = "xvideos.com";
	this.caption = "XVideos";
	this.adultContent = true;
	this.musicSite = false;
}

function getVideoInformation(url)
{
	// video information
	var result = new VideoDefinition();
	// download webpage
	var http = new Http();
	var html = http.downloadWebpage(url);
	// get video title
	result.title = copyBetween(html, "<title>", "</title>");
	result.title = strReplace(result.title, "- XVIDEOS.COM", "");
	// get video flv
	result.URL = cleanUrl(copyBetween(html, "flv_url=", "&"));
	// return the video information
	return result;
}

function getVideoServiceIcon()
{
	return new Array(
		0x89,0x50,0x4e,0x47,0x0d,0x0a,0x1a,0x0a,0x00,0x00,0x00,0x0d,0x49,0x48,0x44,0x52,
		0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x10,0x08,0x03,0x00,0x00,0x00,0x28,0x2d,0x0f,
		0x53,0x00,0x00,0x00,0x3c,0x50,0x4c,0x54,0x45,0x00,0x00,0x00,0x22,0x22,0x30,0x33,
		0x33,0x33,0x66,0x33,0x33,0x66,0x66,0x66,0x80,0x80,0x80,0x99,0x66,0x66,0x99,0x99,
		0x99,0x99,0xcc,0xcc,0xc0,0xc0,0xc0,0xcc,0x99,0x99,0xcc,0xcc,0xcc,0xdd,0xdd,0xdd,
		0xee,0x00,0x00,0xf0,0xf0,0xf0,0xff,0x00,0x00,0xff,0x33,0x33,0xff,0x66,0x66,0xff,
		0x99,0x99,0xff,0xff,0xff,0x11,0x14,0x10,0x39,0x00,0x00,0x00,0x63,0x49,0x44,0x41,
		0x54,0x18,0x19,0x5d,0xc1,0x49,0x12,0x83,0x40,0x0c,0x04,0xb0,0x86,0xec,0x01,0x6c,
		0x18,0xfd,0xff,0xaf,0xb9,0xa6,0x46,0x8a,0x49,0x4c,0x62,0x12,0x93,0xd0,0x83,0x71,
		0xbd,0xbf,0xc5,0xba,0x09,0xa3,0x6b,0xf4,0xfe,0x4c,0xd9,0xf2,0x11,0xea,0x3c,0x8f,
		0xcb,0x9e,0xb7,0xc7,0x52,0x82,0xbd,0x0f,0xac,0x37,0xcb,0x9d,0x60,0x74,0x57,0x79,
		0xe5,0x93,0x8d,0x50,0x7d,0x9d,0x27,0x95,0x65,0x41,0xb8,0x8e,0x1a,0x3d,0xd4,0x2d,
		0x0f,0x44,0x75,0x95,0xd1,0x6c,0x6b,0x21,0x28,0x7f,0x62,0x12,0x93,0x98,0xfc,0x00,
		0xcc,0xa2,0x10,0x8f,0xcc,0xb7,0xb5,0x32,0x00,0x00,0x00,0x00,0x49,0x45,0x4e,0x44,
		0xae,0x42,0x60,0x82);
}
