Updated docs and changelog

Updated the append function to be a bit safer when adding the token
parameter. Updated docs and changelog
This commit is contained in:
Ed Carroll 2015-06-04 10:48:38 +01:00
parent 1db1edfb42
commit 865fb0a25f
3 changed files with 10 additions and 1 deletions

View file

@ -12,6 +12,7 @@ from __future__ import (division, absolute_import, print_function,
import requests
from urlparse import urljoin
from urllib import urlencode
import xml.etree.ElementTree as ET
from beets import config
from beets.plugins import BeetsPlugin
@ -51,7 +52,7 @@ def append_token(url, token):
"""Appends the Plex Home token to the api call if required.
"""
if token:
url += '?X-Plex-Token={0}'.format(token)
url += '?' + urlencode({'X-Plex-Token': token})
return url

View file

@ -56,6 +56,8 @@ Fixes:
* Fix a bug, where the autotagger still considers matches that are specifically
listed under the config's ignored section. :bug:`1487`
* Fix a bug with unicode strings when generating thumbnails. :bug:`1485`
* :doc:`/plugins/plexupdate`: Fixed library updates not working when in a Plex
Home by allowing a token with requests.
1.3.13 (April 24, 2015)

View file

@ -13,6 +13,9 @@ which looks like this::
plex:
host: localhost
port: 32400
token: token
Use the token configuration option only when in a Plex Home (see `Plex Token`_)
To use the ``plexupdate`` plugin you need to install the `requests`_ library with:
@ -23,6 +26,7 @@ server every time you change your beets library.
.. _Plex: http://plex.tv/
.. _requests: http://docs.python-requests.org/en/latest/
.. _Plex Token: https://support.plex.tv/hc/en-us/articles/204059436-Finding-your-account-token-X-Plex-Token
Configuration
-------------
@ -33,3 +37,5 @@ The available options under the ``plex:`` section are:
Default: ``localhost``.
- **port**: The Plex server port.
Default: 32400.
- **token**: The Plex Home token.
Default: Empty.