Add configurable TV Mode to simulate continuous random TV playback#2595
Add configurable TV Mode to simulate continuous random TV playback#2595neura-neura wants to merge 4 commits intorecloudstream:masterfrom
Conversation
|
I addressed the automated issues reported during the initial PR checks. The remaining CodeFactor warning was fixed, and the branch was rebuilt afterward to verify everything still compiles correctly. Current status:
The PR is now ready for review. Thanks for taking a look. |
|
CodeFactor warnings are not a blocker. While it is good to check that, there is no need to force the code to follow all suggested changes. This is quite a large pull request and will therefore require a bit more time to properly review. However, there are some important details which are I have noticed from a general overview.
More comments to follow when I have tested and read through all code. |
|
Follow-up update addressing maintainer feedback and additional issues found during testing. First, sorry for the extra churn here. A few of these issues are things I should have caught earlier, especially the Changes included in this update:
Dub/Sub handling:
Content filtering:
Stall protection:
Safety / structure:
Verification:
AI usage disclosure: I understand that I am responsible for explaining and fixing any part of this contribution during review. |
Summary
This PR adds a new configurable TV Mode designed to simulate the experience of watching a real TV channel with automatically selected random content.
The main goal is to solve the current limitation where random playback can open content, but does not fully behave like a continuous TV experience. With this change, the app can now keep selecting and playing content automatically, including random series episodes or movies, based on user preferences and without requiring constant manual interaction.
Motivation
The existing random flow is useful, but it does not fully simulate a TV-like experience.
This PR introduces a dedicated TV Mode that:
This effectively turns the app into a configurable “random TV” experience.
What was added
1. New TV Mode system
A new dedicated TV Mode flow was implemented instead of relying only on the existing Random button behavior.
TV Mode can:
2. Home quick action support
A new configurable Home quick action was added.
Users can now choose between:
This simplifies the previous button conflict and makes the Home screen behavior explicit.
3. TV Mode button on Home
When TV Mode is selected as the quick action and enabled, a dedicated TV Mode button appears on the Home screen.
Pressing it starts a random TV-like playback session.
4. TV Mode button inside result pages
A dedicated TV Mode button was added to result pages for series and compatible content.
This allows users to start TV Mode directly from a show page.
Example:
5. Local show TV Mode
When TV Mode is started from a specific TV show, playback can remain limited to that show.
This enables a “shuffle this show like a TV channel” behavior.
6. Season scope options
A new setting was added to control how local show TV Mode behaves:
Example:
7. Content filtering options
TV Mode now supports content scope preferences:
This allows users to decide what kind of random TV experience they want.
8. Dub/Sub preference support
TV Mode now respects user preference for dubbed/subtitled content when multiple options are available.
If the preferred option is not available, playback falls back gracefully to other available content.
9. Automatic playback for TV simulation
TV Mode now automatically starts playback instead of stopping at the content page.
Behavior:
This is one of the key pieces needed to actually simulate a TV.
10. Proper behavior after playback ends
When normal playback ends in a TV show, the app usually continues with the next episode of that same show.
This PR changes that behavior for TV Mode:
This makes TV Mode feel intentional rather than just chaining default next-episode behavior.
11. Player-level TV Mode toggle
A TV Mode on/off control was added directly to the player controls.
This gives the user immediate visibility and control over whether TV Mode is active during playback.
It can be used to:
12. Configurable player start behavior
A new option was added for what should happen when the user enables TV Mode from the player while watching a show:
This makes the player toggle much more flexible.
13. Automatic recovery when content has no playable links
Previously, if random content was selected but no playable links were available, the user could be taken out of the flow.
Now, when TV Mode is active:
the app automatically tries another valid random item instead of breaking the TV experience.
14. Stall protection
A new optional TV Mode stall protection system was added.
Users can configure:
If content gets stuck too much, TV Mode will automatically move on to another item based on the current session rules.
This is especially useful for preserving the “TV” feeling without manual intervention.
15. Continue Watching control
A new option was added to decide whether TV Mode playback should appear in Continue Watching.
If disabled:
This prevents random TV sessions from polluting the user’s normal viewing history.
Result
With these changes, the app now supports a much more complete TV simulation mode.
A user can enable TV Mode, press one button, and let the app continuously choose and play random content according to their preferences, much closer to how a real TV channel behaves.
Testing
Tested scenarios include: