-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathindex.html
315 lines (232 loc) · 12.5 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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>Homebase (for Plex)</title>
<!-- Needs a favicon -->
<link rel="shortcut icon" href="./favicon.ico">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.2/css/bootstrap.min.css" integrity="sha384-Smlep5jCw/wG7hdkwQ/Z5nLIefveQRIY9nfy6xoR1uRYBtpZgI6339F5dgvm/e9B" crossorigin="anonymous">
<link rel="stylesheet" href="assets/styles/custom.min.css">
<script defer src="https://use.fontawesome.com/releases/v5.1.0/js/all.js" integrity="sha384-3LK/3kTpDE/Pkp8gTNp2gR/2gOiwQ6QaO7Td0zV76UFJVhqLl4Vl3KL1We6q6wR9" crossorigin="anonymous"></script>
</head>
<body>
<nav class="navbar fixed-top navbar-dark bg-transparent">
<button class="navbar-toggler btn-dark" type="button" data-toggle="offcanvas">
<span class="navbar-toggler-icon"></span>
</button>
<div class="navbar-collapse offcanvas-collapse bg-white shadow">
<button type="button" id="dismissNav" class="btn btn-link text-dark" data-toggle="offcanvas">
<i class="fas fa-times fa-lg"></i>
</button>
<div class="d-flex justify-content-center align-items-center">
<img src="assets/images/homebase-logo-invert.svg" alt="Place Logo" width="40" height="80">
</div>
<div class="list-group list-group-flush mb-3">
<a href="./" title="Home" class="list-group-item list-group-item-action active">
Home
</a>
<!-- This needs to have a setting -->
<a href="./ombi" title="Ombi" class="list-group-item list-group-item-action d-flex justify-content-between align-items-center">Request Content <i class="fas fa-fw fa-external-link-alt"></i></a>
<a href="./recentlyadded" title="Recently Added" class="list-group-item list-group-item-action">Recently Added</a>
</div>
<div class="list-group list-group-flush mb-3">
<a href="http://app.plex.tv/web/app" title="Plex Web" target="_blank" class="list-group-item list-group-item-action d-flex justify-content-between align-items-center">Watch Now <i class="fas fa-fw fa-external-link-alt"></i></a>
</div>
<div class="container">
<a href="https://www.paypal.me/tylerforesthauser" title="Donate" target="_blank" class="btn btn-dark btn-block">DONATE</a>
</div>
</div>
</nav>
<header class="jumbotron jumbotron-fluid bg-dark text-white text-center">
<div class="container">
<img src="assets/images/homebase-logo.svg" alt="Homebase Logo" width="160" height="160">
<h1 class="display-4 mt-0">Homebase (for Plex)</h1>
<p>Welcome to your Homebase for Plex. See what's recently been added to Plex, request new content and check out various stats about this Plex Media Server.</p>
</div>
</header>
<main role="main" class="container">
<div class="row">
<div class="col-sm-6 col-lg-6 mb-4">
<div class="card h-100 text-center shadow">
<h4 class="card-header px-2">Request Content</h4>
<div class="card-body">
<p class="card-text">
<img src="assets/images/ombi-logo.svg" alt="Ombi Logo" width="160" height="124">
</p>
<p class="card-text">Is there a movie or TV show you've been hankering to watch but it's not currently on Plex? Request it here!</p>
</div><!-- card-body -->
<div class="card-footer bg-transparent border-top-0">
<!-- This needs to have a setting -->
<a class="btn btn-dark" href="./ombi" title="Ombi" role="button" target="_blank">Ombi <i class="fas fa-fw fa-external-link-alt" style="vertical-align: baseline;"></i></a>
</div>
</div><!-- card -->
</div><!-- col-sm-6 col-lg-6 -->
<div class="col-sm-6 col-lg-6 mb-4">
<div class="card h-100 text-center shadow">
<h4 class="card-header px-2">Recently Added</h4>
<div class="card-body">
<p class="card-text">
<img src="assets/images/clock.svg" alt="Recently Added" width="160" height="124">
</p>
<p class="card-text">Have you lost track of all the new content being added to Plex? Check out what's new in the last week.</p>
</div><!-- card-body -->
<div class="card-footer bg-transparent border-top-0">
<a class="btn btn-dark" href="./recentlyadded" title="What's New in Plex" role="button">Recently Added</a>
</div>
</div><!-- card -->
</div><!-- col-sm-6 col-lg-6 -->
</div><!-- row -->
<div class="row">
<div class="col-sm-12 col-lg-4 mb-4">
<div class="card h-100 bg-dark text-white shadow">
<h4 class="card-header text-center px-2">Statistics</h4>
<ul id="serverInformation" class="list-group list-group-flush">
<!-- Check if Plex Server is online -->
<li id="serverStatus" class="list-group-item d-flex justify-content-between align-items-center list-group-item-info">
Server Status: Loading...
</li>
<!-- Check Current Activity -->
<li id="currentActivity" class="list-group-item d-flex justify-content-between align-items-center bg-dark">
<span class="d-flex align-items-center">
Current Activity <button type="button" id="getCurrentActivity" title="Refresh Current Activity" onclick="getCurrentActivityViaPlex()" class="btn btn-sm btn-link text-muted py-0"><i class="fas fa-fw fa-sync-alt fa-spin"></i></button>
</span>
<span id="currentActivityStreamCount">Loading...</span>
</li>
</ul>
</div><!-- card -->
</div><!-- col-sm-12 col-lg-4 -->
<div class="col-sm-12 col-lg-4 mb-4">
<div class="card h-100 shadow">
<div class="card-body rounded-top pb-0 bg-dark text-white">
<h4 class="text-center">Top Content Ratings</h4>
<ul class="nav nav-tabs nav-justified" id="contentRatingTabs" role="tablist">
<li class="nav-item">
<span>Loading...</span>
</li>
</ul>
</div>
<div class="tab-content bg-dark rounded-bottom" id="contentRatingTabContent">
<div class="tab-pane rounded-bottom active bg-white">
<ul class="list-group list-group-flush"></ul>
</div>
</div>
</div><!-- card -->
</div><!-- col-sm-12 col-lg-4 -->
<div class="col-sm-12 col-lg-4 mb-4">
<div class="card h-100 shadow">
<div class="card-body rounded-top pb-0 bg-dark text-white">
<h4 class="text-center">Top Genres</h4>
<ul class="nav nav-tabs nav-justified" id="genreTabs" role="tablist">
<li class="nav-item">
<span>Loading...</span>
</li>
</ul>
</div>
<div class="tab-content bg-dark rounded-bottom" id="genreTabContent">
<div class="tab-pane rounded-bottom active bg-white">
<ul class="list-group list-group-flush"></ul>
</div>
</div>
</div><!-- card -->
</div><!-- col-sm-12 col-lg-4 -->
</div>
<div class="row">
<div class="col-md-6 col-lg-4 mb-4">
<div class="card h-100 bg-dark text-white shadow">
<h4 class="card-header text-center px-2">Most Popular Movies</h4>
<ul id="popMovies" class="list-group list-group-flush"></ul>
<div class="card-footer bg-dark border-top-0 p-2">
<div class="input-group input-group-sm">
<div class="input-group-prepend">
<label for="setPopMovieRange" class="input-group-text">in the last</label>
</div>
<select id="setPopMovieRange" class="form-control form-control-sm" onchange="getPopularMovies(this.value, '5')">
<option value="30" selected>1 Month</option>
<option value="90">3 Months</option>
<option value="180">6 Months</option>
<option value="365">1 Year</option>
<option value="730">2 Years</option>
</select>
</div>
</div>
</div><!-- card -->
</div><!-- col-md-6 col-lg-4 -->
<div class="col-md-6 col-lg-4 mb-4">
<div class="card h-100 bg-dark text-white shadow ">
<h4 class="card-header text-center px-2">Most Popular TV Shows</h4>
<ul id="popTvShows" class="list-group list-group-flush"></ul>
<div class="card-footer bg-dark border-top-0 p-2">
<div class="input-group input-group-sm">
<div class="input-group-prepend">
<label for="setPopTvRange" class="input-group-text">in the last</label>
</div>
<select id="setPopTvRange" class="form-control form-control-sm" onchange="getPopularTvShows(this.value, '5')">
<option value="30" selected>1 Month</option>
<option value="90">3 Months</option>
<option value="180">6 Months</option>
<option value="365">1 Year</option>
<option value="730">2 Years</option>
</select>
</div>
</div>
</div><!-- card -->
</div><!-- col-md-6 col-lg-4 -->
<div class="col-sm-12 col-lg-4 mb-4">
<div class="card h-100 bg-dark text-white shadow">
<h4 class="card-header text-center px-2">Top Platforms</h4>
<ul id="topPlatforms" class="list-group list-group-flush"></ul>
<div class="card-footer bg-dark border-top-0 p-2">
<div class="input-group input-group-sm">
<div class="input-group-prepend">
<label for="setPlatformRange" class="input-group-text">in the last</label>
</div>
<select id="setPlatformRange" class="form-control form-control-sm" onchange="getTopPlatforms(this.value, '5')">
<option value="30" selected>1 Month</option>
<option value="90">3 Months</option>
<option value="180">6 Months</option>
<option value="365">1 Year</option>
<option value="730">2 Years</option>
</select>
</div>
</div>
</div><!-- card -->
</div><!-- col-md-6 col-lg-4 -->
</div><!-- row -->
</main><!-- container -->
<div class="container">
<footer class="p-3 mb-4 bg-dark text-white rounded d-flex align-items-center shadow">
<small>Copyright © <?= date("Y") ?> Tyler Forest-Hauser | Site Development by <a href="https://tylerforesthauser.com/" title="Tyler Forest-Hauser - Is he an astronaut?">Tyler Forest-Hauser</a> | Statistics and Recently Added by <a href="http://tautulli.com/" title="Tautulli - Monitoring for your Plex Media Server">Tautulli</a></small>
</footer>
</div><!-- container -->
<div class="modal-backdrop fade" data-toggle="offcanvas"></div>
<script src="https://code.jquery.com/jquery-3.3.1.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.2/js/bootstrap.min.js" integrity="sha384-o+RDsa0aLu++PJvFqy8fFScvbHFLtbvScb8AjopnFD+iEQ7wo/CG0xlczd+2O/em" crossorigin="anonymous"></script>
<script src="assets/scripts/utilities.js"></script>
<script src="assets/scripts/main.js"></script>
<script type="text/javascript">
'use strict';
$(document).ready(function () {
// INITIALIZE OFFCANVAS MENU TOGGLES
$('[data-toggle="offcanvas"]').on('click', function () {
$('.offcanvas-collapse').toggleClass('open');
$('.modal-backdrop').toggleClass('fade');
});
getServerStatus();
getCurrentActivityViaPlex();
getLibraryStats();
getPopularMovies('30', '5');
getPopularTvShows('30', '5');
getTopPlatforms('30', '5');
getTopContentRatings(['movie', 'show'], [], 6);
getTopGenres(['movie', 'show'], [], 6);
// getTopTag() is definitely a work in progress
//getTopTag('contentRating');
//getTopTag('genre');
//getTopTag('year');
});
</script>
</body>
</html>