mirror of
				https://github.com/jellyfin/jellyfin.git
				synced 2025-11-03 19:17:24 -05:00 
			
		
		
		
	update subtitles
This commit is contained in:
		
							parent
							
								
									3eda14eff0
								
							
						
					
					
						commit
						a86d0a3585
					
				@ -170,8 +170,9 @@ namespace MediaBrowser.Controller.Entities
 | 
			
		||||
            { 
 | 
			
		||||
                CollectionType.Games, 
 | 
			
		||||
                CollectionType.Books, 
 | 
			
		||||
                CollectionType.MusicVideos , 
 | 
			
		||||
                CollectionType.HomeVideos 
 | 
			
		||||
                CollectionType.MusicVideos, 
 | 
			
		||||
                CollectionType.HomeVideos, 
 | 
			
		||||
                CollectionType.Photos
 | 
			
		||||
            };
 | 
			
		||||
 | 
			
		||||
            return types.Contains(viewType ?? string.Empty, StringComparer.OrdinalIgnoreCase);
 | 
			
		||||
 | 
			
		||||
@ -321,7 +321,8 @@ namespace MediaBrowser.Providers.Subtitles
 | 
			
		||||
                        Name = i.SubFileName,
 | 
			
		||||
                        DateCreated = DateTime.Parse(i.SubAddDate, _usCulture),
 | 
			
		||||
                        IsHashMatch = i.MovieHash == hasCopy
 | 
			
		||||
                    });
 | 
			
		||||
 | 
			
		||||
                    }).Where(i => !string.Equals(i.Format, "sub", StringComparison.OrdinalIgnoreCase) && !string.Equals(i.Format, "idx", StringComparison.OrdinalIgnoreCase));
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public void Dispose()
 | 
			
		||||
 | 
			
		||||
@ -15,6 +15,7 @@ using System;
 | 
			
		||||
using System.Collections.Generic;
 | 
			
		||||
using System.IO;
 | 
			
		||||
using System.Linq;
 | 
			
		||||
using System.Text;
 | 
			
		||||
using System.Threading;
 | 
			
		||||
using System.Threading.Tasks;
 | 
			
		||||
using CommonIO;
 | 
			
		||||
@ -130,6 +131,8 @@ namespace MediaBrowser.Providers.Subtitles
 | 
			
		||||
 | 
			
		||||
                    try
 | 
			
		||||
                    {
 | 
			
		||||
                        //var isText = MediaStream.IsTextFormat(response.Format);
 | 
			
		||||
 | 
			
		||||
                        using (var fs = _fileSystem.GetFileStream(savePath, FileMode.Create, FileAccess.Write, FileShare.Read, true))
 | 
			
		||||
                        {
 | 
			
		||||
                            await stream.CopyToAsync(fs).ConfigureAwait(false);
 | 
			
		||||
 | 
			
		||||
@ -107,7 +107,7 @@ namespace MediaBrowser.Server.Implementations.Library
 | 
			
		||||
 | 
			
		||||
        private int GetMaxAllowedBitrateForExternalSubtitleStream()
 | 
			
		||||
        {
 | 
			
		||||
            return 20000000;
 | 
			
		||||
            return 30000000;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        private IEnumerable<MediaStream> GetMediaStreamsForItem(IEnumerable<MediaStream> streams)
 | 
			
		||||
 | 
			
		||||
@ -206,6 +206,11 @@ namespace MediaBrowser.Server.Implementations.Persistence
 | 
			
		||||
 | 
			
		||||
                    var libraryItem = _libraryManager.GetItemById(item.Item1);
 | 
			
		||||
 | 
			
		||||
                    if (libraryItem.IsTopParent)
 | 
			
		||||
                    {
 | 
			
		||||
                        continue;
 | 
			
		||||
                    }
 | 
			
		||||
 | 
			
		||||
                    if (Folder.IsPathOffline(path))
 | 
			
		||||
                    {
 | 
			
		||||
                        libraryItem.IsOffline = true;
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user