mirror of
				https://github.com/jellyfin/jellyfin.git
				synced 2025-10-31 10:37:22 -04:00 
			
		
		
		
	display rotten tomatoes icon
This commit is contained in:
		
							parent
							
								
									85ed86e5f6
								
							
						
					
					
						commit
						716151c9e4
					
				| @ -34,7 +34,7 @@ namespace MediaBrowser.Controller.Providers.Movies | |||||||
|         /// <summary> |         /// <summary> | ||||||
|         /// The _rotten tomatoes resource pool |         /// The _rotten tomatoes resource pool | ||||||
|         /// </summary> |         /// </summary> | ||||||
|         private readonly SemaphoreSlim _rottenTomatoesResourcePool = new SemaphoreSlim(1, 1); |         private readonly SemaphoreSlim _rottenTomatoesResourcePool = new SemaphoreSlim(2, 2); | ||||||
| 
 | 
 | ||||||
|         /// <summary> |         /// <summary> | ||||||
|         /// Gets the json serializer. |         /// Gets the json serializer. | ||||||
| @ -70,7 +70,7 @@ namespace MediaBrowser.Controller.Providers.Movies | |||||||
|         { |         { | ||||||
|             get |             get | ||||||
|             { |             { | ||||||
|                 return "4"; |                 return "5"; | ||||||
|             } |             } | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
| @ -236,7 +236,7 @@ namespace MediaBrowser.Controller.Providers.Movies | |||||||
|             // If we found any results, that's great! |             // If we found any results, that's great! | ||||||
|             if (hit != null) |             if (hit != null) | ||||||
|             { |             { | ||||||
|                 item.CriticRatingSummary = hit.critics_concensus; |                 item.CriticRatingSummary = hit.critics_consensus; | ||||||
|                 item.CriticRating = float.Parse(hit.ratings.critics_score); |                 item.CriticRating = float.Parse(hit.ratings.critics_score); | ||||||
| 
 | 
 | ||||||
|                 using (var stream = HttpClient.Get(MovieReviewsUrl(hit.id), _rottenTomatoesResourcePool, cancellationToken).Result) |                 using (var stream = HttpClient.Get(MovieReviewsUrl(hit.id), _rottenTomatoesResourcePool, cancellationToken).Result) | ||||||
| @ -331,7 +331,7 @@ namespace MediaBrowser.Controller.Providers.Movies | |||||||
|             public int year { get; set; } |             public int year { get; set; } | ||||||
|             public string runtime { get; set; } |             public string runtime { get; set; } | ||||||
|             public string synopsis { get; set; } |             public string synopsis { get; set; } | ||||||
|             public string critics_concensus { get; set; } |             public string critics_consensus { get; set; } | ||||||
|             public string mpaa_rating { get; set; } |             public string mpaa_rating { get; set; } | ||||||
|             public string id { get; set; } |             public string id { get; set; } | ||||||
|             public RTRatings ratings { get; set; } |             public RTRatings ratings { get; set; } | ||||||
| @ -363,6 +363,7 @@ namespace MediaBrowser.Controller.Providers.Movies | |||||||
|             public string publication { get; set; } |             public string publication { get; set; } | ||||||
|             public string quote { get; set; } |             public string quote { get; set; } | ||||||
|             public RTReviewLink links { get; set; } |             public RTReviewLink links { get; set; } | ||||||
|  |             public string original_score { get; set; } | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|         protected class RTReviewLink |         protected class RTReviewLink | ||||||
|  | |||||||
| @ -93,6 +93,9 @@ | |||||||
|     <Content Include="dashboard-ui\css\images\bgflip.png"> |     <Content Include="dashboard-ui\css\images\bgflip.png"> | ||||||
|       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> |       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> | ||||||
|     </Content> |     </Content> | ||||||
|  |     <Content Include="dashboard-ui\css\images\fresh.png"> | ||||||
|  |       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> | ||||||
|  |     </Content> | ||||||
|     <Content Include="dashboard-ui\css\images\items\searchhints\film.png"> |     <Content Include="dashboard-ui\css\images\items\searchhints\film.png"> | ||||||
|       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> |       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> | ||||||
|     </Content> |     </Content> | ||||||
| @ -108,6 +111,9 @@ | |||||||
|     <Content Include="dashboard-ui\css\images\items\searchhints\tv.png"> |     <Content Include="dashboard-ui\css\images\items\searchhints\tv.png"> | ||||||
|       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> |       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> | ||||||
|     </Content> |     </Content> | ||||||
|  |     <Content Include="dashboard-ui\css\images\rotten.png"> | ||||||
|  |       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> | ||||||
|  |     </Content> | ||||||
|     <Content Include="dashboard-ui\css\images\searchbutton.png"> |     <Content Include="dashboard-ui\css\images\searchbutton.png"> | ||||||
|       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> |       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> | ||||||
|     </Content> |     </Content> | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user