Skip to content

Commit

Permalink
Rename destinationFileLocationOnDisk to subtitlepath
Browse files Browse the repository at this point in the history
  • Loading branch information
h3llrais3r committed Apr 10, 2018
1 parent b6eab00 commit ee7afb3
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion autosubliminal/notifiers/__init__.py
Expand Up @@ -29,7 +29,7 @@ class Notifier(object):

def __init__(self, download_item):
self._notifier_dict = {'video': os.path.basename(download_item['videopath']),
'subtitle': os.path.basename(download_item['destinationFileLocationOnDisk']),
'subtitle': os.path.basename(download_item['subtitlepath']),
'language': download_item['downlang'],
'provider': download_item['provider']}

Expand Down
4 changes: 2 additions & 2 deletions autosubliminal/postprocessor.py
Expand Up @@ -79,8 +79,8 @@ def _construct_process_cmd(self):

# Add subtitle path argument (can be empty if no subtitle was downloaded)
subtitle_path = None
if 'destinationFileLocationOnDisk' in self._wanted_item:
subtitle_path = self._wanted_item['destinationFileLocationOnDisk']
if 'subtitlepath' in self._wanted_item:
subtitle_path = self._wanted_item['subtitlepath']
log.debug('subtitle path: %s', subtitle_path if subtitle_path else '')
process.append(self._convert_arg(subtitle_path if subtitle_path else ''))

Expand Down
4 changes: 2 additions & 2 deletions autosubliminal/subchecker.py
Expand Up @@ -604,10 +604,10 @@ def _construct_download_item(wanted_item, subtitles, language, single):
# Construct the download item
download_item = wanted_item.copy()
subtitle_path = subliminal.subtitle.get_subtitle_path(download_item['video'].name, None if single else language)
download_item['destinationFileLocationOnDisk'] = subtitle_path
download_item['subtitlepath'] = subtitle_path
download_item['downloadLink'] = subtitle.page_link
download_item['downlang'] = language.alpha2
download_item['subtitle'] = os.path.split(download_item['destinationFileLocationOnDisk'])[1][:-4]
download_item['subtitle'] = os.path.split(download_item['subtitlepath'])[1][:-4]
download_item['provider'] = subtitle.provider_name
download_item['subtitles'] = subtitles
download_item['single'] = single
Expand Down

0 comments on commit ee7afb3

Please sign in to comment.