-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: use endwith()
instead of endWith()
#3598
Conversation
Working on creating some tests so we don't run into this problem again. |
So far, so good. 😃 |
made them static private class methods
r = string.ascii_letters + string.digits | ||
salt = "".join([random.choice(r) for _ in range(6)]) | ||
salted_password = password + salt | ||
token = hashlib.md5(salted_password.encode('utf-8')).hexdigest() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also changed this, but hard to tell in GitHub diff...
Used to be hashlib.md5().update(salted_password.encode('utf-8')).hexdigest()
. Seems like a better use of hashlib
.
""" | ||
|
||
url = config['subsonic']['url'].as_str() | ||
if url and url.endswith('/'): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was the main problem.
Nice; looks prefect to me! Thanks!! |
Thanks as always! |
Description
Fixes method call error created by this: #3449
Moved the helper static functions to the
SubsonicUpdate
class and made them private static.Added tests for various of URL input and made sure that it can create a token and format URL correctly.