mirror of
				https://github.com/jellyfin/jellyfin.git
				synced 2025-11-04 03:27:21 -05:00 
			
		
		
		
	This commit includes changes to enable and stabilize asyncronous operation in the auto-organize area. Here are the key points: - The auto-organize correction dialog is now closed (almost) instantly. This means that the user does not have to wait until the file copy/move operation is completed in order to continue. (even with local HDs the copy/move process can take several minutes or even much longer with network destination). - This commit also implements locking of files to be organized in order to prevent parallel processing of the same item. In effect, there can be 2 or more manual organization operations active even while the normal auto-organization task is running without causing any problems - The items that are currently being processed are indicated as such in the log with an orange color and a spinner graphic - The client display is refreshed through websocket messages - A side effect of this is that other clients showing the auto-organize log at the same time are always up-to-date as well
		
			
				
	
	
		
			110 lines
		
	
	
		
			3.3 KiB
		
	
	
	
		
			C#
		
	
	
	
	
	
			
		
		
	
	
			110 lines
		
	
	
		
			3.3 KiB
		
	
	
	
		
			C#
		
	
	
	
	
	
using System;
 | 
						|
using System.Collections.Generic;
 | 
						|
 | 
						|
namespace MediaBrowser.Model.FileOrganization
 | 
						|
{
 | 
						|
    public class FileOrganizationResult
 | 
						|
    {
 | 
						|
        /// <summary>
 | 
						|
        /// Gets or sets the result identifier.
 | 
						|
        /// </summary>
 | 
						|
        /// <value>The result identifier.</value>
 | 
						|
        public string Id { get; set; }
 | 
						|
        
 | 
						|
        /// <summary>
 | 
						|
        /// Gets or sets the original path.
 | 
						|
        /// </summary>
 | 
						|
        /// <value>The original path.</value>
 | 
						|
        public string OriginalPath { get; set; }
 | 
						|
 | 
						|
        /// <summary>
 | 
						|
        /// Gets or sets the name of the original file.
 | 
						|
        /// </summary>
 | 
						|
        /// <value>The name of the original file.</value>
 | 
						|
        public string OriginalFileName { get; set; }
 | 
						|
 | 
						|
        /// <summary>
 | 
						|
        /// Gets or sets the name of the extracted.
 | 
						|
        /// </summary>
 | 
						|
        /// <value>The name of the extracted.</value>
 | 
						|
        public string ExtractedName { get; set; }
 | 
						|
 | 
						|
        /// <summary>
 | 
						|
        /// Gets or sets the extracted year.
 | 
						|
        /// </summary>
 | 
						|
        /// <value>The extracted year.</value>
 | 
						|
        public int? ExtractedYear { get; set; }
 | 
						|
 | 
						|
        /// <summary>
 | 
						|
        /// Gets or sets the extracted season number.
 | 
						|
        /// </summary>
 | 
						|
        /// <value>The extracted season number.</value>
 | 
						|
        public int? ExtractedSeasonNumber { get; set; }
 | 
						|
 | 
						|
        /// <summary>
 | 
						|
        /// Gets or sets the extracted episode number.
 | 
						|
        /// </summary>
 | 
						|
        /// <value>The extracted episode number.</value>
 | 
						|
        public int? ExtractedEpisodeNumber { get; set; }
 | 
						|
 | 
						|
        /// <summary>
 | 
						|
        /// Gets or sets the extracted ending episode number.
 | 
						|
        /// </summary>
 | 
						|
        /// <value>The extracted ending episode number.</value>
 | 
						|
        public int? ExtractedEndingEpisodeNumber { get; set; }
 | 
						|
        
 | 
						|
        /// <summary>
 | 
						|
        /// Gets or sets the target path.
 | 
						|
        /// </summary>
 | 
						|
        /// <value>The target path.</value>
 | 
						|
        public string TargetPath { get; set; }
 | 
						|
 | 
						|
        /// <summary>
 | 
						|
        /// Gets or sets the date.
 | 
						|
        /// </summary>
 | 
						|
        /// <value>The date.</value>
 | 
						|
        public DateTime Date { get; set; }
 | 
						|
 | 
						|
        /// <summary>
 | 
						|
        /// Gets or sets the error message.
 | 
						|
        /// </summary>
 | 
						|
        /// <value>The error message.</value>
 | 
						|
        public string StatusMessage { get; set; }
 | 
						|
 | 
						|
        /// <summary>
 | 
						|
        /// Gets or sets the status.
 | 
						|
        /// </summary>
 | 
						|
        /// <value>The status.</value>
 | 
						|
        public FileSortingStatus Status { get; set; }
 | 
						|
 | 
						|
        /// <summary>
 | 
						|
        /// Gets or sets the type.
 | 
						|
        /// </summary>
 | 
						|
        /// <value>The type.</value>
 | 
						|
        public FileOrganizerType Type { get; set; }
 | 
						|
 | 
						|
        /// <summary>
 | 
						|
        /// Gets or sets the duplicate paths.
 | 
						|
        /// </summary>
 | 
						|
        /// <value>The duplicate paths.</value>
 | 
						|
        public List<string> DuplicatePaths { get; set; }
 | 
						|
 | 
						|
        /// <summary>
 | 
						|
        /// Gets or sets the size of the file.
 | 
						|
        /// </summary>
 | 
						|
        /// <value>The size of the file.</value>
 | 
						|
        public long FileSize { get; set; }
 | 
						|
 | 
						|
        /// <summary>
 | 
						|
        /// Indicates if the item is currently being processed.
 | 
						|
        /// </summary>
 | 
						|
        /// <remarks>Runtime property not persisted to the store.</remarks>
 | 
						|
        public bool IsInProgress { get; set; }
 | 
						|
 | 
						|
        public FileOrganizationResult()
 | 
						|
        {
 | 
						|
            DuplicatePaths = new List<string>();
 | 
						|
        }
 | 
						|
    }
 | 
						|
}
 |