feat: Layer live proxy media info on Stream Monitor + failover channel name#1089
Merged
Merged
Conversation
…ailover channel name Builds on the existing Stream Monitor media badges by overlaying live ffmpeg data (resolution, codec, fps, bitrate, audio codec/channels) from the proxy's new media_info field on top of the stored emby/ffprobe stats. Live values win where present; probe-only fields like video_profile and audio_language are preserved. Plain HTTP-proxy streams that don't transcode keep using the probe data, so badges still show. Adds the failover channel name to the title in orange (Primary -> Failover), identifying the active candidate by URL match. Static-list mode falls back to index lookup; dynamic resolver mode (where current_failover_index doesn't line up with the candidate's slot) is handled by the URL match. Companion to the m3u-proxy live media_info work.
This was referenced May 2, 2026
Member
|
Looks great! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Builds on the Stream Monitor media badges added in 0146613. Layers two things on top:
Primary → Failoverwith the failover name in orange, matching the existing Failover Active badge.Closes #1085. Pairs with the proxy-side PR that publishes the live data: m3ue/m3u-proxy#54.
Supersedes #1088 (which was based on the previous dev HEAD before badges had landed there).
What changed
Live data layering (
app/Filament/Pages/M3uProxyStreamMonitor.php)The existing block that pulls
getEmbyStreamStats()formedia_infonow also readsmedia_infofrom the proxy stream payload. Proxy keys are mapped to the editor's existing field shape:resolutionresolutionvideo_codecvideo_codecfpssource_fpsbitrate_kbpsvideo_bitrate_kbpsaudio_codecaudio_codecaudio_channelsaudio_channelsarray_filterstrips empty live values so the merge only overrides where the proxy actually has data, keepingvideo_profile,audio_language, andaudio_bitrate_kbpsfrom the probe path. The blade renders unchanged keys, so no UI rework was needed.Failover channel resolution
The active failover is identified by URL-matching
current_urlagainstPlaylistUrlService::getChannelUrl()for each candidate infailoverChannels. Static-list mode falls back to index lookup if the URL match fails. The dynamic resolver case (where the resolver skipped earlier candidates andcurrent_failover_indexdoesn't line up with the candidate's slot) is the reason for the URL-match path — covered by a dedicated test.failoverChannelsis eager-loaded on the channel pre-fetch to keep this from regressing the page's N+1 budget.Title display (blade)
Drops a
Primary → Failoverline into the existing title block whenfailover_channel.titleis populated. Reuses the existing orange used by the Failover Active badge.Test plan
Primary → Failoverin orange; badges repopulate from the failover stream's live data once the new ffmpeg starts emitting Stream lines