jellyfin / jellyfin-plugin-nextpvr

https://jellyfin.org
MIT License
25 stars 9 forks source link

Disable compression on POST responses #3

Closed barronhagerman closed 4 years ago

barronhagerman commented 4 years ago

Summary

Recent changes to HttpClientManager.SendAsyncInternal(HttpRequestOptions options, HttpMethod httpMethod) appears to have caused problems with the decompression of POST responses because the default compression method is Deflate, but the response.Content is not decompressed.

This works around that by simply disabling compression on those requests, which generally improves performance since the NPVR server is usually localhost anyway.

barronhagerman commented 4 years ago

@joshuaboniface I bumped the minor version because it's not really a major version type of change in my opinion. However, if there's a particular reason to bump it to 2.0.0, I can do that instead.

dkanada commented 4 years ago

@barronhagerman we don't actually use semver for these plugins, so you'll just need to bump the major version. I'm not too keen on that but it's a minor detail so I don't mind.

Nickbert7 commented 4 years ago

I just wanted to test it, but I'm not able to build it currently:

LiveTvService.cs(147,45): error CS1061: "ICryptoProvider" enthält keine Definition für "ComputeMD5", und es konnte keine zugängliche ComputeMD5-Erweiterungsmethode gefunden werden, die ein erstes Argument vom Typ "ICryptoProvider" akzeptiert (möglicherweise fehlt eine using-Direktive oder ein Assemblyverweis). [E:\data\Downloads\jellyfin-plugin-nextpvr-sorted-filtered-list-no-compression\NextPvr\NextPvr.csproj]

barronhagerman commented 4 years ago

@Nickbert7 Good catch. I think that functionality was recently moved in 10.4 to BaseExtensions.cs. I've refactored it to use that new function.

Nickbert7 commented 4 years ago

Now it builds And it seems the playback issue I had sometimes with some channels is gone now. But that could also be related to some other fixes in 10.4...