feat: Multiple DNS / fallback URLs for Xtream playlists#898
Merged
feat: Multiple DNS / fallback URLs for Xtream playlists#898
Conversation
Allow users to configure multiple server URLs per Xtream playlist. When the primary URL becomes unreachable, the system automatically tries fallback URLs in order and promotes the first working one to primary. Includes a DNS health status UI in the Xtream API tab.
Livewire requires a root HTML tag in every view. When no fallback URLs exist the @if block produced an empty view, causing a RootTagMissingFromViewException.
Contributor
Author
|
The failed test is not mine 😊 |
- Add `promoteXtreamUrl()` to Playlist model to promote a specific working URL to primary, rather than blindly promoting the next URL in sequence. Fixes multi-fallback failover promoting a still-down URL. - Update XtreamService::call() and ProcessM3uImport to call promoteXtreamUrl($workingUrl) with the URL that actually succeeded. - Add $verify param to XtreamHealthService::checkUrl() so SSL verification respects the playlist's disable_ssl_verification setting rather than always being disabled. - Replace duplicate health check logic in ProcessM3uImport with a call to XtreamHealthService::findWorkingUrl(), consolidating failover behaviour into a single place. - Add 4 new Pest tests covering the above, bringing the suite to 20 passing tests.
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
Closes #408
xtream_fallback_urlsfield to Xtream playlists for storing alternative server URLsXtreamService(covers all API calls) andProcessM3uImport(sync job)Test plan
xtream_config.urlis updated to the new working URL after failoverphp artisan test --filter=XtreamFallback— 16 tests pass