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

foo_httpcontrol

Reply #150
I've found the problem. It occurs after setting the playlist's position to 'absolute'. If offsetHeight and scrollTop are accessed before that happens, the problem doesn't occur. However, as these values are only useful after setting the position to 'absolute' it has to be done in that order.

But I've also found a fix. Simply set the position to 'fixed' instead of 'absolute'.

foo_httpcontrol

Reply #151
my appreciation for this curious tour through innard html debris

brief test reveals that IE6.0.2900.5512 doesn't introduce disappearing playlist anymore. playlist won't become scrollable as well, but I guess it's not a big deal.
opera 9.5 and mozilla 2 works fine despite the change.


foo_httpcontrol

Reply #153
Code: [Select]
    v0.76a 02 Jul 2008
        fix: playlist switcher fought with multipage playlist;
        fix: playing track playlist autoscroller;

foo_httpcontrol

Reply #154
This is one of the best plugins for foobar ever! Thx oblikoamorale! The only thing I cant get to work is coverart? Any suggestions? (I have "cover.jpg" files in my albumfolders. How can I actually display them?)

foo_httpcontrol

Reply #155
Using this in the field for 'Album art' in the http_control preferences should do the trick.

$puts(dir,$left(%path%,$strrchr(%path%,\)))$get(dir)folder.jpg|$get(dir)*.jpg

... and using an html template with <img src="[ALBUMART]" alt=""> in it of course.

foo_httpcontrol

Reply #156
Using this in the field for 'Album art' in the http_control preferences should do the trick.

$puts(dir,$left(%path%,$strrchr(%path%,\)))$get(dir)folder.jpg|$get(dir)*.jpg

... and using an html template with <img src="[ALBUMART]" alt=""> in it of course.


Yup, it works now! Thx for the fast reply/help!

foo_httpcontrol

Reply #157
Thank you so much oblikoamorale, foo_httpcontrol is THE answer to controlling foobar on a remote machine, and it is very well done!  You can't believe how happy I am that I found your plugin.

Here are a few ideas I've had to make the UI more intuitive for less technical users:
  • clearer playback buttons
  • grouped controls
  • floating album art display (click to hide/unhide)
  • simple/expert mode, hiding some more advanced features

The playback control buttons are pure ASCII:


Full screenshot:


If you're interested, these are the foo_httpcontrol HTML files:
http://rapidshare.com/files/131110860/foo_...l_data.zip.html

Dear oblikoamorale, there are a few other ideas that I guess can't be done in html:
  • wouldn't a transparent onepixel.gif be a better fallback cover art than a JPG?
  • it would be nice to have a volume control in the same cool way as the track progress bar
  • the File Browser could be displayed in the "controls" screen, alternating with the playlist

The last point is certainly a bit of work, but maybe it's less work than adding more real "Playlist management" to foo_http_control (change order, drag&drop, etc).  For a user who just likes to play entire albums from a directory tree, using foo_http_control might become even easier: they just click "Folder browser", click "Play this folder", and see the "now playing" bar progress through the directory.

The idea is: If the folder browser was appearing underneath the playback controls in the "controls" screen, it could on-and-off replace the playlist in the lower part of the screen, and always show the currently played song in its actual "directory context". The Playlist controls could be replaced with "enqueue folder/subfolder". So, the user could flip back and forth from Playlist to Folders view in a single screen. The %path% variable on the current controls screen could then be permanently replaced with the cool "clickable" path you've done for the browser screen, which would give a nice way to navigate folders right in the controls screen.

Just an idea!

Thanks a lot anyway for this long-awaited plugin!

Best
Ulf

foo_httpcontrol

Reply #158
...I forgot to mention that, in the screenshot I shared, the "expert mode" was obviously turned off.

If turned on, the complete foo_httpcontrol is visible, of course. The user can control it with a little checkbox in the "Display" control group:


foo_httpcontrol

Reply #159
Nice skin, but the listbox is the expert mode doesn't work in Firefox 2. (the one with start, enqueue...) It won't show the available options, and it is positioned half over the stop and play controls. Also is expert mode not remembered. For example when expert mode is visable, hit refresh (upd button) and expert mode is disabled.

foo_httpcontrol

Reply #160
Nice skin, but the listbox is the expert mode doesn't work in Firefox 2. (the one with start, enqueue...) It won't show the available options, and it is positioned half over the stop and play controls. Also is expert mode not remembered. For example when expert mode is visable, hit refresh (upd button) and expert mode is disabled.

