#from Plugins.Extensions.OpenWebif.local import tstrings
#from Plugins.Extensions.OpenWebif.vtiaddon import skinColor

<div class="row clearfix">
	<div class="col-xs-12">
		<div class="card">
			<div class="header">
				<div class="row clearfix">
					<div class="col-xs-7">
						<h2><a class="theme-link-color theme-link-col-$skinColor" target="_blank" title="$tstrings['stream'] $getVar('now.title', '') from $info.name" href='web/stream.m3u?ref=$info.ref&name=$info.name'><i class="material-icons material-icons-centered">tv</i>$info.name</a></h2>
					</div>
					<div class="col-xs-5 align-right">
						<h2>$info.date</h2>
					</div>
				</div>
			</div>
			<div class="body">
				<div class="row clearfix">
					<div class="col-xs-12 col-md-3">
						<img border='0' width="100px" height="60px" src='$getVar("info.picon", "images/default_picon.png")' onclick="open_epg_dialog('$info.ref','$info.name');" href="#" title="$tstrings['show_epg_for'] $info.name" border="0" alt='' /></div>
					</div>
					<div class="col-xs-12 col-md-6">
						<div class="row clearfix" >
							<div class="col-xs-3">
								<span><b>$getVar("now.begin", " ") - $getVar("now.end", " ")</b></span>
							</div>
							<div class="col-xs-6">
								<span><b>$getVar("now.title", " ")</b></span>
							</div>
							<div class="col-xs-3 align-right">
								<span><b>+$getVar("now.tleft", " ") min</b></span>
							</div>
						</div>
						<div class="row clearfix">
							<div class="col-xs-12" style="margin-bottom:-20px;margin-top:-15px;">
								<div class="progress progress-striped" style="height:10px;">
									<div class="progress-bar bg-$skinColor" role="progressbar" aria-valuenow="${getVar("now.progress", "0")}" aria-valuemin="0" aria-valuemax="100" style="width:${getVar("now.progress", "0")}%;margin:0px"></div>
								</div>
							</div>
						</div>
						<div class="row clearfix">
							<div class="col-xs-3">
								<span>$getVar("next.begin", " ") - $getVar("next.end", " ")</span>
							</div>
							<div class="col-xs-6">
								<span>$getVar("next.title", " ")</span>
							</div>
							<div class="col-xs-3 align-right">
								<span>$getVar("next.duration", " ") min</span>
							</div>
						</div>
					</div>
					<div class="col-xs-12 col-md-3 align-right">
						<div class="row clearfix">
							<div class="col-xs-12" style="margin-bottom:0px;margin-top:0px;">
								<span>
#set $tnum = 0
#for $tuner in $info.tuners
	#if $info.tunernumber == $tnum
		<span style="color:$skinColor;"><b>$tuner</b></span>
	#else
		<span>$tuner</span>
	#end if
	#set $tnum = $tnum + 1
#end for
								</span>
							</div>
						</div>
						<div class="row clearfix">
							<div class="col-xs-12" style="margin-bottom:0px;margin-top:0px;">
								<span>$getVar("info.tunertype", " ")</span>
							</div>
						</div>
						<div class="row clearfix">
							<div class="col-xs-12" style="margin-bottom:0px;margin-top:0px;">
								<span>$info.width x $info.height</span>
							</div>
						</div>
					</div>
				</div>
				<div class="row clearfix">
					<div class="col-xs-12" style="margin-bottom:0px;margin-top:0px;">
						<span>
						<b>$tstrings['description']:</b><br/>$getVar("now.shortdesc", " ")
						<br>$getVar("now.longdesc", " ")
						</span>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>
