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 796359 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Re: foo_httpcontrol

Reply #1100
the defauld is a cute one.. but don't like white, so have changed colors..

looks like this

have changed the directory from /default to /MEOW
have changed the files:
http://marderchen.de/wusel/config <-config file
http://marderchen.de/wusel/foo_httpcontrol_controls_tpl.html <-control html repost caused wrong file link =^.^=
http://marderchen.de/wusel/foo_httpcontrol_browser_tpl.html <- browse html
MEOW have fun! =^.^=


Re: foo_httpcontrol

Reply #1101
I'm having trouble with PlayingCommand... I think.
I have a "Run Command" which works fine on the command line, but I can't seem to make it work through foo_httpcontrol.
It's fairly esoteric (although essential to my workflow): adding the current playing track to a specific playlist.

The full syntax should be like:
Code: [Select]
http://localhost:8888/default/?cmd=PlayingCommand&param1=Edit%20Other%2FAdd%20to%20Playlist%2FMyPlaylist
(assuming I'm adding the track to a playlist called My Playlist).
The equivalent commandline command does work:
Code: [Select]
foobar2000.exe /runcmd-playing="Edit Other/Add to Playlist/MyPlaylist"

For the http version I've urlencoded the spaces and slashes, so I feel it ought to work. Any suggestions?

Re: foo_httpcontrol - Status isPlaying

Reply #1102
How do I determine a sound is playing?



Re: foo_httpcontrol

Reply #1104
Still having trouble with the PlayingCommand above. The Console says simply:
Quote
foo_httpcontrol error: command PlayingCommand failed

As a really simple (amusing) check, running:
Code: [Select]
http://localhost:8888/default/?cmd=PlayingCommand&param1=Copy
actually results in the track being copied to my Windows clipboard! So "PlayingCommand" as such works.

But with that slightly deeper menu command above, it errors out without any suggestion as to why.
I've tried no urlencoding, selected urlencoding, wrapping the command in double quotes... but no dice.

Any suggestions? Bueller?

Re: foo_httpcontrol

Reply #1105
Dear all

I've been using the Android App Foobar2000 controller PRO (newest version  0.9.4.0a) for 2 years now. I'm having fun with it, however, since recently it shows an error message it has now shown before when closing the app:

"Last custom version of HTTP Control is needed"

I've already downloaded the most recent version 0.97.17 from Hydrogenaudio:
https://hydrogenaud.io/index.php/topic,62218.0.html

and saved it to the following folder:
C:\Users\User\AppData\Roaming\foobar2000\user-components\foo_httpcontrol

How can I get rid of this error message and again take control of Foobar (closing, restart etc. the programme)? Many thanks for your help!



Re: foo_httpcontrol

Reply #1106
"Last custom version of HTTP Control is needed"

This is the key... It requires a *custom* version of this component. Google the app, or have a look somewhere in the help screens I think (I don't have it in front of me right now).

Re: foo_httpcontrol

Reply #1107
Thanks for your answer. I already did google for a custom version, but did not find any such version of the component.

Does that mean that with the standard component (version 0.97.17 from Hydrogenaudio) it does not work? It did so earlier...

Re: foo_httpcontrol

Reply #1108
Does that mean that with the standard component (version 0.97.17 from Hydrogenaudio) it does not work? It did so earlier...

On the one hand, you can find their site at: http://foobar2000controller.blogspot.com

But on the other hand, what you're seeing is just a notification about performing an action upon closing the application. The app itself should be working fine other than this message, yes?
Just tap the box next to "Don't ask again" and you won't get that warning again!

Re: foo_httpcontrol

Reply #1109
Thanks for the link to the blogspot. So far I have not found another version other then the "official" 0.97.17 (previously, with the official version it was possible to close Foobar).

True, appart from this message, the app performs just fine. I had some crash issues with the previous version 0.97.15, but it might have had to to with an incompability with Windows 10.

Hoping that controlling Foobar will be able again with the App (e.g. closing it etc.). But it's at least no major issue as it's no malfunction. Guess I will tick the box "don't ask again".

Re: foo_httpcontrol

Reply #1110
did you resolved this ?

Re: foo_httpcontrol

Reply #1111
solved

Re: foo_httpcontrol

Reply #1112
I can't seem to get my PC detected on my android device, media servers just shows blank. Even adding my IP manually still doesn't get it to connect. The instructions link doesn't work anymore.

Re: foo_httpcontrol

Reply #1113
savas, try to disable your firewall. Mine @ nod32 blocked this connection, and when i turned firewall off, my android device found the pc immediately.

Re: foo_httpcontrol

Reply #1114
For those who have found it starting to cause crashes/come up as a warning for frequent crashing in the Online Troubleshooter in FB2k recently when running an older version, and also found the developers bitbucket to be down/inaccessible, i've manage to source v0.97.17 via Archive.org's wayback machine. See link below.

Many thanks for a great plugin that i've enjoyed with the android app for many years!

http://web.archive.org/web/20200708152552/https://bitbucket.org/oblikoamorale/foo_httpcontrol/downloads/

Re: foo_httpcontrol

Reply #1115
I'm working on updating the ajquery template to make it Spider Monkey compatible, by adding new buttons to call the 9 menu entries.

It's meant to be used along Playlist Tools (although it will work for anyone). The current implementation allows to configure on the fly the 9 menus, associating them to either any menu entry of Playlist Tools, to some pre-defined examples or an external script.
The menus show which 'tool' is associated to with SMP numbered entry, as a workaround for the current SMP limitation of entries being just named 1-9 without any more info... All that part works great, and I have managed to edit the ajquery template and add the 9 associated buttons.

X

X

Only limitation right now is I have no idea about how to retrieve the menu names via http control, to label the buttons tooltips with them (instead of using 1-9). Have checked all the documentation, and there is no command or macro which allows to retrieve arbitrary data from the server. Does someone have any idea about how to do it?

(My idea was to save the menu names via SMP as json on the profile folder, the template should be able to retrieve that json file and read it, but I'm open to any other solution)


Re: foo_httpcontrol

Reply #1116
Nevermind... stupid me. Obviously the server loads the files from the pc not the remote point, so all is there from the start.

X

Well, then SMP integration is fully done with descriptions of what those menus do -according to what you set within foobar- via Playlist Tools.
Wil share the new template on the next release of Playlist Tools.

Re: foo_httpcontrol

Reply #1117
Now I'm stuck at another point, with no idea about what the problem is:

On js:
Code: [Select]
			// const data = JSON.stringify([smp.dsp[$(this).prop('selectedIndex')]]);
const data = JSON.stringify("hi");
console.log(data);
$.ajax({
type: 'POST',
dataType : 'json',
async: true,
url: 'php/save.php',
data: {data},
success: function () {alert("Thanks!"); },
failure: function() {alert("Error!");}
});

php/save.php
Code: [Select]
<?php
$json = $_GET['data'];
if (json_decode($json) != null) {
$file = fopen('toexecute.json','w+');
fwrite($file, $json);
fclose($file);
} else {
// user has posted invalid JSON, handle the error
}
?>

I got this error:
X

The aim is to send the currently selected item from a list to the server, and save it on a json file. (so SMP may load it at a latter point and do something: currently for device selection, preset selection and some menu selection)

X

PD: if someone wants to check the files and test it, have no problems sharing them to solve it asap.


Re: foo_httpcontrol

Reply #1119
A string is not valid JSON.
The thing is I tried with real json data and it didn't worked. The one at comment.
Which is something like this:
Code: [Select]
{
"active": false,
"name": "Converter_DSP"
}
...

So..
Code: [Select]
const data = JSON.stringify([{active: false, name: "Converter_DSP"}]);

Gives the same error.


Re: foo_httpcontrol

Reply #1121
I know nowt about php/jquery or anything browser related. All I can do is point out the obvious like.... the mismatch of ajax POST data and the php script reading GET data is not doing you any favours.
That was a typo while testing other things, yep. Is get on both files. Anyway it still doesn't work.

Removing dataType : 'json', did the trick, I think. It seems it refers to the data type of the response, not the data passed...
but I still get nothing saved into the file (Now without errors).

Maybe someone discovers what's wrong here. I'm totally lost with php and browser related things

File (extract on 'foobar_profile_folder\foo_httpcontrol_data\' and run the server on any browser):
X


Re: foo_httpcontrol

Reply #1123
Spit out some output from your php script and use the dev tools in your browser to see it.
Already tried it, and it outputs nothing. Zero. Tried echo, print, echo with console js statements,...

It's like it does nothing. Although removing the file throws an error, so at least it tries to request a response.

Adding this to the js file:
Code: [Select]
		$(document).ajaxComplete(function(event, XMLHttpRequest, settings) {
console.log(XMLHttpRequest.responseText);
console.log(XMLHttpRequest.statusText);
});

Outputs this to console:
Quote

   $json = $_GET["data"];

   $file = fopen("toexecute.json", "x")

   fwrite($file, $json);

   fclose($file);

   echo 'saved';

?> ajquery.js:1925:12
OK ajquery.js:1926:12

Well, not sure if it makes any sense.. but maybe http control doesn't support php? Since its serverside and the response is just the code.
In that case I'm totally lost about how to save a file to communicate arbitrary text in some way to foobar.


 
SimplePortal 1.0.0 RC1 © 2008-2021