Thanks, Tim!  All functionality tested OK on Firefox 3 -- if you can, I recommend the upgrade from FF2: A lot of things improved significantly in FF3.

Nevertheless, here's a version that depends less on CSS2.0, so it should work on a broader range of browsers.  Does this work better for you?


http://rapidshare.com/files/131148724/foo_...l_data.zip.html

BTW, yes, the "expert" mode is flagged just inside the page, not in the URL.  So it gets reset every time the page is reloaded.  It's good to see here that the "expert" settings themselves are persistent! So for instance, when you flip the "Start/Enqueue/..." switch to "Delete", all following clicks in the playlist respect that setting until you go back to expert mode and change it.

Anyway I agree that persistence should be added, but when I made the expert mode I found persistance was less of a problem than I thought in the beginning.

Best,
Ulf

foo_httpcontrol

Reply #161
Thanks for the quick reply and updated (but downgraded  ) version. Indeed I should update to Firefox 3. This one works better!

foo_httpcontrol

Reply #162
there are a few other ideas that I guess can't be done in html:
  • wouldn't a transparent onepixel.gif be a better fallback cover art than a JPG?
  • it would be nice to have a volume control in the same cool way as the track progress bar
  • the File Browser could be displayed in the "controls" screen, alternating with the playlist


first of all, thanks for the feedback. it is always interesting to see the ways someone use THIS. now, let's get to the answers.
I find having additional option to specify nocover/nocoverinfo filenames an overkill. yes, it seems reasonable being able to select a single pixelled gif to save bandwidth, but to think of it, the ones who are caring of bandwidth saving won't be using cover art anyway. so it doesn't really matter if a fewbyted onepixel.gif or 700 bytes onepixel.jpg is loaded. moreover, the loaded file will be cached by browser anyway.

tracking volume control can definitely be done by javascript means, considering the fact that you can retrieve current volume level by [VOLUME], and set volume by calling /cmd=Volume?param1=NN

The last point is certainly a bit of work, but maybe it's less work than adding more real "Playlist management" to foo_http_control (change order, drag&drop, etc).  For a user who just likes to play entire albums from a directory tree, using foo_http_control might become even easier: they just click "Folder browser", click "Play this folder", and see the "now playing" bar progress through the directory.


I'll try to give your idea a thought. perhaps it is indeed nicer to have one combined page rather than two separated pages, but I've never considered this. the media player classic web inferface was the inspiration and it does have two separated pages.
regarding the ability of being able to fully control playlist.. well, I think it doesn't just needed in our case where things are bound to be as simple as it is possible. anyways, half of the playlist modifications possibilities are available, and the other half is somehow compensated by playback queue access.

BTW, yes, the "expert" mode is flagged just inside the page, not in the URL.  So it gets reset every time the page is reloaded.  It's good to see here that the "expert" settings themselves are persistent! So for instance, when you flip the "Start/Enqueue/..." switch to "Delete", all following clicks in the playlist respect that setting until you go back to expert mode and change it.

you're right, this kind of persistence needs to be done on plugin side. and while it is possible to create some kind of user defined variables being stored within the plugin, I don't really know if the time spent on it will really be compensated by achieved functionality.

foo_httpcontrol

Reply #163
Hi oblikoamorale, thanks for your prompt response!
there are a few other ideas that I guess can't be done in html:
  • wouldn't a transparent onepixel.gif be a better fallback cover art than a JPG?
I find having additional option to specify nocover/nocoverinfo filenames an overkill. yes, it seems reasonable being able to select a single pixelled gif to save bandwidth
This could be a misunderstanding, actually: the idea was not to save a few hundred bytes, but to have a transparent graphic for "fallback" in case that no cover art is found.  afaik, jpg graphics can't be transparent, but gif graphics can.

Here's one more idea to share before I go for the pub now  -- a great feature would of course be if you could make FB2K's command interface available via URL parameters: So, you could pass FB2K commands straight through to FB2K when your plugin receives them via the cmd parameter. This would enable HTML developers to add functionality right in the template: For instance, I would like to be able to set %rating% tags in music files right from a button in the HTML user interface.  If I knew I could just pass a FB2K command to FB2K via the URL, your plugin could enable such command-passing without actual modifications to your plugin itself...

Ulf

foo_httpcontrol

Reply #164
This could be a misunderstanding, actually: the idea was not to save a few hundred bytes, but to have a transparent graphic for "fallback" in case that no cover art is found.  afaik, jpg graphics can't be transparent, but gif graphics can.

