plugins.vinhlongtv: rewrite and fix plugin #4850
Merged
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.
Closes #4848
This updates the API URL and adds the required request headers and timezone query string parameter.
As mentioned in #4848, the
timezonequery string parameter on the site is read fromwhich means it'll always be in the
$Region/$Cityformat. The plugin implementation however sets the timezone parameter to theUTCstring, because it needs the UTC timezone for calculating the MD5 hash in the headers, which depends on the user's local time, and this needs to be calculated based on UTC. Otherwise, we'd need to get the timezone name from the user's local time, and that would require addingpytzas a dependency here, because the provided timezone parameter must match. I am not sure though how reliable setting the UTC timezone is, because as said, the site doesn't do this and they could very easily block such requests. Setting the timezone parameter toEurope/Londondoesn't work because of DST.Either way, the plugin seems to be working now. I am also not sure about VOD content, but this wasn't supported prior to these changes, and I don't care about that one single bit.
Please double-check and test it yourself before merging.