Skip to content
Snippets Groups Projects
Commit 96b72826 authored by nimrod's avatar nimrod
Browse files

New and improved code.

parent 44fcbdce
No related branches found
No related tags found
No related merge requests found
......@@ -16,10 +16,8 @@ def scan(library=None):
kodi_json_rpc_url = "http://172.18.0.1:8080/jsonrpc"
headers = {"content-type": "application/json"}
base_request_data = {"jsonrpc": "2.0", "id": "transmission"}
audio_request_data = base_request_data.copy()
audio_request_data["method"] = "AudioLibrary.Scan"
video_request_data = base_request_data.copy()
video_request_data["method"] = "VideoLibrary.Scan"
audio_request_data = {**base_request_data, "method": "AudioLibrary.Scan"}
video_request_data = {**base_request_data, "method": "VideoLibrary.Scan"}
if library == "audio":
req = urllib.request.Request(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment