jellyfin / jellyfin-plugin-opensubtitles

https://jellyfin.org
GNU General Public License v3.0
126 stars 26 forks source link

Minor improvements #90

Closed Bond-009 closed 2 years ago

h1dden-da3m0n commented 2 years ago

@MBR-0001 you have been the quite active in this plugin, mind giving this another look?

Bond-009 commented 2 years ago

The custom query builder isn't for performance (although it may be faster) it's just less hacky then the current code. System.Web.HttpUtility.ParseQueryString(string.Empty) was used to get an instance of HttpQSCollection which is an internal class of .net, it also escapes spaces with %20, which is why it needed another hack on top .Replace("%20", "+", StringComparison.Ordinal)

h1dden-da3m0n commented 2 years ago

Thank you for clarifying, and I have to admit that I did not think of that nor would have been able to notice :sweat_smile:

MBR-0001 commented 2 years ago

@MBR-0001 you have been the quite active in this plugin, mind giving this another look?

I ran a few tests and everything worked as expected, I didn't look at the moviehash code but it appears to be creating same hashes as before... The query string code follows all 5 (or 4? idk) rules and looks much cleaner (glad the %20 hack is gone lol)

so, in conclusion, looks good :+1: