Skip to content

plugins.nimotv: fix livestream stopping after couple of seconds #5147

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

Merged
merged 4 commits into from
Feb 8, 2023
Merged

plugins.nimotv: fix livestream stopping after couple of seconds #5147

merged 4 commits into from
Feb 8, 2023

Conversation

TaoziDB
Copy link
Contributor

@TaoziDB TaoziDB commented Feb 8, 2023

Fixes #5114

Add wsSecret and wsTime to the stream url.

@bastimeyer bastimeyer changed the title Update nimotv.py to fix livestream stops after couple of seconds plugins.nimotv: fix livestream stopping after couple of seconds Feb 8, 2023
@bastimeyer bastimeyer added the plugin issue A Plugin does not work correctly label Feb 8, 2023
@bastimeyer
Copy link
Member

Thanks, this seems to work.

As a side note, the plugin is still setting an Android user agent header. The site however now seems to require the user to download a mobile app when accessing it with any mobile phone user agent. HLSStream was used previously because of their old mobile site from what it looks like, which is much more preferred over progressive HTTPStreams that their main site is using (which is ridiculously bad). So if there is a way to request HLS streams again, which is probably what their mobile apps are still doing, then this should be implemented instead.

@TaoziDB
Copy link
Contributor Author

TaoziDB commented Feb 8, 2023

The browser on pc uses flv, I tried m3u8 first, but adding wsSecret and wsTime to m3u8 can not fix the stopping bug.

Thanks, this seems to work.

As a side note, the plugin is still setting an Android user agent header. The site however now seems to require the user to download a mobile app when accessing it with any mobile phone user agent. HLSStream was used previously because of their old mobile site from what it looks like, which is much more preferred over progressive HTTPStreams that their main site is using (which is ridiculously bad). So if there is a way to request HLS streams again, which is probably what their mobile apps are still doing, then this should be implemented instead.

@bastimeyer
Copy link
Member

adding wsSecret and wsTime to m3u8 can not fix the stopping bug

It's possible that those parameters need to get re-calculated / re-obtained for each playlist refresh, while the progressive stream with the single-HTTP request just keeps going without aborting. Subclassing the HLSStream class and implementing refresh logic is not worth the hassle though, so this seems fine.

You'll still need to fix the linting issues before this can get merged.

@bastimeyer bastimeyer added the PR: squash commits Commits need to be squashed as a single commit - eg. multiple commits for a single component label Feb 8, 2023
@bastimeyer bastimeyer merged commit ce2c5e1 into streamlink:master Feb 8, 2023
@bastimeyer
Copy link
Member

No, this is just added as a reminder for PRs with multiple commits that need to get squashed when merging.

@TaoziDB
Copy link
Contributor Author

TaoziDB commented Feb 8, 2023

Thanks for your help.

No, this is just added as a reminder for PRs with multiple commits that need to get squashed when merging.

@TaoziDB TaoziDB deleted the nimotv-livestream-fix branch February 8, 2023 15:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
plugin issue A Plugin does not work correctly PR: squash commits Commits need to be squashed as a single commit - eg. multiple commits for a single component
Projects
None yet
Development

Successfully merging this pull request may close these issues.

plugins.nimotv: live stream stops after couple of seconds
2 participants