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 944265 times) previous topic - next topic
0 Members and 2 Guests are viewing this topic.

foo_httpcontrol

Reply #750
Hi
Thanks oblikoamorale for update
I use it every day !
I notice with ajquery that remove playlist command delete first playlist tab instead of current ?

foo_httpcontrol

Reply #751
huh, indeed  thanks for reporting, will fix later.

foo_httpcontrol

Reply #752
Hey,

don't want to waste too much of your time, since I just started using foobar and I'm not sure, whether I understood its design sufficiently. So, basically, I'd like two things to be possible:

  • I'd like to remotely shutdown the computer foobar is running on via the web interface. I'm aware there are other components that do the job, but these can't be controlled remotely, and there's no way for me to make foo_httpcontrol work with them, is there?
  • I'd like to use lastfmproxy to listen to last.fm radio stations. lastfmproxy should only be started on demand, since it messes the normal foobar-scrobbling up when running all the time. Related to that - and maybe more like a general foobar issue - playback stops after every other song. lastfmproxy basically does all the handshake-with-last.fm thing and provides a stream hidden a pseudo mp3 file / referenced by a m3u file, that changes its title according to what's played. I have to admit I didn't try "Repeat track"-option yet, but that seems more like a dirty workaround than a sustainable solution to me.


I guess, both issues could be tackled introducing some kind of pass-through feature to use foo_run and/or foo_runcmd via httpcontrol, or are there serious security issues I missed with that?
Or is there even an easier way I didn't think or know of yet?

Totally love you guys' work, httpcontrol with vakata2-theme replaced VLC with its standard http_interface and I'm nearly totally happy with that.

Regards

foo_httpcontrol

Reply #753
I guess, both issues could be tackled introducing some kind of pass-through feature to use foo_run and/or foo_runcmd via httpcontrol, or are there serious security issues I missed with that?

iirc somewhere up the thread I (and Kev0, I think) posted an example of running certain external program from this component using foo_run and foo_runcmd combo, but I dont' know whether this 'hacky' approach works in fb2k 1.0. I guess you have to try and tell us results of your investigation. if it succeeds, you can add shutdown button to remote control template in a few minutes.

foo_httpcontrol

Reply #754
does anybody have experience with a second portable foobar install and the iPhone using httpcontrol?

I´m having problems in this case. Although (my) template is accessible by any other PC in the network, for the iPhone, i do get a connection, the "site" is displayed but it´s messed up and seems that Ajax isn´t executed. I have also tried to link each of both installations to a different port, but no luck (the I.P. is of course the same).

P.S. of course only one of the two installations is running in these cases

foo_httpcontrol

Reply #755
Well, I got it working for me, but the more I get into this stuff, the more it seems like a big bodge adventure. I added a Service with foo_run and call that via the ?cmd=CmdLine option you introduced ages ago, but never documented in your Appendix #2.

Problem with that is you can't introduce it to others with just adding a button to the interface or something, because you'll always need to add that Service (with a preset name) manually, right?

I'm not too much satisfied.. :/

