Update code to work with master branch

Issue #1 new
tom enos created an issue

I started this issue so that we could talk about doing the above. I like your work on the webui.

If you allow I will update the code to be inline with the code in Todd's master branch. I have it almost working now. The settings tab still do not work for me, but everything else does. I have only updated code.py and synchronized_lights.py as much as necessary and to pylint. It used the master configuration_manager, hardware_controller, fft, prepostshow, and the other files that are part of master.

It is ready for the rest of the features from master, but we need to talk about it and decide on the best way to finish it. I don't even know if the network code or custom config will work with webui, but I think we get it all working.

Comments (13)

  1. Stephen Burning repo owner

    the issue with the settings tab is the preshows. My code was turning all the settings into a json string to pass back to the browser, but since the preshow was already json i had to handle that a little differently. This is now updated to handle that.

  2. tom enos reporter

    Okay, this is a lot harder then I thought, it's mostly working. I still have a lot of testing to do to find all the little typos, different variable names that I forgot to change, fixing the docstrings, etc...

    New style sync files that auto regenerate if needed.
    per-song configs, not tested but it should work. Networking is in place but untested, it's ready to test. sms is a long way from working, you left a lot of it in place, but your methods work differently so I need more time to get it to work.
    audio-in can now be started and stopped from the interface cleanly.
    I made a few mods to the interface, I can remove them if you don't like it. Just using jquery to pretty things up a little and to tray a few errors that pressing multiple buttons causes. It's only working on the lightson, lightsoff, and audioin buttons, you just need to look at it to see where I going.

    I figured out how to avoid the "If I have an overrides.cfg file the settings tab does not work".
    I figured out how to cleanly stop a song or playlist on demand.
    I just have not had time to try and implement them.

    So get back to me with what you want me to change or keep working on.

    https://bitbucket.org/tom_slick/lightshowpi-webui/src

  3. Stephen Burning repo owner

    i took a quick scroll through and noticed a few errors here and there syntax wise. It will obviously need to be tested. Also, i think you created a blank icon for some buttons. If you just leave the icon attribute off the button element, it will not show an icon. There are somethings that can be removed, like most of the cmd line scripts, but this is a great start. I will see if i can test some of this out this week.

  4. tom enos reporter

    First time using jquery mobile. I will remove the icon I added.
    If you see error point them out. It will help me as I've stared at this code for so long that it all looks the the same.

  5. Stephen Burning repo owner

    will do.. i noticed in code.py on line 223 you are accessing x before its defined. That should be moved into the for x in files loop as should line 226 be moved, unless i am miss interpreting something.

  6. tom enos reporter

    I updated it again. It's still a work in progress. Please let me know what you think, I can revert the changes to the UI, but I think they look good.
    I added a method to stop the music playing. I recycled the Play All Music button just to show how it works. It's only meant as a demonstration of the working code. I also trapped most of the button conflicts, like clicking light on while the music is playing causing an error, trying to play a second playlist at the same time, etc... I think I broke adding songs to the queue, but I will fix it. Like I said it's not ready for a pull but I need a second set of eyes on things.

  7. tom enos reporter

    Another thought, wouldn't it save space and bandwith it jquery was downloaded from cdn? Just a thought

  8. tom enos reporter

    Also do you want all command line scripts and sms code removed that is not needed (which is most of it)? I would leave the sms code in, you may not use it but the users will. Or change it to web voting, have them vote online. Maybe a served guest page if not from a set ip or maybe a hashtag from the owners twitter followers.

  9. tom enos reporter

    @stephen_burning your repo is not inaccessible, did something happen? Please let me know. I would still like to collaborate on your fork with you. If you wish me to stop then I will do so. With your permission I would like to continue.

  10. Log in to comment