old mode 100644
new mode 100755
| | |
| | | #!/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 |
| | |
| | | |
| | | def gentoken(passwd,salt): |
| | | m = md5() |
| | | m.update(passwd + salt) |
| | | m.update(passwd.encode('utf8') + salt.encode('utf-8')) |
| | | return m.hexdigest() |
| | | |
| | | |
| | |
| | | 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 |