eheh, it's just an one tiny bit of a pixel, isn't it? well, all right, it will be possible to specify coverinfo file names in future versions.
Here's one more idea to share before I go for the pub now  -- a great feature would of course be if you could make FB2K's command interface available via URL parameters: So, you could pass FB2K commands straight through to FB2K when your plugin receives them via the cmd parameter. This would enable HTML developers to add functionality right in the template: For instance, I would like to be able to set %rating% tags in music files right from a button in the HTML user interface.  If I knew I could just pass a FB2K command to FB2K via the URL, your plugin could enable such command-passing without actual modifications to your plugin itself...

I'm afraid there's no universal way of making all of the commands (hehhh...) to be available without programming support for each and every one. is it really needed?
how will you estimate the number of users needing such thing?

foo_httpcontrol

Reply #165
'm afraid there's no universal way of making all of the commands (hehhh...) to be available without programming support for each and every one. is it really needed?
Hi oblikomorale, when I suggested passing commands to foobar via your http plugin, I though of something like http://192.168.178.2:8888/?foo_cmd=/playing_command:"Custom Info/Rate 5" that would pass everything after "foo_cmd=" to foobar's command line: \foobar2000\foobar2000.exe /playing_command:"Custom Info/Rate 5".

Don't you think this would be doable in a generic way?  Of course, it was not my intention to suggest writing individual code for every API command.

Btw, I've made another small enhancement to the HTML: by clicking the album art, the cover.jpg now switches between 3 states: small -- invisible -- fullscreen -- small invisible.. etc etc. It's quite nice to display and hide large covers with a click

http://rapidshare.com/files/132240691/foo_...l_data.zip.html

Do you think you could make the new settings "image appearance" and "expert mode" persistent in your plugin: similar to "volume", which is also persistent already?

Best
Ulf

foo_httpcontrol

Reply #166
don't know how useful these additions are going to be, but here you go:
Code: [Select]
    v0.77 26 Jul
        add: user specified macro values. for example, calling the following:
             http://127.0.0.1:8888/?cmd=SetVar&param1=VarName&param2=VarValue
             initializes [VarName] macro with VarValue.
             note that the [VarName] macro doesn't get replaced unless VarName
             variable is initialized;
        add: ability  to  execute  currently  running  foobar  with  specified
             command line parameters. make  sure  to  urlencode  command  line
             parameter (just in case). example:
             http://127.0.0.1:8888/?cmd=CmdLine&param1=%2fplaypause
        add: customizable nocover and nocoverinfo image names;
        fix: heap corruption in jnetlib's getheader();

foo_httpcontrol

Reply #167
don't know how useful these additions are going to be, but here you go:
Thanks, oblikomorale!

I've been testing it and it works:  Using plugins RunCMD and Quicktagger (or PlaybackStatistics), it's now possible to set a %rating% tag for songs per foo_httpcontrol, and display the song's %rating% tag in the playlist.

So as promised, let me extend my HTML skin with some rating functionality, and persistent cover art display. I'll be back...

Thanks a lot for your quick response!

Ulf

foo_httpcontrol

Reply #168
Loving the plugin, great work. and the themes aswell.

just have one little problem, no albumart is showing up in any of the themes. even tho foobar finds the pictures just fine, the webinterface wont :S

all my albumarts are called folder.jpg and located in the folder of the albums

would be nice if anyone could tell me what im doing wrong

foo_httpcontrol

Reply #169
Awesome!

But... can we have a better iPhone interface? Automatic browser detection too? ^^

Okay, I'm asking too much

foo_httpcontrol

Reply #170
sorry if i missed this being mentioned before, but is there a way to run a foobar script from the webinterface?
i really need that feature as i'm using various scripts like all the time

foo_httpcontrol

Reply #171
btz, put this into album art field of http control preferences page:
$directory_path(%path%)\folder.jpg

viniciusferrao, if you want interface improvements I'm afraid you have to spend some time implementing them by yourself.

larskl, define foobar script please. I'm quite curious what would it be.

foo_httpcontrol

Reply #172
Is there a foobar2000 scripting language?  Hrm....I've managed to miss this little beauty.

foo_httpcontrol

Reply #173
Quote
larskl, define foobar script please. I'm quite curious what would it be.

Masstagger scripts I meant. Afaik that's the only kind of scripting available so I use it heavily and it'd really be nice to have it available in this plugins.
For example I use it for rating songs as I listen to them, amongst other stuff.

foo_httpcontrol

Reply #174
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