fossfreedom / rhythmweb

rhythmbox v2.9x/v3.x GTK3 port of the original rhythmweb GTK2 plugin created previously for rhythmbox v0.1x
GNU General Public License v3.0
23 stars 8 forks source link

Use AJAX for web button interactivity #3

Closed dinoboy197 closed 12 years ago

dinoboy197 commented 12 years ago

This should fix the problematic page reload error.

The code now uses Javascript (using JQuery) to send commands to the the plugin. The plugin will execute the command and simply respond "OK". The JQuery callback hander will then reload the page, to ensure that the page content stays updated in case of track changes.

Using JQuery + AJAX sets us up for many more quick loading, dynamic features of the UI, including deprecating full page reloads in the future if desired.

The parse_post method was changed to be more robust to CONTENT_TYPE headers sent from modern browsers, which might include the content type itself and other data (like charset.)

fossfreedom commented 12 years ago

ok - thanks for the commit - it fixes the html issues

It does have another side effect thought that the web-page play button no longer plays - it does pause though if the song is already playing!

I'll create another issue for this to investigate.

EDIT:

issue resolved.

dinoboy197 commented 12 years ago

Sounds good! I'll check that out next.