<?xml version="1.0" encoding="utf-8"?>
#if('true' == $request.getParam('invalid'))
<xml>Invalid Token</xml>
#else
<rss version="2.0" xmlns:media="http://search.yahoo.com/mrss/"
  xmlns:dcterms="http://purl.org/dc/terms/"
	xmlns:nl="http://www.neulion.com/iptv/mrss/">
<channel>
	<title>MRSS Videos</title>
	<description>MRSS Videos</description>	

#foreach($program in $response.results)
	<item>
		<title><![CDATA[$program.name]]></title>
		<guid isPermaLink="false">$program.id</guid>
		<description><![CDATA[$program.description]]></description>
#if($program.altName)
		<altTitle><![CDATA[$program.altName]]></altTitle>
#else
		<altTitle><![CDATA[]]></altTitle>
#end
#if($program.altDesc)
		<altDesc><![CDATA[$program.altDesc]]></altDesc>
#else
		<altDesc><![CDATA[]]></altDesc>
#end
		<status>$program.status</status>
		<pubDate>#if($program.releaseDate)$program.releaseDate#end</pubDate>
		<nl:externalId>$program.sku</nl:externalId>
		<nl:releaseDate>#if($program.lastUpdated)$program.lastUpdated#end</nl:releaseDate>
		<media:duration>$program.runtime</media:duration>
		<media:keywords><![CDATA[#foreach($tag in $program.tags)$tag#if($velocityCount != $program.tags.size()),#end#end]]></media:keywords>
		<media:category><![CDATA[#foreach($category in $program.cat)$category#if($velocityCount != $program.cat.size()),#end#end]]></media:category>
		
#if('true' != $request.getParam('hideContent'))
#foreach($dt in $program.devices)
#if($dt == 'pc' || $dt == 'PC')
#set($i = $velocityCount - 1)
#if($program.paths_devices.size() > $i && $program.paths_devices.get($i))
#set($url = $program.paths_devices.get($i))
#if($request.getParam('prefixFrom') && $request.getParam('prefixTo') 
	&& '' != $request.getParam('prefixFrom') && '' != $request.getParam('prefixTo'))
#set($url = $url.replaceAll($request.getParam('prefixFrom'),$request.getParam('prefixTo')))
#end
#if($request.getParam('surfixFrom') && $request.getParam('surfixTo') 
	&& '' != $request.getParam('surfixFrom') && '' != $request.getParam('surfixTo'))
#set($url = $url.replaceAll($request.getParam('surfixFrom'),$request.getParam('surfixTo')))
#end
#end
<media:content url="$url"/>
#end
#end
#end

#foreach($ImgDeviceType in $program.ext_ImgDeviceType)
#set($i = $velocityCount - 1)
#if($program.ext_SmallImgPath.size() > $i && $program.ext_SmallImgPath.get($i) != '' && $program.ext_SmallImgWidth.size() > $i && $program.ext_SmallImgHeight.size() > $i)
<media:thumbnail url="$program.ext_SmallImgPath.get($i)" width="$program.ext_SmallImgWidth.get($i)" height="$program.ext_SmallImgHeight.get($i)"/>
#end
#if($program.ext_BigImgPath.size() > $i && $program.ext_BigImgPath.get($i) != '' && $program.ext_BigImgWidth.size() > $i && $program.ext_BigImgHeight.size() > $i)
<media:thumbnail url="$program.ext_BigImgPath.get($i)" width="$program.ext_BigImgWidth.get($i)" height="$program.ext_BigImgHeight.get($i)"/>
#end
#end

#foreach($paths_devices in $program.paths_devices)
#if($program.devices.size() >= 1)
#set($i = $velocityCount - 1)
#if($program.devices.size() > $i)
<nl:path device="$program.devices.get($i)"><![CDATA[$paths_devices]]></nl:path>
#end
#end
#end
	</item>
#end
</channel>
</rss>
#end