Commit 6e96928b authored by echel0n's avatar echel0n

Refactored processed marker code

parent 5c9cd24a
This diff is collapsed.
......@@ -1138,7 +1138,6 @@ class PostProcessor(object):
raise EpisodePostProcessingFailedException("File is locked for reading")
self._copy(self.file_path, dest_path, new_base_name, sickrage.app.config.move_associated_files,
sickrage.app.config.use_subtitles and ep_obj.show.subtitles)
self._add_processed_marker_file(self.file_path)
elif self.process_method == self.PROCESS_METHOD_MOVE:
if isFileLocked(self.file_path, True):
raise EpisodePostProcessingFailedException("File is locked for reading/writing")
......@@ -1147,24 +1146,24 @@ class PostProcessor(object):
elif self.process_method == self.PROCESS_METHOD_HARDLINK:
self._hardlink(self.file_path, dest_path, new_base_name, sickrage.app.config.move_associated_files,
sickrage.app.config.use_subtitles and ep_obj.show.subtitles)
self._add_processed_marker_file(self.file_path)
elif self.process_method == self.PROCESS_METHOD_SYMLINK:
if isFileLocked(self.file_path, True):
raise EpisodePostProcessingFailedException("File is locked for reading/writing")
self._moveAndSymlink(self.file_path, dest_path, new_base_name,
sickrage.app.config.move_associated_files,
sickrage.app.config.use_subtitles and ep_obj.show.subtitles)
self._add_processed_marker_file(self.file_path)
elif self.process_method == self.PROCESS_METHOD_SYMLINK_REVERSED:
self._symlink(self.file_path, dest_path, new_base_name, sickrage.app.config.move_associated_files,
sickrage.app.config.use_subtitles and ep_obj.show.subtitles)
self._add_processed_marker_file(self.file_path)
else:
sickrage.app.log.error("Unknown process method: " + str(self.process_method))
raise EpisodePostProcessingFailedException("Unable to move the files to their new home")
except (OSError, IOError):
raise EpisodePostProcessingFailedException("Unable to move the files to their new home")
# add processed marker file
self._add_processed_marker_file(self.file_path)
# download subtitles
if sickrage.app.config.use_subtitles and ep_obj.show.subtitles:
for cur_ep in [ep_obj] + ep_obj.relatedEps:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment