Code Monkey home page Code Monkey logo

Comments (12)

jcorporation avatar jcorporation commented on May 19, 2024

Does it work, if you click on the song title?

from mympd.

Emilot avatar Emilot commented on May 19, 2024

If i click on the song title it will be added successfully.

from mympd.

jcorporation avatar jcorporation commented on May 19, 2024

Thanks for your confirmation. I think I found the bug

from mympd.

Emilot avatar Emilot commented on May 19, 2024

πŸ‘

from mympd.

jcorporation avatar jcorporation commented on May 19, 2024

Should now be fixed in devel. Can you test it?

from mympd.

Emilot avatar Emilot commented on May 19, 2024

SyntaxError: JSON.parse: unterminated string at line 1 column 133 of the JSON data[Learn More] mympd.min.js:121:1
showMenu/</<
http://192.168.0.206/js/mympd.min.js:121:1

Same error jc...

from mympd.

Emilot avatar Emilot commented on May 19, 2024

var cmd = JSON.parse(dh.replace(/'/g, '"'));

If i replace minified with normal js the Web Console indicate this line when i hit "Append to queue".

I do not know if it helps somewhere.

from mympd.

Emilot avatar Emilot commented on May 19, 2024

Oh you have another one here:

el.addEventListener('shown.bs.popover', function(event) {
    document.getElementsByClassName('popover-content')[0].addEventListener('click', function(event) {
        event.preventDefault();
        event.stopPropagation();
        if (event.target.nodeName == 'A') {
            var dh = event.target.getAttribute('data-href');
            if (dh) {
                **var cmd = JSON.parse(dh.replace(/\'/g, '"'));**

from mympd.

jcorporation avatar jcorporation commented on May 19, 2024

var cmd = JSON.parse(dh);
is here right. But this doesn't fix the bug.
It seems that saving the ouptut of JSON.stringify can't be saved in a data-* attribute in the dom, if it contains ' or " characters in values.

Encoding the output in base64 works. I commited the fix in devel.

from mympd.

Emilot avatar Emilot commented on May 19, 2024

Perfect jc

Case closed!

Thank you.

from mympd.

ideonaudio avatar ideonaudio commented on May 19, 2024

Hi JC,

Is this the same issue?

error mympd

I tried to add an album with " ' " in title... Sgt. Pepper's - Beatles

from mympd.

jcorporation avatar jcorporation commented on May 19, 2024

Is an another issue, please open a new issue and attach debug logs of myMPD and verbose logs of mpd. If JavaScript errors occurs these also.

from mympd.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.