Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto Reload LiveTv when feed Errors #669

Merged
merged 21 commits into from
Sep 12, 2022
Merged

Conversation

candry7731
Copy link
Contributor

This added the ability for the LiveTv to auto reload when the feed "Finishes" unexpectedly.

Currently, when a feed errors you are kicked to the guide and then have to move up or down the guide then go back and select the channel again to get it to reload.

Issues
Show the guide for a second or two... not a huge issue but the user might not realize it's going to auto reload. Might have to rethink and maybe display a reload screen or spinner

candry7731 and others added 9 commits April 27, 2022 21:12
Added item counts to overhang
This added the ability for the LiveTv to auto reload when the feed "Finishes" unexpectedly.
Currently, when a feed errors you are kicked to the guide and then have to move up or down the guide then go back and select the channel again to get it to reload.
@1hitsong
Copy link
Member

It looks like in its current state, this would remove a lot of code needed for music support.

@candry7731
Copy link
Contributor Author

candry7731 commented Jun 27, 2022 via email

@neilsb
Copy link
Member

neilsb commented Jun 28, 2022

If you can ensure that all branches are created on master, then that should stop this sort of problem happening.

LiveTV is not working on my Roku at all at the moment, so I'll need to look into that. What's the best way to test this (i.e. cause the stream to end prematurely)?

@cewert cewert marked this pull request as draft July 12, 2022 15:27
@candry7731
Copy link
Contributor Author

If you can ensure that all branches are created on master, then that should stop this sort of problem happening.

LiveTV is not working on my Roku at all at the moment, so I'll need to look into that. What's the best way to test this (i.e. cause the stream to end prematurely)?

I will send you a private message on matrix with a m3u link to test. This feed should drop every few minutes and reload automatically. I would love to not be able to pop the scene then add it back... but this is better than nothing.

@candry7731 candry7731 marked this pull request as ready for review July 18, 2022 16:53
@cewert cewert changed the base branch from master to unstable July 24, 2022 14:18
@1hitsong
Copy link
Member

@candry7731
These 4 lines appear to be working as expected; however, there is a lot of code this PR would remove that we need to keep.

if selectedItem.Type = "TvChannel" and node.state = "finished"
sceneManager.callFunc("popScene")
video = CreateVideoPlayerGroup(node.id)
sceneManager.callFunc("pushScene", video)

Copy link
Member

@1hitsong 1hitsong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added code works as expected, but this PR would remove a lot of other code we need!

@candry7731
Copy link
Contributor Author

We should be good on this now? Since I merged the unstable branch?

@1hitsong
Copy link
Member

@candry7731 Not quite. Main.brs would still get mangled. Check out all the code that would get removed on merge: https://github.com/jellyfin/jellyfin-roku/pull/669/files

@candry7731
Copy link
Contributor Author

@candry7731 Not quite. Main.brs would still get mangled. Check out all the code that would get removed on merge: https://github.com/jellyfin/jellyfin-roku/pull/669/files

Can you check this? I added all of the removed code back into the main.brs file

@neilsb
Copy link
Member

neilsb commented Sep 3, 2022

Reverted the last couple of files to leave just the changes for this PR. I can't confirm it's working as with HDHR this makes no difference when I'm testing. @candry7731 you were going to send me a m3u link to test with, but not sure you ever did.

Copy link
Contributor

@alanazar alanazar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replicated the issue on the unstable branch
Tested this PR and it works as intended. Reloads the feed if it cuts instead of taking the user back to the TV Guide screen

@neilsb neilsb merged commit fcb0056 into jellyfin:unstable Sep 12, 2022
@dahartigan
Copy link

dahartigan commented Sep 16, 2022

Thank you for forcing it to reload after a failed stream. I have had it succesfully restart a stream, except there was an instance where the Roku app gave an error "Error during playback - An error occured while playing this item." with an OK button. It's crashed here, however in the console (vscode) is shows the following error:

=================================================================

Warning occurred while setting a field of an RoSGNode
-- Tried to set nonexistent field "lastfocus" of a "JFVideo" node
   at line 21 of file pkg:/components/data/SceneManager.brs
=================================================================

I hope this helps :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants