diff --git a/CHANGELOG.md b/CHANGELOG.md index a58e7acad5d..d91b0afc8ae 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ #### Fixes - Fixed hdtorrent provider parse the publishing date with the day first ([#6847](https://github.com/pymedusa/Medusa/pull/6847)) - Fixed release link on Help & Info page ([#6854](https://github.com/pymedusa/Medusa/pull/6854)) +- Fixed FreeMobile notifier message encode error ([#6866](https://github.com/pymedusa/Medusa/pull/6866)) ----- diff --git a/medusa/notifiers/freemobile.py b/medusa/notifiers/freemobile.py index de7a3cbc841..6ba571f4906 100644 --- a/medusa/notifiers/freemobile.py +++ b/medusa/notifiers/freemobile.py @@ -3,7 +3,6 @@ from __future__ import unicode_literals import logging -from builtins import object from medusa import app from medusa.common import ( @@ -47,9 +46,13 @@ def _sendFreeMobileSMS(self, title, msg, cust_id=None, apiKey=None): log.debug(u'Free Mobile in use with API KEY: {0}', apiKey) # build up the URL and parameters - msg = msg.strip() - msg_quoted = quote(title.encode('utf-8') + ': ' + msg.encode('utf-8')) - URL = 'https://smsapi.free-mobile.fr/sendmsg?user=' + cust_id + '&pass=' + apiKey + '&msg=' + msg_quoted + msg = '{0}: {1}'.format(title, msg.strip()) + msg_quoted = quote(msg.encode('utf-8')) + URL = 'https://smsapi.free-mobile.fr/sendmsg?user={user}&pass={api_key}&msg={msg}'.format( + user=cust_id, + api_key=apiKey, + msg=msg_quoted, + ) req = Request(URL) # send the request to Free Mobile