1 diff --git a/plugin/controllers/models/stream.py b/plugin/controllers/models/stream.py
2 index c42ba76..4380052 100644
3 --- a/plugin/controllers/models/stream.py
4 +++ b/plugin/controllers/models/stream.py
5 @@ -38,11 +38,16 @@ def getStream(session, request, m3ufile):
6 if "name" in request.args:
7 name = request.args["name"][0]
8 # #EXTINF:-1,%s\n remove not compatiple with old api
10 + if "device" in request.args :
11 + if request.args["device"][0] == "phone" :
14 progopt="#EXTVLCOPT:program=%d\n" % (int(sRef.split(':')[3],16))
17 - response = "#EXTM3U \n#EXTVLCOPT--http-reconnect=true \n%shttp://%s:8001/%s\n" % (progopt,request.getRequestHostname(), sRef)
18 + #response = "#EXTM3U \n#EXTVLCOPT--http-reconnect=true \n%shttp://%s:8001/%s\n" % (progopt,request.getRequestHostname(), sRef)
19 + response = "#EXTM3U \n#EXTVLCOPT--http-reconnect=true \n%shttp://%s:%s/%s\n" % (progopt,request.getRequestHostname(), portNumber, sRef)
20 request.setHeader('Content-Type', 'application/text')
23 diff --git a/plugin/controllers/views/ajax/channels.tmpl b/plugin/controllers/views/ajax/channels.tmpl
24 index 9bad685..a8253d2 100755
25 --- a/plugin/controllers/views/ajax/channels.tmpl
26 +++ b/plugin/controllers/views/ajax/channels.tmpl
28 <a href="#" onclick="open_epg_pop('$channel.ref')">
29 <img src="../images/ico_epg.png" title="Show EPG for $channel.name" border="0">
31 -<a target="_blank" href='/web/stream.m3u?ref=$channel.ref&name=$channel.name'>
32 +<a href="#" onclick="jumper8001('$channel.ref', '$channel.name');">
33 <img align="top" src="../images/ico_stream.png" title="Stream $channel.name" border="0">
35 +<a href="#" onclick="jumper8002('$channel.ref', '$channel.name');">
36 +<img align="top" src="../images/ico_stream.png" title="Stream Port 8002 $channel.name" border="0">
39 <a target="_blank" href='#'>
40 <img align="top" src="../images/ico_lock.png" title="Locked" border="0">
41 diff --git a/plugin/controllers/views/main.tmpl b/plugin/controllers/views/main.tmpl
42 index 12b9941..3d0debc 100755
43 --- a/plugin/controllers/views/main.tmpl
44 +++ b/plugin/controllers/views/main.tmpl
46 <script type="text/javascript" src="/js/jquery-ui-1.8.18.custom.min.js"></script>
\r
47 <script type="text/javascript" src="/js/openwebif.js"></script>
\r
50 + // VuPlus Port Jumper
\r
52 + function getWinSize(win) {
\r
53 + if(!win) win = window;
\r
55 + if(typeof win.innerWidth != "undefined") {
\r
56 + s.screenWidth = win.screen.width;
\r
57 + s.screenHeight = win.screen.height;
\r
59 + s.screenWidth = 0;
\r
60 + s.screenHeight = 0;
\r
65 + function getDeviceType() {
\r
66 + var ss = getWinSize();
\r
67 + var screenLen = 0;
\r
68 + // alert( ss.screenHeight );
\r
69 + // alert( ss.screenWidth );
\r
71 + if( ss.screenHeight > ss.screenWdith ) {
\r
72 + screenLen = ss.screenHeight;
\r
74 + screenLen = ss.screenWidth;
\r
77 + if( screenLen < 500 ) {
\r
84 + function getOSType() {
\r
85 + var agentStr = navigator.userAgent;
\r
87 + if(agentStr.indexOf("iPod") > -1 || agentStr.indexOf("iPhone") > -1)
\r
89 + else if(agentStr.indexOf("Android") > -1)
\r
95 + function jumper8002( sref, sname ) {
\r
96 + var deviceType = getDeviceType();
\r
97 + document.portForm.ref.value = sref;
\r
98 + document.portForm.name.value = sname;
\r
99 + document.portForm.device.value = "phone";
\r
100 + document.portForm.submit();
\r
103 + function jumper8001( sref, sname ) {
\r
104 + var deviceType = getDeviceType();
\r
105 + document.portForm.ref.value = sref;
\r
106 + document.portForm.name.value = sname;
\r
107 + document.portForm.device.value = "etc";
\r
108 + document.portForm.submit();
\r
112 <title>Open Webif</title>
\r
116 <div id="footer"><h3> <a href="https://github.com/E2OpenPlugins">E2OpenPlugins</a> | <a href="http://www.vuplus-community.net">Black Hole</a> | <a href="http://openpli.org">OpenPli</a> | <a href="http://forum.sifteam.eu">Sif</a> | <a href="http://www.vuplus-support.org">Vti</a></h3></div>
\r
120 + <form name="portForm" action="/web/stream.m3u" method="GET" target="_blank">
\r
121 + <input type="hidden" name="ref">
\r
122 + <input type="hidden" name="name">
\r
123 + <input type="hidden" name="device">
\r