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; continue;
} }
if (replaceExisting) // if (replaceExisting)
{ // {
RemoveExistingTrackFiles(author, book); // RemoveExistingTrackFiles(author, book);
} // }
// set the correct release to be monitored before importing the new files // set the correct release to be monitored before importing the new files
var newRelease = albumDecision.First().Item.Edition; var newRelease = albumDecision.First().Item.Edition;

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

Loading…
Cancel
Save