Skip to content

Commit

Permalink
Standardize processing method (#5471)
Browse files Browse the repository at this point in the history
* Standardize processing method

* Typo
  • Loading branch information
medariox authored Oct 23, 2018
1 parent ebc2273 commit 2c15c79
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion medusa/name_parser/rules/rules.py
Original file line number Diff line number Diff line change
Expand Up @@ -1173,7 +1173,7 @@ def when(self, matches, context):
first_title = titles[0]
last_title = titles[-1]

# Always use the first langauge
# Always use the first language
first_language = languages[0]
for language in languages[1:]:
if language.start < first_language.start:
Expand Down
7 changes: 3 additions & 4 deletions medusa/post_processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ def __init__(self, file_path, nzb_name=None, process_method=None, is_priority=No
# relative path to the file that is being processed
self.rel_path = self._get_rel_path()
self.nzb_name = nzb_name
self.process_method = process_method if process_method else app.PROCESS_METHOD
self.process_method = process_method or app.PROCESS_METHOD
self.in_history = False
self.release_group = None
self.release_name = None
Expand Down Expand Up @@ -1304,9 +1304,8 @@ def process(self):

self._run_extra_scripts(ep_obj)

if not self.nzb_name and all([app.USE_TORRENTS,
app.PROCESS_METHOD in ('hardlink', 'symlink', 'reflink'),
app.TORRENT_SEED_LOCATION]):
if not self.nzb_name and all([app.USE_TORRENTS, app.TORRENT_SEED_LOCATION,
self.process_method in ('hardlink', 'symlink', 'reflink')]):
# Store self.info_hash and self.release_name so later we can remove from client if setting is enabled
if self.info_hash:
existing_release_names = app.RECENTLY_POSTPROCESSED.get(self.info_hash, [])
Expand Down
5 changes: 3 additions & 2 deletions medusa/process_tv.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def __init__(self, path, process_method=None):

self._output = []
self.directory = path
self.process_method = process_method
self.process_method = process_method or app.PROCESS_METHOD
self.resource_name = None
self.result = True
self.succeeded = True
Expand Down Expand Up @@ -166,7 +166,8 @@ def process(self, resource_name=None, force=False, is_priority=None, delete_on=F
for missedfile in self.missedfiles:
self.log('{0}'.format(missedfile), logger.WARNING)

if app.USE_TORRENTS and app.PROCESS_METHOD in ('hardlink', 'symlink', 'reflink') and app.TORRENT_SEED_LOCATION:
if all([app.USE_TORRENTS, app.TORRENT_SEED_LOCATION,
self.process_method in ('hardlink', 'symlink', 'reflink')]):
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)
Expand Down

0 comments on commit 2c15c79

Please sign in to comment.