From ca8832809daf6e57b5bd61a3b2c03640b22dbe9c Mon Sep 17 00:00:00 2001 From: Pauligrinder Date: Mon, 23 Jan 2017 13:14:36 +0200 Subject: [PATCH] Removed a couple of unnecessary imports json and requests.BasicAuthentication --- beetsplug/kodiupdate.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/beetsplug/kodiupdate.py b/beetsplug/kodiupdate.py index 236f914bf..31c978dd6 100644 --- a/beetsplug/kodiupdate.py +++ b/beetsplug/kodiupdate.py @@ -12,8 +12,6 @@ Put something like the following in your config.yaml to configure: from __future__ import division, absolute_import, print_function import requests -import json -from requests.auth import HTTPBasicAuth from beets import config from beets.plugins import BeetsPlugin @@ -27,7 +25,7 @@ def update_kodi(host, port, user, password): headers = {'Content-Type': 'application/json'} # Create the payload. Id seems to be mandatory. payload = {'jsonrpc': '2.0', 'method':'AudioLibrary.Scan', 'id':1} - r = requests.post(url, auth=HTTPBasicAuth(user, password), json=payload, headers=headers) + r = requests.post(url, auth=(user, password), json=payload, headers=headers) return r class KodiUpdate(BeetsPlugin):