Skip to content

Kavita is a fast, feature rich, cross platform reading server. Built with the goal of being a full solution for all your reading needs. Setup your own server and share your reading collection with your friends and family.

Cleaned up some warnings

Joseph Milazzo6020697d7d2d
diff --git a/API.Tests/Services/ImageProviderTest.cs b/API.Tests/Services/ImageProviderTest.cs
index 7395d51ec..915d589c4 100644
--- a/API.Tests/Services/ImageProviderTest.cs
+++ b/API.Tests/Services/ImageProviderTest.cs
@@ -1,9 +1,6 @@
-using System;
-using System.IO;
+using System.IO;
using API.IO;
-using NetVips;
using Xunit;
-using Xunit.Abstractions;
namespace API.Tests.Services
{
diff --git a/API/DTOs/VolumeDto.cs b/API/DTOs/VolumeDto.cs
index e7c7927e1..dcc4eb258 100644
--- a/API/DTOs/VolumeDto.cs
+++ b/API/DTOs/VolumeDto.cs
@@ -1,5 +1,4 @@
-using System.Collections.Generic;
-
+
namespace API.DTOs
{
public class VolumeDto
diff --git a/API/IO/ImageProvider.cs b/API/IO/ImageProvider.cs
index a85caf0df..d8122f37f 100644
--- a/API/IO/ImageProvider.cs
+++ b/API/IO/ImageProvider.cs
@@ -46,6 +46,7 @@ namespace API.IO
catch (Exception ex)
{
Console.WriteLine("There was a critical error and prevented thumbnail generation.");
+ Console.WriteLine(ex.Message);
}
}
diff --git a/API/Interfaces/IDirectoryService.cs b/API/Interfaces/IDirectoryService.cs
index da328f502..95db809c3 100644
--- a/API/Interfaces/IDirectoryService.cs
+++ b/API/Interfaces/IDirectoryService.cs
@@ -1,6 +1,4 @@
using System.Collections.Generic;
-using System.IO;
-using System.IO.Compression;
using System.Threading.Tasks;
using API.DTOs;
@@ -32,17 +30,6 @@ namespace API.Interfaces
/// <param name="forceUpdate">Force overwriting for cover images</param>
void ScanLibrary(int libraryId, bool forceUpdate);
- /// <summary>
- /// Extracts an archive to a temp cache directory. Returns path to new directory. If temp cache directory already exists,
- /// will return that without performing an extraction. Returns empty string if there are any invalidations which would
- /// prevent operations to perform correctly (missing archivePath file, empty archive, etc).
- /// Deprecated.
- /// </summary>
- /// <param name="archivePath">A valid file to an archive file.</param>
- /// <param name="volumeId">Id of volume being extracted.</param>
- /// <returns></returns>
- string ExtractArchive(string archivePath, int volumeId);
-
/// <summary>
/// Returns the path a volume would be extracted to.
/// Deprecated.
diff --git a/API/Services/CacheService.cs b/API/Services/CacheService.cs
index 3bc4778e5..874a1deb8 100644
--- a/API/Services/CacheService.cs
+++ b/API/Services/CacheService.cs
@@ -37,8 +37,7 @@ namespace API.Services
public string GetCachePath(int volumeId)
{
- // TODO: Make this an absolute path, no ..'s in it.
- return Path.Join(Directory.GetCurrentDirectory(), $"../cache/{volumeId}/");
+ return Path.GetFullPath(Path.Join(Directory.GetCurrentDirectory(), $"../cache/{volumeId}/"));
}
diff --git a/API/Startup.cs b/API/Startup.cs
index 4116a1aa7..90a4aff92 100644
--- a/API/Startup.cs
+++ b/API/Startup.cs
@@ -1,4 +1,3 @@
-using System;
using API.Extensions;
using API.Middleware;
using Hangfire;
@@ -47,7 +46,6 @@ namespace API
app.UseHangfireDashboard();
- //backgroundJobs.Enqueue(() => Console.WriteLine("Hello world from Hangfire!"));
app.UseHttpsRedirection();
diff --git a/Kavita.sln.DotSettings b/Kavita.sln.DotSettings
new file mode 100644
index 000000000..471c3f677
--- /dev/null
+++ b/Kavita.sln.DotSettings
@@ -0,0 +1,4 @@
+<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
+ <s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=1BC0273F_002DFEBE_002D4DA1_002DBC04_002D3A3167E4C86C_002Fd_003AData_002Fd_003AMigrations/@EntryIndexedValue">ExplicitlyExcluded</s:String>
+ <s:Boolean x:Key="/Default/CodeInspection/Highlighting/RunLongAnalysisInSwa/@EntryValue">True</s:Boolean>
+ <s:Boolean x:Key="/Default/CodeInspection/Highlighting/RunValueAnalysisInNullableWarningsEnabledContext2/@EntryValue">True</s:Boolean></wpf:ResourceDictionary>
\ No newline at end of file