Random Fixes (#3549)
Co-authored-by: Robbie Davis <robbie@therobbiedavis.com>
This commit is contained in:
parent
ea81a2f432
commit
39726f8c4d
33 changed files with 425 additions and 107 deletions
|
|
@ -16,6 +16,7 @@ using Kavita.Common;
|
|||
using Microsoft.Extensions.Logging;
|
||||
using SharpCompress.Archives;
|
||||
using SharpCompress.Common;
|
||||
using YamlDotNet.Core;
|
||||
|
||||
namespace API.Services;
|
||||
|
||||
|
|
@ -354,6 +355,14 @@ public class ArchiveService : IArchiveService
|
|||
foreach (var path in files)
|
||||
{
|
||||
var tempPath = Path.Join(tempLocation, _directoryService.FileSystem.Path.GetFileNameWithoutExtension(_directoryService.FileSystem.FileInfo.New(path).Name));
|
||||
|
||||
// Image series need different handling
|
||||
if (Tasks.Scanner.Parser.Parser.IsImage(path))
|
||||
{
|
||||
var parentDirectory = _directoryService.FileSystem.DirectoryInfo.New(path).Parent?.Name;
|
||||
tempPath = Path.Join(tempLocation, parentDirectory ?? _directoryService.FileSystem.FileInfo.New(path).Name);
|
||||
}
|
||||
|
||||
progressCallback(Tuple.Create(_directoryService.FileSystem.FileInfo.New(path).Name, (1.0f * totalFiles) / count));
|
||||
if (Tasks.Scanner.Parser.Parser.IsArchive(path))
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue