mirror of
				https://github.com/jellyfin/jellyfin.git
				synced 2025-10-31 10:37:22 -04:00 
			
		
		
		
	Address comments
This commit is contained in:
		
							parent
							
								
									5e8d58a6a6
								
							
						
					
					
						commit
						4643fd5dcb
					
				| @ -52,10 +52,14 @@ namespace Jellyfin.Server.Middleware | |||||||
|                     return; |                     return; | ||||||
|                 } |                 } | ||||||
| 
 | 
 | ||||||
|                 var pairs = new Dictionary<string, StringValues>(); |                 if (!key.Contains('=')) | ||||||
|                 var queryString = HttpUtility.UrlDecode(key).SpanSplit('&'); |                 { | ||||||
|  |                     _store = value; | ||||||
|  |                     return; | ||||||
|  |                 } | ||||||
| 
 | 
 | ||||||
|                 foreach (var pair in queryString) |                 var pairs = new Dictionary<string, StringValues>(); | ||||||
|  |                 foreach (var pair in key.SpanSplit('&')) | ||||||
|                 { |                 { | ||||||
|                     var i = pair.IndexOf('='); |                     var i = pair.IndexOf('='); | ||||||
|                     if (i == -1) |                     if (i == -1) | ||||||
|  | |||||||
| @ -38,7 +38,7 @@ namespace MediaBrowser.MediaEncoding.Subtitles | |||||||
|             subRip.LoadSubtitle(subtitle, lines, "untitled"); |             subRip.LoadSubtitle(subtitle, lines, "untitled"); | ||||||
|             if (subRip.ErrorCount > 0) |             if (subRip.ErrorCount > 0) | ||||||
|             { |             { | ||||||
|                 _logger.LogError("{ErrorCount} errors encountered while parsing subtitle.", subRip.ErrorCount); |                 _logger.LogError("{ErrorCount} errors encountered while parsing subtitle", subRip.ErrorCount); | ||||||
|             } |             } | ||||||
| 
 | 
 | ||||||
|             var trackInfo = new SubtitleTrackInfo(); |             var trackInfo = new SubtitleTrackInfo(); | ||||||
|  | |||||||
| @ -21,6 +21,7 @@ namespace Jellyfin.Server.Integration.Tests | |||||||
|         [InlineData("a=1", "a=1")] // won't be processed as it has a value |         [InlineData("a=1", "a=1")] // won't be processed as it has a value | ||||||
|         [InlineData("a%3D1%26b%3D2%26c%3D3", "a=1&b=2&c=3")] // will be processed. |         [InlineData("a%3D1%26b%3D2%26c%3D3", "a=1&b=2&c=3")] // will be processed. | ||||||
|         [InlineData("a=b&a=c", "a=b")] |         [InlineData("a=b&a=c", "a=b")] | ||||||
|  |         [InlineData("a%3D1", "a=1")] | ||||||
|         [InlineData("a%3Db%26a%3Dc", "a=b")] |         [InlineData("a%3Db%26a%3Dc", "a=b")] | ||||||
|         public async Task Ensure_Decoding_Of_Urls_Is_Working(string sourceUrl, string unencodedUrl) |         public async Task Ensure_Decoding_Of_Urls_Is_Working(string sourceUrl, string unencodedUrl) | ||||||
|         { |         { | ||||||
|  | |||||||
| @ -12,9 +12,6 @@ namespace Jellyfin.Server.Tests | |||||||
|     { |     { | ||||||
|         [Theory] |         [Theory] | ||||||
|         [InlineData("e0a72cb2a2c7", "e0a72cb2a2c7")] // isn't encoded |         [InlineData("e0a72cb2a2c7", "e0a72cb2a2c7")] // isn't encoded | ||||||
|         [InlineData("random+test", "random test")] // encoded |  | ||||||
|         [InlineData("random%20test", "random test")] // encoded |  | ||||||
|         [InlineData("++", "  ")] // encoded |  | ||||||
|         public static void EmptyValueTest(string query, string key) |         public static void EmptyValueTest(string query, string key) | ||||||
|         { |         { | ||||||
|             var dict = new Dictionary<string, StringValues> |             var dict = new Dictionary<string, StringValues> | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user