<div class="row clearfix">
	<div class="col-xs-12 col-sm-6 col-md-4">
		<div class="card">
			<div class="body">
				<div class="row clearfix">
					<div class="col-xs-12">
						<p><b>$tstrings['tuner_type']:</b>$getVar("info.tunertype", "N/A")</p>
						<p><b>$tstrings['tuner_number']:</b>$getVar("info.tunernumber", "N/A")</p>
					</div>
				</div>
			</div>
		</div>
	</div>
	<div class="col-xs-12 col-sm-6 col-md-4">
		<div class="card">
			<div class="body">
				<div class="row clearfix">
					<div class="col-xs-6">
						<p><b>$tstrings['tuner_signal_snr']:</b>$getVar("info.snr", "N/A")</p>
						<p><b>$tstrings['tuner_signal_agc']:</b>$getVar("info.agc", "N/A")</p>
					</div>
					<div class="col-xs-6">
						<div class="progress" style="height:10px;max-width:150px;margin-top:5px;">
							<div class="progress-bar bg-$skinColor" role="progressbar" aria-valuenow="100" aria-valuemin="0" aria-valuemax="100" style="width:100%;margin:0px"></div>
						</div>
						<div class="progress" style="height:10px;max-width:150px;margin-bottom:-5px;">
							<div class="progress-bar bg-$skinColor" role="progressbar" aria-valuenow="91" aria-valuemin="0" aria-valuemax="100" style="width:91%;margin:0px"></div>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
	<div class="col-xs-12 col-sm-6 col-md-4">
		<div class="card">
			<div class="body">
				<div class="row clearfix">
					<div class="col-xs-12">
						<p><b>$tstrings['tuner_signal_snr_db']:</b>$getVar("info.snr_db", "N/A")</p>
						<p><b>$tstrings['tuner_ber']:</b>$getVar("info.ber", "N/A")</p>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>


<div class="row clearfix">
	<div class="col-xs-12 col-sm-6 col-md-4">
		<div class="card">
			<div class="body">
				<div class="row clearfix">
					<div class="col-xs-12">
						<p><b>$tstrings['name']:</b>$info.name</p>
						<p><b>$tstrings['video_width']:</b>$info.width</p>
						<p><b>$tstrings['encrypted']:</b>$info.crypt</p>
						<p><b>$tstrings['teletext']:</b>$info.txtpid</p>
						<p><b>$tstrings['a_pid']:</b>$info.apid</p>
						<p><b>$tstrings['ts_id']:</b>$info.tsid</p>
						<p><b>$tstrings['s_ref']:</b>$getVar("info.srefv2", "")</p>
					</div>
				</div>
			</div>
		</div>
	</div>
	<div class="col-xs-12 col-sm-6 col-md-4">
		<div class="card">
			<div class="body">
				<div class="row clearfix">
					<div class="col-xs-12">
						<p><b>$tstrings['provider']:</b> $info.provider</p>
						<p><b>$tstrings['video_height']:</b>$info.height</p>
						<p><b>$tstrings['dolby']:</b>$info.dolby</p>
						<p><b>$tstrings['rec_status']:</b>$info.rec_state</p>
						<p><b>$tstrings['v_pid']:</b>$info.vpid</p>
						<p><b>$tstrings['on_id']:</b>$info.onid</p>
						<p>$info.sref</p>
					</div>
				</div>
			</div>
		</div>
	</div>
	<div class="col-xs-12 col-sm-6 col-md-4">
		<div class="card">
			<div class="body">
				<div class="row clearfix">
					<div class="col-xs-12">
						<p><b>$tstrings['namespace']:</b>$info.namespace</p>
						<p><b>$tstrings['video_wide']:</b>$info.wide</p>
						<p><b>$tstrings['subservices']:</b>$info.subs</p>
						<p><b>$tstrings['pmt_pid']:</b>$info.pmtpid</p>
						<p><b>$tstrings['pcr_pid']:</b>$info.pcrpid</p>
						<p><b>$tstrings['s_id']:</b>$info.sid</p>
						<p><b>Orbital Position:</b>$getVar("info.orbital_position", "")</p>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>

