|
|
@ -579,7 +579,9 @@ public class PodcastService { |
|
|
|
if (isEpisodeDeleted(episode)) { |
|
|
|
if (isEpisodeDeleted(episode)) { |
|
|
|
LOG.info("Podcast " + episode.getUrl() + " was deleted. Aborting download."); |
|
|
|
LOG.info("Podcast " + episode.getUrl() + " was deleted. Aborting download."); |
|
|
|
FileUtil.closeQuietly(out); |
|
|
|
FileUtil.closeQuietly(out); |
|
|
|
file.delete(); |
|
|
|
if (!file.delete()) { |
|
|
|
|
|
|
|
LOG.warn("Unable to delete " + file); |
|
|
|
|
|
|
|
} |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
addMediaFileIdToEpisodes(Arrays.asList(episode)); |
|
|
|
addMediaFileIdToEpisodes(Arrays.asList(episode)); |
|
|
|
episode.setBytesDownloaded(bytesDownloaded); |
|
|
|
episode.setBytesDownloaded(bytesDownloaded); |
|
|
|