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

foo_httpcontrol

Reply #275
After playing with the existing interfaces I noticed one big problem with all of them: they use synchronous requests, making the updates require screen updates. So I wrote this AJAX powered webui!

Due to the way this plugin is designed you'll have to open http://localhost:8888/index.html instead of just http://localhost:8888/ in your browser (the "index.html" part is important, else you'll just get some text) but besides that it works just fine.



Download: http://www.2shared.com/file/3717567/6947f4...ntrol_data.html
Mirror: http://www.uploading.com/files/9XPZ4C6M/fo...l_data.zip.html

Note: Doesn't work with IE, tested in Opera 9.5 and Firefox 3


Now this is awesome....  Perfectly simple and clean.  I dont need playlists.
Would anyone know a way to do two things to this?

1) Resize for iPhone
2) Add the Foobar Playback options of "Random", "Default" etc.

foo_httpcontrol

Reply #276
I'm with Auric's config for httpcontrol but none of my songs/playlists is shown on my ipod touch



Do i have to specify the folder where my music is and if i have to can you please tell me where should i do this. Thanks!

p.s. can someone give a link for the last version of httpcontrol because the link in the first post is dead.

foo_httpcontrol

Reply #277
bump


foo_httpcontrol

Reply #279
If playlist items are missing it may be because you forgot to do this:

- The "playlist row" field in the HTTP Control preferences must be set to the following, or some variation thereof:
Code: [Select]
{ "artist": "$ifgreater($len(%artist%),29,$cut(%artist%,29)'...',%artist%)", "album": "$ifgreater($len(%album%),29,$cut(%album%,29)'...',%album%)", "number": "%tracknumber%", "track": "$ifgreater($len($replace(%title%,",)),28,$cut($replace(%title%,",),28)'...',$replace(%title%,",))", "len": "%length%" }


Always read instructions when someone gives you something here.

Also I fixed the code so you get scrollbars.
Download updated style.css with scrollbars: http://saivert.xerc.biz/foobar2000/iPhone_webui/style.css

This is only for the iPhone WebUI theme by Auric

foo_httpcontrol

Reply #280
Uh I'm curious - does anyone have a mirror?

The host can't be found and there doesn't seem to be one in the thread.

foo_httpcontrol

Reply #281
silly me, the link has been broken during last edit. fixed now.

foo_httpcontrol

Reply #282
Salut

Thanks guys for your great work.

soulruins: got yours to work fine except that the volume control is very coarse - goes from silence to loud then very loud. Is there an easy way to decrease the step size? I tried in the fb2k advanced settings but it made no difference. Also the browser text size is miniscule - can this be modded?

auric: any updates? Any intention to add a volume control and queue directory? Screen is a bit slow on the iphone, but I was messing with yours and soulruins. I'll try again tomorrow (it often fixes problems ;-).

Thanks also of course to oblikoamorale.

Regards

Vernon

foo_httpcontrol

Reply #283
For anyone using a phone/bb etc to access this (not thru wifi) I could use some help.

It works fine from other computers in my wireless network, but I cannot gain access from my bb (IP outside of my wireless network).

Any suggestions would be appreciated.


foo_httpcontrol

Reply #284
here is the message i get every time in. firefox 3.0.6: failed to read file: C:\Users\Ryan\Programs\Foobar2000\components\foo_httpcontrol_data\foo_httpcontrol_controls_tpl.html, error: 3.

i cant seem to get this plugin to work.  any ideas?

foo_httpcontrol

Reply #285
judging by the error code, path C:\Users\Ryan\Programs\Foobar2000\components\foo_httpcontrol_data\ doesn't exist
do you have foobar2000 installed to your user directory?


foo_httpcontrol

Reply #287
Had a flick through the thread and got this working well from my G1. Thanks alot.

Wondering what code I would need to call to make a button to remove the current playing track from the playlist and skip to next track? If thats possible?

foo_httpcontrol

Reply #288
Wondering what code I would need to call to make a button to remove the current playing track from the playlist and skip to next track? If thats possible?
by design you cannot execute more than one command at once, and there is no builtin macro representing the currently playing item index.

foo_httpcontrol

Reply #289
Wondering what code I would need to call to make a button to remove the current playing track from the playlist and skip to next track? If thats possible?
by design you cannot execute more than one command at once, and there is no builtin macro representing the currently playing item index.


Damn . And the skip to next track thing wasnt important, just an after thought. But nevermind, my http remote is still ace. Cheers.

Just a thought, is there anyway I could implement the effects of the following into the action of a button or two, on a template without a displayed playlist? I could then just remove the previous played track if I wanted to.

