Skip to content

Commit 1e15eb0

Browse files
committed
Updating HDHR, removing SSDP (not using) and adding some setup instruction views
1 parent 0c2cbc1 commit 1e15eb0

File tree

8 files changed

+174
-175
lines changed

8 files changed

+174
-175
lines changed

app/Console/Commands/SsdpService.php

-89
This file was deleted.

app/Http/Controllers/PlaylistGenerateController.php

+18-1
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,23 @@ public function hdhr(string $uuid)
113113
return response($xmlResponse)->header('Content-Type', 'application/xml');
114114
}
115115

116+
public function hdhrOverview(string $uuid)
117+
{
118+
// Fetch the playlist so we can send a 404 if not found
119+
$playlist = Playlist::where('uuid', $uuid)->first();
120+
if (!$playlist) {
121+
$playlist = MergedPlaylist::where('uuid', $uuid)->first();
122+
}
123+
if (!$playlist) {
124+
$playlist = CustomPlaylist::where('uuid', $uuid)->first();
125+
}
126+
127+
return view('hdhr', [
128+
'name' => $playlist->name,
129+
'uuid' => $uuid,
130+
]);
131+
}
132+
116133
public function hdhrDiscover(string $uuid)
117134
{
118135
// Fetch the playlist so we can send a 404 if not found
@@ -192,7 +209,7 @@ private function getDeviceInfo($playlist)
192209
'FirmwareName' => 'hdhomerun3_atsc',
193210
'FirmwareVersion' => '20200101',
194211
'DeviceAuth' => 'test_auth_token',
195-
'BaseURL' => url("/$uuid/hdhr"),
212+
'BaseURL' => route('playlist.hdhr.overview', $uuid),
196213
'LineupURL' => route('playlist.hdhr.lineup', $uuid),
197214
'TunerCount' => $tunerCount,
198215
];

composer.json

-2
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@
2525
"laravel/tinker": "^2.9",
2626
"opcodesio/log-viewer": "^3.15",
2727
"predis/predis": "^2.3",
28-
"react/datagram": "^1.10",
29-
"react/event-loop": "^1.5",
3028
"ryangjchandler/filament-progress-column": "^1.0",
3129
"shuvroroy/filament-spatie-laravel-backup": "^2.2",
3230
"sparkison/m3u-parser": "dev-master",

composer.lock

+1-82
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/images/plex-logo.svg

+95
Loading

resources/views/forms/components/playlist-m3u-url.blade.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<x-dynamic-component :component="$getFieldWrapperView()" :field="$field">
22
@php($m3uUrl = route('playlist.generate', ['uuid' => $getRecord()->uuid]))
3-
@php($hdhrUrl = route('playlist.hdhr', ['uuid' => $getRecord()->uuid]))
3+
@php($hdhrUrl = route('playlist.hdhr.overview', ['uuid' => $getRecord()->uuid]))
44
<div x-data="{ state: $wire.$entangle('{{ $getStatePath() }}') }">
55
<a href="{{ $m3uUrl }}" target="_blank"
66
class="underline flex items-center gap-1 text-primary-500 hover:text-primary-700 dark:hover:text-primary-300">

resources/views/hdhr.blade.php

+57
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
6+
<title>Add HDHomeRun Tuner to Plex</title>
7+
<style>
8+
body {
9+
font-family: Arial, sans-serif;
10+
margin: 40px;
11+
line-height: 1.6;
12+
}
13+
.container {
14+
max-width: 800px;
15+
margin: auto;
16+
}
17+
h1, h2 {
18+
color: #333;
19+
}
20+
ol {
21+
background: #f9f9f9;
22+
padding: 20px;
23+
border-radius: 8px;
24+
}
25+
ol li {
26+
padding: 5px 10px;
27+
margin-left: 15px;
28+
}
29+
</style>
30+
</head>
31+
<body>
32+
<div class="container">
33+
<img src="/images/plex-logo.svg" alt="Plex Logo" width="150px" height="auto">
34+
35+
<h1>How to Add "{{ $name }}" HDHomeRun Tuner to Plex</h1>
36+
<p>Follow these steps to integrate your HDHomeRun device with Plex for live TV and DVR functionality.</p>
37+
38+
<h2>Steps:</h2>
39+
<ol>
40+
<li>Open Plex Web App by navigating to <a href="https://app.plex.tv/" target="_blank">Plex</a> in your browser.</li>
41+
<li>Go to <strong>Settings</strong> (click the wrench icon in the top-right corner).</li>
42+
<li>Under <strong>Manage</strong>, select <strong>Live TV & DVR</strong>.</li>
43+
<li>Click on <strong>Set Up Plex DVR</strong>.</li>
44+
<li>Enter the following HDHomeRun tuner address manually: <strong>{{ route('playlist.hdhr.overview', $uuid) }}</strong></li>
45+
<li>Select the tuner and click <strong>Continue</strong>.</li>
46+
<li>Choose your location and allow Plex to fetch channel guide data.</li>
47+
<ul>
48+
<li>If you've added an EPG and mapped it to this playlist, you can also manually add the EPG address: <strong>{{ route('epg.generate', $uuid) }}</strong></li>
49+
</ul>
50+
<li>Map available channels and finish setup.</li>
51+
<li>Once completed, you can access live TV and schedule recordings through Plex.</li>
52+
</ol>
53+
54+
<p>Now your m3u editor HDHomeRun tuner is successfully integrated with Plex! 🎉</p>
55+
</div>
56+
</body>
57+
</html>

routes/web.php

+2
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111

1212
Route::get('/{uuid}/hdhr/device.xml', [\App\Http\Controllers\PlaylistGenerateController::class, 'hdhr'])
1313
->name('playlist.hdhr');
14+
Route::get('/{uuid}/hdhr', [\App\Http\Controllers\PlaylistGenerateController::class, 'hdhrOverview'])
15+
->name('playlist.hdhr.overview');
1416
Route::get('/{uuid}/hdhr/discover.json', [\App\Http\Controllers\PlaylistGenerateController::class, 'hdhrDiscover'])
1517
->name('playlist.hdhr.discover');
1618
Route::get('/{uuid}/hdhr/lineup.json', [\App\Http\Controllers\PlaylistGenerateController::class, 'hdhrLineup'])

0 commit comments

Comments
 (0)