Skip to content
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 freemobile notifier #6867

Merged
merged 1 commit into from
Jun 23, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 ([#6867](https://github.com/pymedusa/Medusa/pull/6867))

-----

Expand Down
11 changes: 7 additions & 4 deletions medusa/notifiers/freemobile.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
from __future__ import unicode_literals

import logging
from builtins import object

from medusa import app
from medusa.common import (
Expand Down Expand Up @@ -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
Expand Down