mirror of
				https://github.com/jellyfin/jellyfin.git
				synced 2025-11-03 19:17:24 -05:00 
			
		
		
		
	Fixed missing episode and season numbers when searching for episodes by date
This commit is contained in:
		
							parent
							
								
									06467da312
								
							
						
					
					
						commit
						2ed5c3d0e7
					
				@ -503,6 +503,48 @@ namespace MediaBrowser.Providers.TV
 | 
				
			|||||||
                                break;
 | 
					                                break;
 | 
				
			||||||
                            }
 | 
					                            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                        case "EpisodeNumber":
 | 
				
			||||||
 | 
					                            {
 | 
				
			||||||
 | 
					                                if (!item.IndexNumber.HasValue)
 | 
				
			||||||
 | 
					                                {
 | 
				
			||||||
 | 
					                                    var val = reader.ReadElementContentAsString();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                                    if (!string.IsNullOrWhiteSpace(val))
 | 
				
			||||||
 | 
					                                    {
 | 
				
			||||||
 | 
					                                        int rval;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                                        // int.TryParse is local aware, so it can be probamatic, force us culture
 | 
				
			||||||
 | 
					                                        if (int.TryParse(val, NumberStyles.Integer, _usCulture, out rval))
 | 
				
			||||||
 | 
					                                        {
 | 
				
			||||||
 | 
					                                            item.IndexNumber = rval;
 | 
				
			||||||
 | 
					                                        }
 | 
				
			||||||
 | 
					                                    }
 | 
				
			||||||
 | 
					                                }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                                break;
 | 
				
			||||||
 | 
					                            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                        case "SeasonNumber":
 | 
				
			||||||
 | 
					                            {
 | 
				
			||||||
 | 
					                                if (!item.ParentIndexNumber.HasValue)
 | 
				
			||||||
 | 
					                                {
 | 
				
			||||||
 | 
					                                    var val = reader.ReadElementContentAsString();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                                    if (!string.IsNullOrWhiteSpace(val))
 | 
				
			||||||
 | 
					                                    {
 | 
				
			||||||
 | 
					                                        int rval;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                                        // int.TryParse is local aware, so it can be probamatic, force us culture
 | 
				
			||||||
 | 
					                                        if (int.TryParse(val, NumberStyles.Integer, _usCulture, out rval))
 | 
				
			||||||
 | 
					                                        {
 | 
				
			||||||
 | 
					                                            item.ParentIndexNumber = rval;
 | 
				
			||||||
 | 
					                                        }
 | 
				
			||||||
 | 
					                                    }
 | 
				
			||||||
 | 
					                                }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                                break;
 | 
				
			||||||
 | 
					                            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                        case "absolute_number":
 | 
					                        case "absolute_number":
 | 
				
			||||||
							{
 | 
												{
 | 
				
			||||||
								var val = reader.ReadElementContentAsString();
 | 
													var val = reader.ReadElementContentAsString();
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user