-
Notifications
You must be signed in to change notification settings - Fork 278
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Don't check if folders are empty for move instead of copy #9950
Merged
Merged
Changes from 3 commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -406,7 +406,7 @@ def process(self, resource_name=None, force=False, is_priority=None, delete_on=F | |
self.log_and_output('Missed file: {missed_file}', level=logging.WARNING, **{'missed_file': missed_file}) | ||
|
||
if all([app.USE_TORRENTS, app.TORRENT_SEED_LOCATION, | ||
self.process_method in ('hardlink', 'symlink', 'reflink', 'copy')]): | ||
self.process_method in ('hardlink', 'symlink', 'reflink', 'keeplink', 'copy')]): | ||
for info_hash, release_names in list(iteritems(app.RECENTLY_POSTPROCESSED)): | ||
if self.move_torrent(info_hash, release_names): | ||
app.RECENTLY_POSTPROCESSED.pop(info_hash, None) | ||
|
@@ -425,11 +425,8 @@ def _clean_up(self, path, proc_type, delete=False): | |
if self.unwanted_files: | ||
self.delete_files(path, self.unwanted_files) | ||
|
||
if all([not app.NO_DELETE or clean_folder, self.process_method in ('move', 'copy'), | ||
os.path.normpath(path) != os.path.normpath(app.TV_DOWNLOAD_DIR)]): | ||
|
||
check_empty = False if self.process_method == 'copy' else True | ||
if self.delete_folder(path, check_empty=check_empty): | ||
if not app.NO_DELETE and os.path.normpath(path) != os.path.normpath(app.TV_DOWNLOAD_DIR): | ||
if self.delete_folder(path, check_empty=False): | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I guess this is what is really meant here... I may be wrong, but it makes most sense to me. |
||
self.log_and_output('Deleted folder: {path}', level=logging.DEBUG, **{'path': path}) | ||
|
||
def should_process(self, path): | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just added the keeplink because it is added here, meaning it would never get removed from the list otherwise.
Medusa/medusa/post_processor.py
Lines 1316 to 1322 in 25e7b60