mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-18 15:03:06 +03:00
update javascript connection manager to latest feature set
This commit is contained in:
@@ -210,7 +210,7 @@ namespace MediaBrowser.Server.Implementations.FileOrganization
|
||||
|
||||
try
|
||||
{
|
||||
_fileSystem.DeleteFile(path);
|
||||
DeleteLibraryFile(path);
|
||||
}
|
||||
catch (IOException ex)
|
||||
{
|
||||
@@ -224,6 +224,15 @@ namespace MediaBrowser.Server.Implementations.FileOrganization
|
||||
}
|
||||
}
|
||||
|
||||
private void DeleteLibraryFile(string path)
|
||||
{
|
||||
var filename = Path.GetFileNameWithoutExtension(path);
|
||||
|
||||
_fileSystem.DeleteFile(path);
|
||||
|
||||
// Now find other files
|
||||
}
|
||||
|
||||
private List<string> GetOtherDuplicatePaths(string targetPath, Series series, int seasonNumber, int episodeNumber, int? endingEpisodeNumber)
|
||||
{
|
||||
var episodePaths = series.GetRecursiveChildren()
|
||||
@@ -281,11 +290,11 @@ namespace MediaBrowser.Server.Implementations.FileOrganization
|
||||
|
||||
Directory.CreateDirectory(Path.GetDirectoryName(result.TargetPath));
|
||||
|
||||
var copy = File.Exists(result.TargetPath);
|
||||
var targetAlreadyExists = File.Exists(result.TargetPath);
|
||||
|
||||
try
|
||||
{
|
||||
if (copy || options.CopyOriginalFile)
|
||||
if (targetAlreadyExists || options.CopyOriginalFile)
|
||||
{
|
||||
File.Copy(result.OriginalPath, result.TargetPath, true);
|
||||
}
|
||||
@@ -312,7 +321,7 @@ namespace MediaBrowser.Server.Implementations.FileOrganization
|
||||
_libraryMonitor.ReportFileSystemChangeComplete(result.TargetPath, true);
|
||||
}
|
||||
|
||||
if (copy && !options.CopyOriginalFile)
|
||||
if (targetAlreadyExists && !options.CopyOriginalFile)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user