mirror of
https://github.com/moparisthebest/SickRage
synced 2024-12-13 11:32:20 -05:00
Port:Add safe replace existing file is larger but new file is proper.
This commit is contained in:
parent
b9c22582cf
commit
821c1237b3
@ -868,16 +868,17 @@ class PostProcessor(object):
|
|||||||
if not priority_download:
|
if not priority_download:
|
||||||
|
|
||||||
# if there's an existing file that we don't want to replace stop here
|
# if there's an existing file that we don't want to replace stop here
|
||||||
if existing_file_status in (PostProcessor.EXISTS_LARGER, PostProcessor.EXISTS_SAME):
|
if existing_file_status == PostProcessor.EXISTS_LARGER:
|
||||||
self._log(
|
if self.is_proper:
|
||||||
u"File exists and we are not going to replace it because it's not smaller, quitting post-processing",
|
self._log(u"File exists and new file is smaller, new file is a proper/repack, marking it safe to replace", logger.DEBUG)
|
||||||
logger.ERROR)
|
return True
|
||||||
return False
|
|
||||||
elif existing_file_status == PostProcessor.EXISTS_SMALLER:
|
else:
|
||||||
self._log(u"File exists and is smaller than the new file so I'm going to replace it", logger.DEBUG)
|
self._log(u"File exists and new file is smaller, marking it unsafe to replace", logger.DEBUG)
|
||||||
elif existing_file_status != PostProcessor.DOESNT_EXIST:
|
return False
|
||||||
self._log(u"Unknown existing file status. This should never happen, please log this as a bug.",
|
|
||||||
logger.ERROR)
|
elif existing_file_status == PostProcessor.EXISTS_SAME:
|
||||||
|
self._log(u"File exists and new file is same size, marking it unsafe to replace", logger.DEBUG)
|
||||||
return False
|
return False
|
||||||
|
|
||||||
# if the file is priority then we're going to replace it even if it exists
|
# if the file is priority then we're going to replace it even if it exists
|
||||||
|
Loading…
Reference in New Issue
Block a user