Quote
v0.63 05 Apr 2008
    add: clickable path in browser;
    add: previously played track is highlighted in playlist;
    fix: list of playlists wasn't always updated;
    fix: additional safety checks and fixes;


and

Quote
v0.68 12 May 2008
        add: playback enqueue/dequeue (LIFO) control, q/w hotkeys;
        add: playlist focus control, shift hotkey;
        add: playlist entry remove control, ctrl hotkey;
        add: configurable page autorefresh;
        fix: compacted control template JS;
        fix: invisible glitches;


I'm trying to keep my main control screen fairly clear (such as using album art as the link to the browser page), so dont want a full playlist and playlist controls on it, but I'm no html expert and cant seem to get a seperate playlist page to work, so hopeful for some basic buttons on my main control page.


Oh, and I had the same problem as bronc and analbeard with Aurics iphone skin, even after checking and double checking the playlist config details. Unlikley, but is it because I'm not using an iPhone and it has some specific iPhone code, maybe the CSS?

foo_httpcontrol

Reply #290
Just a thought, is there anyway I could implement the effects of the following into the action of a button or two, on a template without a displayed playlist? I could then just remove the previous played track if I wanted to.

d'oh. sorry! removing currently playing track (in case it is from the currently chosen playlist) is obviously possible right now with something like this:
Code: [Select]
<script language="JavaScript" type="text/javascript">
<!--
if ([IS_PLAYING])
{
    trk=[TRACK_NUM];trk-=1;
    document.write('<a href="/?cmd=Del&param1='+trk+'">Remove currently playing track</a>');
}
//--></script>

and of course you don't need playlist for this to work.

Oh, and I had the same problem as bronc and analbeard with Aurics iphone skin, even after checking and double checking the playlist config details. Unlikley, but is it because I'm not using an iPhone and it has some specific iPhone code, maybe the CSS?

I looked into the problem and it seems that you have to restart foobar2000 for new playlist row formatting string to be applied. after that Auric's templates works just fine. I'll fix this obscure bug in the next version.

foo_httpcontrol

Reply #291
I have been following this thread for quite some time. Is there a keyword search function for the playlist and directories yet? Or is this not possible? I'm looking for something similar to this

 

foo_httpcontrol

Reply #292
judging by the error code, path C:\Users\Ryan\Programs\Foobar2000\components\foo_httpcontrol_data\ doesn't exist
do you have foobar2000 installed to your user directory?



yeah i do.  do i need to reinstall in program files for this to work??

foo_httpcontrol

Reply #293
I have been following this thread for quite some time. Is there a keyword search function for the playlist and directories yet? Or is this not possible? I'm looking for something similar to this
nope, nothing like that. only simple ability to query the media library is available.

judging by the error code, path C:\Users\Ryan\Programs\Foobar2000\components\foo_httpcontrol_data\ doesn't exist
do you have foobar2000 installed to your user directory?



yeah i do.  do i need to reinstall in program files for this to work??
first of all you have to make sure C:\Users\Ryan\Programs\Foobar2000\components\foo_httpcontrol_data\ is created and component data files are extracted exactly into it.

foo_httpcontrol

Reply #294
Great stuff, you're ace.

foo_httpcontrol

Reply #295
Right, I've gone for sIIhZt/larskl AJAX interface as it seems to work the best from my G1, (its great cheers sIIhZt).

I've modified the layout a little to best suite me, theres just a couple of things I want to add, but the javascript is a stretch to far for what I know, without getting a little help. (maybe the answer to my question is for me to have a read up on javascript/AJAX!)

This is what I've got currently;


I want to add something similar to the playlist selector and playback order selector from the default layout, with a button to do this (**) between them and put it below the volume bar/text.
(**)
d'oh. sorry! removing currently playing track (in case it is from the currently chosen playlist) is obviously possible right now with something like this:
Code: [Select]
<script language="JavaScript" type="text/javascript">
<!--
if ([IS_PLAYING])
{
    trk=[TRACK_NUM];trk-=1;
    document.write('<a href="/?cmd=Del&param1='+trk+'">Remove currently playing track</a>');
}
//--></script>

and of course you don't need playlist for this to work.



I'm usually quite good at bodging things without needing to learn the language throughout (by copypastedelete), but the problem I'm having, maybe with it being ajax?, is I'm not quite sure new information/commands I need to be adding, and where I need to be putting them  - index.html, controls*.html or the javascript file. It seems if I add anything to the controls*.html file (e.g. [PLAYLISTS_OPTION]) it stops the webUI from getting any information - %artist% track, etc.

