Skip to content

Commit

Permalink
Add support for latin-1 in notify xbmc (I hope)
Browse files Browse the repository at this point in the history
  • Loading branch information
N3MIS15 committed Jul 5, 2013
1 parent 0a14280 commit ceaa993
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
10 changes: 5 additions & 5 deletions modules/xbmc_notify.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from flask import Flask, jsonify, render_template, request
import os
import os, urllib

from maraschino import app, RUNDIR, logger
from socket import *
Expand Down Expand Up @@ -27,10 +27,10 @@ def xhr_notify():

@app.route('/xhr/xbmc_notify/send', methods=['post'])
def xhr_notify_message():
label = str(request.form['label'])
hostname = str(request.form['hostname'])
message = str(request.form['message'])
title = str(request.form['title'])
label = urllib.unquote(request.form['label']).encode('utf-8')
hostname = urllib.unquote(request.form['hostname']).encode('utf-8')
message = urllib.unquote(request.form['message']).encode('utf-8')
title = urllib.unquote(request.form['title']).encode('utf-8')
port = 9777
icon = os.path.join(RUNDIR, 'static', 'images', 'notifications', request.form['image'])

Expand Down
8 changes: 4 additions & 4 deletions static/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2766,10 +2766,10 @@ $(document).ready(function() {

$(document).on('click', '#notify_dialog #sendmessage', function() {
var image = $('#notify_dialog #image').val();
var label = $('#notify_dialog #sendmessage').data('label');
var hostname = $('#notify_dialog #sendmessage').data('hostname');
var title = $('#notify_dialog #title').val();
var message = $('#notify_dialog #message').val();
var label = escape($('#notify_dialog #sendmessage').data('label'));
var hostname = escape($('#notify_dialog #sendmessage').data('hostname'));
var title = escape($('#notify_dialog #title').val());
var message = escape($('#notify_dialog #message').val());
var result = $('#notify_dialog .result');

result.text('');
Expand Down

0 comments on commit ceaa993

Please sign in to comment.