Skip to content

Commit

Permalink
Upstream fix
Browse files Browse the repository at this point in the history
  • Loading branch information
fernandog committed Mar 17, 2016
1 parent 71c63d7 commit aa036c8
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions sickbeard/postProcessor.py
Original file line number Diff line number Diff line change
Expand Up @@ -843,10 +843,12 @@ def _run_extra_scripts(self, ep_obj):
"""

filepath = self.file_path
if isinstance(filepath, unicode):
filepath = filepath.encode(sickbeard.SYS_ENCODING)

ep_location = ep_obj.location
for item in (ep_location, filepath):
if isinstance(item, unicode):
item = item.encode(sickbeard.SYS_ENCODING)
if isinstance(ep_location, unicode):
ep_location = ep_location.encode(sickbeard.SYS_ENCODING)

for curScriptName in sickbeard.EXTRA_SCRIPTS:
if isinstance(curScriptName, unicode):
Expand All @@ -858,7 +860,7 @@ def _run_extra_scripts(self, ep_obj):
self._log(u"Absolute path to script: {}".format(script_cmd[0]), logger.DEBUG)

script_cmd += [
ep_location, filepath, str(ep_obj.show.indexerid),
str(ep_location), str(filepath), str(ep_obj.show.indexerid),
str(ep_obj.season), str(ep_obj.episode), str(ep_obj.airdate)
]

Expand Down

0 comments on commit aa036c8

Please sign in to comment.