Skip to content

Commit

Permalink
Fix freemobile notifier
Browse files Browse the repository at this point in the history
  • Loading branch information
sharkykh committed Jun 23, 2019
1 parent 6a722f6 commit 5916ea6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
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

0 comments on commit 5916ea6

Please sign in to comment.