1
0
mirror of https://github.com/DigitalDevices/octonet.git synced 2023-10-10 11:36:52 +00:00

Channelscan

Added features to TransponderList.json
   Allow to define sort order for channels
   Allow overwrite channel title,group,pids
   Define custom groups (i.e. favourites)

Removed client side sorting from browsertv.html
Reworked creating ChannelList.json from legacy database to allow
serveside sorting.
This commit is contained in:
mvoelkel
2016-01-24 12:58:42 +01:00
parent bbee4d1c4c
commit e65fb9aaab
6 changed files with 303 additions and 175 deletions

View File

@@ -130,38 +130,36 @@ ScanReq.onreadystatechange=function()
function GetStatus()
{
ScanReq.open("GET", "/channelscan.lua?select=status", true);
ScanReq.open("GET", "/channelscan.lua?select=status&t=" + Math.random(), true);
ScanReq.send();
}
function ScanStatus(response)
{
var s = JSON.parse(response);
var done = false;
var done = true;
if( s.status )
{
if( s.status == "active" )
{
document.getElementById("scancount").firstChild.nodeValue = s.count;
document.getElementById("scantext").firstChild.nodeValue = s.msg;
done = false;
}
else if( s.status == "busy" )
{
document.getElementById("scancount").firstChild.nodeValue = "\u00A0";
document.getElementById("scantext").firstChild.nodeValue = "BUSY";
done = true;
}
else if( s.status == "done" )
{
document.getElementById("scancount").firstChild.nodeValue = s.count;
document.getElementById("scantext").firstChild.nodeValue = "Channels found";
done = true;
}
else if( s.status == "deleted" )
{
document.getElementById("scancount").firstChild.nodeValue = "\u00A0";
document.getElementById("scantext").firstChild.nodeValue = "Channel list deleted";
done = true;
}
else if( s.status == "restored" )
{
@@ -170,7 +168,10 @@ function ScanStatus(response)
document.getElementById("scantext").firstChild.nodeValue = "Nothing restored";
else
document.getElementById("scantext").firstChild.nodeValue = "Previous channel list restored";
done = true;
}
else if( s.status == "retry" )
{
done = false;
}
}
@@ -216,8 +217,9 @@ function InitiateScan()
if( param != "" )
{
ScanReq.open("GET", "/channelscan.lua?select=scan" + param + "&sitables=1&sort=1&restartdms=1", true);
ScanReq.send();
ScanReq.open("POST", "/channelscan.lua", true);
ScanReq.setRequestHeader("Content-type","application/x-www-form-urlencoded");
ScanReq.send("select=scan" + param + "&sitables=1&sort=1&restartdms=1");
document.getElementById("scancount").firstChild.nodeValue = "\u00A0";
document.getElementById("scantext").firstChild.nodeValue = "Scanning...";
}
@@ -237,15 +239,16 @@ function PollStatus()
function DeleteScan()
{
DisableButtons(true);
ScanReq.open("GET", "/channelscan.lua?select=delete", true);
ScanReq.send();
ScanReq.setRequestHeader("Content-type","application/x-www-form-urlencoded");
ScanReq.send("select=delete");
}
function RestoreScan()
{
DisableButtons(true);
ScanReq.open("GET", "/channelscan.lua?select=restore", true);
ScanReq.send();
ScanReq.open("POST", "/channelscan.lua", true);
ScanReq.setRequestHeader("Content-type","application/x-www-form-urlencoded");
ScanReq.send("select=restore");
}
</script>