/
index.html
104 lines (96 loc) · 3.9 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>MCMT</title>
<style>
</style>
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<link href="screen.css" rel="stylesheet">
<script src="https://code.jquery.com/jquery-3.1.1.min.js" crossorigin="anonymous"></script>
</head>
<body>
<main>
<h2>HDHomeRun MCMT</h2>
<p>Multi Channel Modifier Tool (MCMT) is a simple tool for the SiliconDust HDHomeRun to let you quickly disable all SD or DRM channels.</p>
<ul>
<li>This was like 10 minute hack, and I'm not a coder.</li>
<li>Use at your own risk.</li>
</ul>
<div id="looking">
<h3>Searching for HDHomeRun <div id="spinner"></div></h3>
<ul>
<li>Please make sure you're on the same network as your HDHomeRun.</li>
</ul>
</div>
<div id="found">
<h3>HDHomeRun Found</h3>
<ul id="hdhomerun_details">
<li id="local_IP"></li>
<li id="base_URL"></li>
</ul>
</div>
<div id="actions">
<h3>Actions</h3>
<p>These actions don't provide any feedback they are working, check your <a href="" id="lineup_link">lineup</a> to verify they work.</p>
<div class="button" id="disableSD">Disable All SD Channels</div>
<div class="button" id="disableDRM" >Disable All DRM Channels</div>
<div class="button" id="enableAll">Enable All Channels</div>
</div>
<small>© Copyright 2019 <a href="http://www.bpmarkowitz.com">Ben Markowitz</a> 🖖</small>
</main>
<script>
$( document ).ready(function() {
ip = "";
setTimeout(
function()
{
discoverHDHomeRun()
}, 3000);
function discoverHDHomeRun() {
$.getJSON( "http://ipv4-api.hdhomerun.com/discover", function( data ) {
$("#local_IP").html("Local IP: "+data[0].LocalIP);
ip = data[0].LocalIP
$("#base_URL").html("Base URL: <a href='"+data[0].BaseURL+"'>"+data[0].BaseURL+"</a>");
$("#found").fadeIn();
$("#looking").hide();
$("#actions").fadeIn();
$("#lineup_link").attr("href", "http://"+ip+"/lineup.html")
});
}
$("#disableSD").click(function(){
$.getJSON( "http://"+ip+"/lineup.json?show=all", function( data ) {
$.each(data, function(i, item) {
if(data[i].Subscribed == undefined) {
if(data[i].HD == undefined) {
$.post( "http://10.0.0.15/lineup.post?favorite=x"+data[i].GuideNumber, function( data ) {});
}
}
});
});
});
$("#disableDRM").click(function(){
$.getJSON( "http://"+ip+"/lineup.json?show=all", function( data ) {
$.each(data, function(i, item) {
if(data[i].Subscribed == undefined) {
if(data[i].DRM) {
$.post( "http://10.0.0.15/lineup.post?favorite=x"+data[i].GuideNumber, function( data ) {});
}
}
});
});
});
$("#enableAll").click(function(){
$.getJSON( "http://"+ip+"/lineup.json?show=all", function( data ) {
$.each(data, function(i, item) {
if(data[i].Subscribed == undefined) {
$.post( "http://10.0.0.15/lineup.post?favorite=-"+data[i].GuideNumber, function( data ) {});
}
});
});
});
});
</script>
</body>
</html>