Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: foo_httpcontrol (Read 796727 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Re: foo_httpcontrol

Reply #1125
 ::)  Having in mind the documentation and the component has not been updated since years, and there is no words about what's supported on the server at all, and I clearly indicated had no idea what was going on... yep. It was an open question, since maybe someone knew the answers.

I would appreciate if someone comes with an idea to create a f*** txt file on the server in some way (which can be latter read via SMP). Or a callback in SMP to the Parse command of httpcontrol. Or whatever.

Like that's the only thing missing to create a fu*** online controller which can do anything and it's not limited to playback controls.


Re: foo_httpcontrol

Reply #1127
Calm down dear. And writing text files on the server is an insane feature request far beyond the scope of what this component is meant for. If you really need that, I suggest running your own server with nodejs / python / deno/ whatever.
It's not that "I really need that." It's just a really simple thing which could work if at least one of these things would be possible:
- HTTP control had a way to communicate arbitrary text to foobar, more than an useless Parse command which does nothing right now.
- HTTP control was compatible with on_notify for SMP /JSP usage.
- Foobar had a command line action capable of writing things to a playlist file without user input.
- SMP had a main menu command system allowing arbitrary function calls + args.
- SMP was integrated within foobar command line + args.
- etc.

Any of those would do, or would be hackable.

Running your own server with nodjs means completely replacing http control which is clearly out of question.

It's like all the pieces are there, and all of them seem to be created to forbid arbitrary communication between components.

Re: foo_httpcontrol

Reply #1128
::)  Having in mind the documentation and the component has not been updated since years, and there is no words about what's supported on the server at all, and I clearly indicated had no idea what was going on... yep. It was an open question, since maybe someone knew the answers.
foo_httpcontrol is essentially a "dumb" webserver. It can serve files, and that's it*. It can serve your .php files too obviously, but there's no PHP backend, so they won't be interpreted in any way.... you'll just get the <?php crap along with all the rest. That's why all templates are .js based as the browser has to do all the work. As you've concluded there doesn't seem to be any way for the webserver to write files on the host. You'll have to rethink that requirement. Or make the user manually create that file themselves.

*It can also obviously handle some very basic queries to return playlist/song image data, but that's really an extra service running, and I wouldn't consider it part of the webserver.

 

Re: foo_httpcontrol

Reply #1129
The use case was setting the Output device and the Preset via online controller.
SMP would read a txt file with the selected device/preset, and set them after calling a custom SMP main menu.

Having a txt file as intermediate file allowed to pass arbitrary argument, since there is no other way to do it. If the user has to write the txt file... then there is no point for the  "online controller" part at all. The problem is not only the server component,  but all the ecosystem thought to be closed in many ways which clearly complicates easy tasks.

As workaround I'm adding files to a dummy playlist (CmdLine + foobar2000.exe /add), whose filenames are the command names selected from dropdown lists XD. Then I call a SMP main menu (CmdLine + /X) which parses the commands and set the preset/device according to the dummy filenames, then deletes the playlist and switches to the previous one. It's ridiculous to do this... but works.

X

Re: foo_httpcontrol

Reply #1130
This is a pre-release version of the new ajquery-xxx controller.

Spoiler (click to show/hide)

Code: [Select]
*** Updates over old ajquery controller

This is a non-extensive list of main changes done to the controller:
- Tile, artist, album tags are cut at display to try to maintain one track per row.
- General tweaks to UI placement, space usage and fonts (larger).
- Rating is now shown on the playlist list for every item (stars).
- Themes: dark/light. (new themes may be easily added editing the html)
- Default 20 items per page.
- Artwork: non-playing and non-artwork found images are now animations.
- Extended controls reworked: rating and Custom contextual menu Buttons.
- Playlist Tools: Spider Monkey Menus, Output Devide & DSP selection.
- Integration with Spider Monkey Panel and Playlist Tools (SMP script).
- Dynamic icons, menus, tooltips and component checking via SMP.
- Toogable log panel (usually used to display console log from foobar).

Full changelog and functionality explanations on readme.

Default theme is now dark theme, use '_switchTheme.bat' to change it to light if preferred. Final release will have dark background on artwork gif to match the theme.

By default, context menus buttons are set with pre-defined examples.

Playlist Tools buttons are not. SMP menus should work as long as you have them set on foobar and fill the default json with your own values. Output/dsp changing too as long as you met the requirements and fill the default json with your own values. (use the defaults folder as examples)

The advanced Playlist Tools integration  (automatically filling device, dsp, menu list, icons, etc. and configurable menus) will be missing until I release the next version of Playlist Tools.


Re: foo_httpcontrol

Reply #1131
Just added the dark theme gif version, no more changes. At some point I will try to make it a transparent gif, so it works with any background. Will see if it's possible.

X

X

Re: foo_httpcontrol

Reply #1132
Have updated the repository of Playlist Tools with all the changes required to use the new controller (previous reply) with full working features.
.
(it's recommended to also download the latest files from the rest of my scripts, since I have changed all with major changes)
Changelog is up to date on github. Check unreleased.

 
SimplePortal 1.0.0 RC1 © 2008-2021