diff --git a/beetsplug/embyupdate.py b/beetsplug/embyupdate.py index b9adde36a..2a2f792f5 100644 --- a/beetsplug/embyupdate.py +++ b/beetsplug/embyupdate.py @@ -104,26 +104,26 @@ class EmbyUpdate(BeetsPlugin): port = config['emby']['port'].get() username = config['emby']['username'].get() password = config['emby']['password'].get() - token = config['emby']['apikey'].get() + token = config['emby']['apikey'].get() # Get user information from the Emby API. user = get_user(host, port, username) if not user: self._log.warning(u'User {0} could not be found.'.format(username)) return - - if not token: - # Create Authentication data and headers. - auth_data = password_data(username, password) - headers = create_headers(user[0]['Id']) - # Get authentication token. - token = get_token(host, port, headers, auth_data) - if not token: - self._log.warning( - u'Could not get token for user {0}', username - ) - return + if not token: + # Create Authentication data and headers. + auth_data = password_data(username, password) + headers = create_headers(user[0]['Id']) + + # Get authentication token. + token = get_token(host, port, headers, auth_data) + if not token: + self._log.warning( + u'Could not get token for user {0}', username + ) + return # Recreate headers with a token. headers = create_headers(user[0]['Id'], token=token) diff --git a/docs/changelog.rst b/docs/changelog.rst index efb6cc260..82172f545 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -1,6 +1,11 @@ Changelog ========= +* :doc:`/plugins/embyupdate`: Use the option of Emby's API Key's rather than + a password. Add an apikey to your config file for this to work. Does not + break the use of password as an authentication method + + 1.4.0 (in development) ----------------------