From 56d54cdf2e20d2f5aac882c874fae6a1aa959cae Mon Sep 17 00:00:00 2001
From: Chris Pomeroy <chris.pomeroy@hotmail.com>
Date: Mon, 19 Apr 2021 00:06:12 +0000
Subject: [PATCH] wtf syntax error.

---
 querysubsonic.py |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/querysubsonic.py b/querysubsonic.py
old mode 100644
new mode 100755
index c0bacc7..c5050c4
--- a/querysubsonic.py
+++ b/querysubsonic.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/local/bin/python -u
 
 ##  Eaxmple url
 ## https://subsonic.darkurthe.net/audiobooks/rest/getMusicFolders.view?u=testuser&t=0733b8e9889d7a9986d82764cee9db1c&s=O5kgRb6X5jFFbPSW&v=1.15.0&c=myapp&f=json
@@ -20,7 +20,7 @@
 
 def gentoken(passwd,salt):
     m = md5()
-    m.update(passwd + salt)
+    m.update(passwd.encode('utf8') + salt.encode('utf-8'))
     return m.hexdigest()
 
 
@@ -28,7 +28,7 @@
     s = gensalt()
     t = gentoken(passwd,s)
     payload = {'u': user, 't': t, 's': s, 'c': 'audible', 'v': '1.15.0', 'f': 'json', 'type': 'alphabeticalByName', 'size': '500'}
-    r = requests.get('https://subsonic.darkurthe.net/audiobooks/rest/getAlbumList.view', payload, verify=False)
+    r = requests.get('https://subsonic.darkurthe.net/audiobooks/rest/getAlbumList.view', payload)
     if r.status_code == 200:
         jr = r.json()
         return jr

--
Gitblit v1.10.0