mirror of
				https://github.com/jellyfin/jellyfin.git
				synced 2025-11-04 03:27:21 -05:00 
			
		
		
		
	update hdhomerun model info caching
This commit is contained in:
		
							parent
							
								
									9dd5dcc4bc
								
							
						
					
					
						commit
						44a4e662ac
					
				@ -130,10 +130,13 @@ namespace Emby.Server.Implementations.LiveTv.TunerHosts.HdHomerun
 | 
			
		||||
            {
 | 
			
		||||
                DiscoverResponse response;
 | 
			
		||||
                if (_modelCache.TryGetValue(info.Url, out response))
 | 
			
		||||
                {
 | 
			
		||||
                    if ((DateTime.UtcNow - response.DateQueried).TotalHours <= 12)
 | 
			
		||||
                    {
 | 
			
		||||
                        return response;
 | 
			
		||||
                    }
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            try
 | 
			
		||||
            {
 | 
			
		||||
@ -141,8 +144,6 @@ namespace Emby.Server.Implementations.LiveTv.TunerHosts.HdHomerun
 | 
			
		||||
                {
 | 
			
		||||
                    Url = string.Format("{0}/discover.json", GetApiUrl(info, false)),
 | 
			
		||||
                    CancellationToken = cancellationToken,
 | 
			
		||||
                    CacheLength = TimeSpan.FromDays(1),
 | 
			
		||||
                    CacheMode = CacheMode.Unconditional,
 | 
			
		||||
                    TimeoutMs = Convert.ToInt32(TimeSpan.FromSeconds(5).TotalMilliseconds),
 | 
			
		||||
                    BufferContent = false
 | 
			
		||||
 | 
			
		||||
@ -638,6 +639,13 @@ namespace Emby.Server.Implementations.LiveTv.TunerHosts.HdHomerun
 | 
			
		||||
            public string BaseURL { get; set; }
 | 
			
		||||
            public string LineupURL { get; set; }
 | 
			
		||||
            public int TunerCount { get; set; }
 | 
			
		||||
 | 
			
		||||
            public DateTime DateQueried { get; set; }
 | 
			
		||||
 | 
			
		||||
            public DiscoverResponse()
 | 
			
		||||
            {
 | 
			
		||||
                DateQueried = DateTime.UtcNow;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public async Task<List<TunerHostInfo>> DiscoverDevices(int discoveryDurationMs, CancellationToken cancellationToken)
 | 
			
		||||
 | 
			
		||||
@ -89,6 +89,7 @@ namespace MediaBrowser.MediaEncoding.Encoder
 | 
			
		||||
            var found = new List<string>();
 | 
			
		||||
            var required = new[]
 | 
			
		||||
            {
 | 
			
		||||
                "mpeg2video",
 | 
			
		||||
                "h264_qsv",
 | 
			
		||||
                "hevc_qsv",
 | 
			
		||||
                "mpeg2_qsv",
 | 
			
		||||
 | 
			
		||||
@ -464,10 +464,9 @@ namespace MediaBrowser.XbmcMetadata.Parsers
 | 
			
		||||
 | 
			
		||||
                        if (!string.IsNullOrWhiteSpace(val))
 | 
			
		||||
                        {
 | 
			
		||||
                            item.ProductionLocations = val.Split('/')
 | 
			
		||||
                            item.ProductionLocations.AddRange(val.Split('/')
 | 
			
		||||
                                .Select(i => i.Trim())
 | 
			
		||||
                                .Where(i => !string.IsNullOrWhiteSpace(i))
 | 
			
		||||
                                .ToList();
 | 
			
		||||
                                .Where(i => !string.IsNullOrWhiteSpace(i)));
 | 
			
		||||
                        }
 | 
			
		||||
                        break;
 | 
			
		||||
                    }
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user