old_contents: import os
  import stat
  import subprocess
  from xbmctorrent.common import BIN_PATH
  
  def ensure_exec_perms(file_):
      st = os.stat(file_)
      os.chmod(file_, st.st_mode | stat.S_IEXEC)
      return file_
  
  def start(**kwargs):
      args = [ensure_exec_perms(os.path.join(BIN_PATH, "torrent2http"))]
      for k, v in kwargs.items():
          args.append("--%s" % k)
          args.append(v)
  
      import xbmc
      xbmc.log(repr(args))
      return subprocess.Popen(args, cwd=BIN_PATH)
  
new_contents: import os
  import stat
  import subprocess
  import platform
  from xbmctorrent.common import BIN_PATH
  
  def ensure_exec_perms(file_):
      st = os.stat(file_)
      os.chmod(file_, st.st_mode | stat.S_IEXEC)
      return file_
  
  TORRENT2HTTP_BINARY = ensure_exec_perms(os.path.join(BIN_PATH, platform.system(), "torrent2http"))
  
  def start(**kwargs):
      args = [TORRENT2HTTP_BINARY]
      for k, v in kwargs.items():
          args.append("--%s" % k)
          args.append(v)
  
      # Needed for Linux
      env = os.environ.copy()
      env["LD_LIBRARY_PATH"] = os.path.join(BIN_PATH, platform.system())
  
      import xbmc
      xbmc.log(repr(args))
      return subprocess.Popen(args, cwd=BIN_PATH, env=env)
  
subject: Make it work on Linux, need Linux torrent2http build