Not looking for anyone to go out of their way and do it for me, but some pointers on how to go about it, or somewhere that might explain it a little better would be appreciated.


.......Would it be easier/possible to put the selectors and "remove track" button I want on the browser layout, rather than the main index ajax page?

foo_httpcontrol

Reply #296
Not looking for anyone to go out of their way and do it for me, but some pointers on how to go about it, or somewhere that might explain it a little better would be appreciated.
the working principle of Auric's AJAX interface is based on retrieving JS-formatted object from foo_httpcontrol, which describes the current state of the player, and then building the interface outlook based on received data.
format of the object is defined in foo_httpcontrol_controls_tpl.html. after eval()-ling received data, you can easily access object fields within your JS and do whatever you want.
that's very basic info, but it should point you towards the right direction. for implementing playlist switcher you need to include [PLAYLISTS_JS] and [PLAYLIST_ACTIVE] into the state object. check readme.txt for details on these macros.

foo_httpcontrol

Reply #297
the working principle of Auric's AJAX interface is based on retrieving JS-formatted object from foo_httpcontrol, which describes the current state of the player, and then building the interface outlook based on received data.
format of the object is defined in foo_httpcontrol_controls_tpl.html. after eval()-ling received data, you can easily access object fields within your JS and do whatever you want.
that's very basic info, but it should point you towards the right direction. for implementing playlist switcher you need to include [PLAYLISTS_JS] and [PLAYLIST_ACTIVE] into the state object. check readme.txt for details on these macros.


Are you suggesting I would be better off using Aurics JS file (instead of the one by sIIhZt/larskl) as my backbone for getting the information from fb2k, and then working the html interface ontop of that? I'm hoping the bulk of the html layout I already have set up could be used with the other JS file besides some renaming of the commands/headings called, etc?

Problem is Aurics template doesnt seem to load on my G1, whereas sIIhZt's (and my fiddled version of it) does. Though I dont know whether this is is down to something in Auric's html/css or in the JS file, as yet. It just seems to load at the "#_playlist" section of the page like the picture posted by bronc, and wont go to the "#_nowPlaying" part - but at the same time it displays ok through my PC browser.

I'm guessing the structure in the foo_httpcontrol_controls_tpl.html is - "substituted object name for use in the JS" : [OBJECT INFO PULLED FROM FOO_HTTPCONTROL], and that the subsituted name isnt predefined anywhere but here, I could call them anything? And controls_tpl.html is just a list of all of the headings you need to pull from foo_httpcontrol to get the information you need, the order listed isnt important?

Is it possible to make a drop down selection (default, random, shuffle etc) have its effect without redrawing the whole page using the ajax? Sorry for the newbie questions  .

foo_httpcontrol

Reply #298
Are you suggesting I would be better off using Aurics JS file (instead of the one by sIIhZt/larskl) as my backbone for getting the information from fb2k, and then working the html interface ontop of that? I'm hoping the bulk of the html layout I already have set up could be used with the other JS file besides some renaming of the commands/headings called, etc?
no, that wasn't my point. I don't know anything about sIIhZt/larskl work, the basic principle of work is the same in all asynchronious interfaces: you pull the data behind the scene.

I'm guessing the structure in the foo_httpcontrol_controls_tpl.html is - "substituted object name for use in the JS" : [OBJECT INFO PULLED FROM FOO_HTTPCONTROL], and that the subsituted name isnt predefined anywhere but here, I could call them anything? And controls_tpl.html is just a list of all of the headings you need to pull from foo_httpcontrol to get the information you need, the order listed isnt important?
yes, the only predefined things are square bracket rounded macros. some of them (by weird design) are replaced only within foo_httpcontrol_controls_tpl.html, and the other - foo_httpcontrol_browser.html. consult readme.txt for details.

Is it possible to make a drop down selection (default, random, shuffle etc) have its effect without redrawing the whole page.
yes. that's the beauty of asyncroniousness.

foo_httpcontrol

Reply #299
I'm getting a little bit further  , but it seems adding [PLAYBACK_ORDER_OPTION] to my "foo_httpcontrol_controls_tpl.html" kills everything. My guess is its either because some of the playback titles have brackets in their name or because there seems to be no spacing between each playback type when displayed in the browser.
Code: [Select]
"DefaultRepeat (playlist)Repeat (track)RandomShuffle (tracks)Shuffle (albums)Shuffle (folders)"


If that is the problem, is it possible to select playback order by name just using [PLAYBACK_ORDER], for example I give each nuber value its name? In fact, thinking out loud as I type, I dont need all the playback options, a "default <-> random" button should be enough.

<back to work>