Cleaned up some warnings

This commit is contained in:
Joseph Milazzo 2021-01-09 16:22:28 -06:00
parent cd8a1d2892
commit 6020697d7d
7 changed files with 8 additions and 23 deletions

View File

@ -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
{

View File

@ -1,5 +1,4 @@
using System.Collections.Generic;

namespace API.DTOs
{
public class VolumeDto

View File

@ -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);
}
}

View File

@ -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.

View File

@ -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}/"));
}

View File

@ -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();

4
Kavita.sln.DotSettings Normal file
View File

@ -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>