Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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

Merged
bastimeyer merged 4 commits into
streamlink:masterfrom
TaoziDB:nimotv-livestream-fix
Feb 8, 2023
Merged

plugins.nimotv: fix livestream stopping after couple of seconds#5147
bastimeyer merged 4 commits into
streamlink:masterfrom
TaoziDB:nimotv-livestream-fix

Conversation

@TaoziDB

@TaoziDB TaoziDB commented Feb 8, 2023

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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

TaoziDB commented Feb 8, 2023

Copy link
Copy Markdown
Contributor Author

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
Copy Markdown
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
Copy Markdown
Member

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

@TaoziDB

TaoziDB commented Feb 8, 2023

Copy link
Copy Markdown
Contributor Author

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