Fixed: Temporary fix for broken upgrades

pull/755/head
ta264 4 years ago
parent 82bb65ecb6
commit d21e446b0e

@ -110,10 +110,10 @@ namespace NzbDrone.Core.MediaFiles.BookImport
continue;
}
if (replaceExisting)
{
RemoveExistingTrackFiles(author, book);
}
// if (replaceExisting)
// {
// RemoveExistingTrackFiles(author, book);
// }
// set the correct release to be monitored before importing the new files
var newRelease = albumDecision.First().Item.Edition;

@ -75,7 +75,7 @@ namespace NzbDrone.Core.MediaFiles
if (_diskProvider.FileExists(bookFilePath))
{
_logger.Debug("Removing existing book file: {0}", file);
_logger.Debug("Removing existing book file: {0} CalibreId: {1}", file, file.CalibreId);
if (!isCalibre)
{
@ -83,12 +83,10 @@ namespace NzbDrone.Core.MediaFiles
}
else
{
_calibre.RemoveFormats(file.CalibreId,
new[]
{
Path.GetExtension(bookFile.Path)
},
settings);
var existing = _calibre.GetBook(file.CalibreId, settings);
var existingFormats = existing.Formats.Keys;
_logger.Debug($"Removing existing formats {existingFormats.ConcatToString()} from calibre");
_calibre.RemoveFormats(file.CalibreId, existingFormats, settings);
}
}
@ -126,7 +124,7 @@ namespace NzbDrone.Core.MediaFiles
public BookFile CalibreAddAndConvert(BookFile file, CalibreSettings settings)
{
_logger.Trace($"Importing to calibre: {file.Path}");
_logger.Trace($"Importing to calibre: {file.Path} calibre id: {file.CalibreId}");
if (file.CalibreId == 0)
{

Loading…
Cancel
Save