docs: def xbmc_url(url, **options):
      '''Appends key/val pairs to the end of a URL. Useful for passing arbitrary
      HTTP headers to XBMC to be used when fetching a media resource, e.g.
      cookies.
      '''
      optionstring = urllib.urlencode(options)
      if optionstring:
          return url + '|' + optionstring
      return url