Edit: Just to be a bit more precise: Reading through the thread I found you saying you discovered the beauty in foobar design. Thus, I guess I just haven't got into the matter sufficiently to recognize that as well, but what I've seen so far, it can be a pain in the a**. foobar documentation says there should be a parameter /playing_command and so on, but there is not (anymore). So (as I've learned) foo_run was introduced. Is it actually you can only add Services to the context menu, that really is a pain the a** to be adressed by command line like inputs again? I read something about working with Hotkeys or something, but I didn't find out, how to actually do that.

Thus, you're mostly busy finding a way to invoke an action, and doing that, you stumble upon the next thing, you need a workaround for, and so on and so forth.

Overall, there (to me) seems to be no general concept for components and foobar on how to communicate oder make life easy at all. Am I right with that, or is it really I need to see the inner beauty in order to be happy?

foo_httpcontrol

Reply #756
I've never really tried to understand what is going on with all that working/nonworking command line parameters, foo_run and the similar yada-yada due to lack of need and interest, so I can't really comment on this.
also I want to mention that I don't want to introduce any features which go beyond the scope of the component. if you are really up to it, your best bet in the case might be forking your own branch with features you need (and new commands are really very simple to add).

foo_httpcontrol

Reply #757

yes, run services adds services to the context menu, and yes, if you want to execute them with httpcontrol you must use a commandline like pattern (using runcmd), but it´s really easy:

so e.g. you have already added a run service called "ShutDown" you invoke it with httpcontrol by
sending the command 'CmdLine' with the parameter ' /runcmd-playlist="Run service/ShutDown"'

any other context menu entry is executed with a parameter starting with ' /runcmd-playlist=...

and it´s not really "hacky" to my opinion 

foo_httpcontrol

Reply #758
I´m having problems in this case. Although (my) template is accessible by any other PC in the network, for the iPhone, i do get a connection, the "site" is displayed but it´s messed up and seems that Ajax isn´t executed. I have also tried to link each of both installations to a different port, but no luck (the I.P. is of course the same).

you have two options: try another iphone template (perhaps the one you are using is not quite compatible with iphone browser), or try previous version of the component as I changed something in networking code of 0.96.6 which may broke some things.

foo_httpcontrol

Reply #759
oblikoamorale, this is more than strange.

The situation was: I copied a template folder (named let´s say 'old'), which had worked without problems on a standard install to the foo_http_control_data folder of a portable install.

I renamed it let´s say 'new' and this didn´t work (of course I changed the path in safari iPhone to 'new'). This is what I described before. I tried 0.9.4 and 0.9.6 no luck.

Today I tracked down the problem and at the end I found, it works if:

- folder 'old' is present
- the files index.html, state.json and config are left in this 'old' folder!!

  This is more than strange, because in all of my scripts I use of course relative paths, and the config file afaik only describes settings for the template in the SAME folder, true?

So how can it be that it works only if files are present from some completely other folder???

Oblikoamorale, please help me 


P.S.: On the other hand, if I delete the file index.html in the 'new' folder, I get some Not found error as expected.
Same for the config file
Is it some kind of cache problem, if file names exist more than once?

P.P.S: same for another template by L4ntOm, it loads and after some action Error loading (but this uses commands in the adress, so maybe not comparable?)

foo_httpcontrol

Reply #760
you can't just rename templates around and expect them to work, as name is hardcoded within their javascript and html files. thus you have to replace all 'old' name references within template data to make template work in a 'new' folder.

foo_httpcontrol

Reply #761
Hey,

please don't get me wrong, the component is great as it is, I was just wondering whether I got something wrong concerning foobar-design, but after all, I guess I did not.

Remote Shutdown now works fine for me the way I posted, too bad this won't become an offical feature, since it - imo - would be a nice thing to have in a remote control.

Thanks so far, I'll follow the thread for news. =)

foo_httpcontrol

Reply #762
you can't just rename templates around and expect them to work, as name is hardcoded within their javascript and html files. thus you have to replace all 'old' name references within template data to make template work in a 'new' folder.


huh, I had checked all references, but actually one line was left, that pointed to the old folder.  Thanks for pointing me to the right direction.

foo_httpcontrol

Reply #763
The latest version (0.96.7) keeps causing foobar2000 to crash almost as soon as foobar2000 is loaded, give or take 10 seconds. I can provide dumps if necessary.

foo_httpcontrol

Reply #764
interesting. I wouldn't mind seeing those minidumps.

EDIT: no dumps are needed anymore thanks to Peter, problem is understood and will be fixed tonight.

foo_httpcontrol

Reply #765
Thanks for this component, finally I can stop using remote desktop.

Previously tested ajquery 0.58, now I uploaded versions 0.96.8 with ajquery 0.60 but the QUERY button crashes the interface. The response I get is:
An AJAX error occured.
Possible reasons:
    * JSON parser got stuck on erroneous data;
    * borken connection;
    * god knows what else.
Restart template or think of something else.



Inside the box an error that starts with:

settings.url: /ajquery/?cmd=QueryRetrace&param1=&param3=js/library.json

XMLHttpRequest.responseText:
{
"queryInfo":   [],
"query":   [ "

followed by the list of artist... and closed by
}
XMLHttpRequest.statusText: OK

foo_httpcontrol

Reply #766
I need whole contents of errorbox to fix the problem. upload it to pastebin or somewhere else.

EDIT: nevermind

foo_httpcontrol

Reply #767
The problem I reported before is fixed on httpcontrol 0.96.9 / ajquery 0.61.
Thank you!

httpcontrol is excellent and I love the ajquery interface, outstanding.

foo_httpcontrol

Reply #768
This component may be interresting for iPhone/iPod Touch-users, wanting remote control functionality similar to this.
Can't wait for a HD-AAC encoder :P

foo_httpcontrol

Reply #769
thanks for info unrelated to the topic. check first post by the way.

foo_httpcontrol

Reply #770
Oh, didn't see that one. Sorry.

Your component is fantastic, but a little laggy on a low-power handheld, so I though a few maybe was better off using a dedicated app for it, and there's not much mention of it on this forum.
Can't wait for a HD-AAC encoder :P

foo_httpcontrol

Reply #771
I've had a stab at making the modified version of the LxOfIth template scalable to different screen sizes. Its still a work in progress, not everything is working quite as it should, but I'm limited in what I can test it with, so before I spend any more time on it wondered if anyone might give it a try on different sized mobile devices.


Theres probably a better way of doing doing it, but thought I'd have a go anyway.

scalable_test

!WORK IN PROGRESS!



Did anyone bother looking at this? I haven't had chance to look at it again since.

I should have a better idea of how it will work when I upgrade my phone in about a month.

foo_httpcontrol

Reply #772
Just created a small theme of my own, and decided to share ... maybe I missed some stuff from the API - if anyone likes it I will continue working on it. Should work in any modern browser.
http://vakata.com/foo/screen1.png
http://vakata.com/foo/screen2.png

The theme itself:
vakata2.rar (109 KB)

Cheers and thanks for the hard work creating this plugin - really changed my life
Ivan

Vakata ? Developer  ??????? ?? ??????? ? ?? ???????? ??????.
vakata2 / jquery ????????? ???????? ?  Opera 10.51, Minefield 3.7, Google Chrome.


 

foo_httpcontrol

Reply #773
I've had a stab at making the modified version of the LxOfIth template scalable to different screen sizes. Its still a work in progress, not everything is working quite as it should, but I'm limited in what I can test it with, so before I spend any more time on it wondered if anyone might give it a try on different sized mobile devices.


Theres probably a better way of doing doing it, but thought I'd have a go anyway.

scalable_test

!WORK IN PROGRESS!



Did anyone bother looking at this? I haven't had chance to look at it again since.

I should have a better idea of how it will work when I upgrade my phone in about a month.


Kevo - I have been meaning to test this for a while, but I just got around to it today.  Here are my results on my Motorola Droid:

All of the buttons seem to work just fine. 

As far as the scaling:  Using both the default browser and Dolphin Browser, it is close vertically, but may be a little large... it seem to base the size on the screen size rather than the browser window (so it does not take the phones status bar on the top of the screen into consideration).  Also, the cover art it too wide... it seems to only show 3/4 of the cover with the right side being truncated. 

When you rotate the phone into landscape mode, it actually scales very nicely and looks great...the only problem here again is that it is just a little too large top to bottom.

Another issue is that if I keep the browser status bar visible in Dolphin (as that is an option), that is not taken into consideration when scaling at all, so the screen becomes much too large (the bottom buttons get cut off by half). 

One last thing is the border around the album art...  this is just aesthetic, but I like it better without the border and with the reflection.

If you have any questions for me, or want me to do any other testing, please feel free to PM me.

Thanks for all your work on these templates.

foo_httpcontrol

Reply #774
I'm writing just to say THANK YOU SO MUCH, oblikoamorale!
After some time trying to understand what was wrong with my setup, and right before posting to ask for help, the whole firewall thing came to mind, and bingo! It's working much better than I expected.
Amazing work, man!