IPB

Welcome Guest ( Log In | Register )

44 Pages V  « < 3 4 5 6 7 > »   
Reply to this topicStart new topic
foo_httpcontrol, control foobar via http
oblikoamorale
post May 24 2008, 16:56
Post #101





Group: Developer
Posts: 302
Joined: 24-March 08
Member No.: 52244



I might be wrong, but I decided to stick to classic html for better compatibility.
CODE
    v0.72 24 May 2008
        WARNING: delete previous version of foo_httpcontrol.dll and start
                 Foobar, answer "No" when you're asked whether you want to
                 keep plugin settings.                                        

        add: reorganization of templates and settings to provide more
             customization possibilities. default templates are valid HTML
             4.01 transitional now;
        fix: utf-8 instead of utf8 in content-type encoding;
        fix: safety checks;
Go to the top of the page
+Quote Post
soulruins
post May 25 2008, 13:18
Post #102





Group: Members
Posts: 4
Joined: 22-May 08
Member No.: 53711



oblikoamorale, Ehhh! smile.gif Nice work!

Update iPhone template:

Download
Go to the top of the page
+Quote Post
saivert
post May 25 2008, 18:12
Post #103





Group: Members
Posts: 167
Joined: 13-June 06
Member No.: 31801



I see a lot of people complaining about the lack of customizability with foo_httpcontrol. Well, this component is about getting a web frontend for foobar2000 with little to no hassle. If you want to go all nuts about configuring and creating your own user interface/frontend, there is another component called foo_controlserver which only exposes a telnet-like interface to foobar2000. You can then write your own PHP/Perl web frontend which connects to this server to issue commands to foobar2000 and retrieve data.

I'm doing this here: http://beta.saivert.com/foobar2000%20webui/

For what foo_httpcontrol represents I'm satisfied. It basically is a no-brainer while my own script is a complex AJAX monster.

Both foo_httpcontrol and foo_controlsever could do with improvements. Nothing is ever perfect (in a realistic world) but don't go over board with demands. Sometimes keeping it simple and splitting up radical new ideas in new projects is the better way to do it.


--------------------
http://foobar2000.saivert.com - foobar2000 component repository
Go to the top of the page
+Quote Post
oblikoamorale
post May 25 2008, 19:07
Post #104





Group: Developer
Posts: 302
Joined: 24-March 08
Member No.: 52244



no one would object that dedicated server combined with a decent scripting language and foo_controlserver (or, what I personally like better, foo_comserver2) is a zillion times better approach, and that's exactly what I've already said somewhere up the thread.
but every tool has its use, and anyone is free to take the way they suppose is optimal. I'm cooking this thing in the way I like and need in my daily use, and don't pretend it to be anything else that it really is.
Go to the top of the page
+Quote Post
oblikoamorale
post May 26 2008, 05:12
Post #105





Group: Developer
Posts: 302
Joined: 24-March 08
Member No.: 52244



CODE
    v0.73 26 May 2008
        add: templates optimized for iphone, by soulruins;
        add: helper1-3 titleformats are always formatted in playlist now playing
             item context;
             for perfomance reasons playlist row titleformat is formatted in
             playlist context only for queued items, what makes possible to
             use introduced in 0.9.5.3 %queue_*% fields instead of built-in
             #queue_info#.
        fix: probability of insane playlist and queue lengths in totals;
Go to the top of the page
+Quote Post
Tim Schuhmacher
post May 26 2008, 20:02
Post #106





Group: Members
Posts: 12
Joined: 10-May 08
Member No.: 53426



I removed the previous version and didn't keep the settings. But now I get the following error (in Firefox):
"failed to read file: E:\Music\Sorted\foo_httpcontrol_controls_tpl.html, error: 2."

Where 'E:\Music\Sorted\' is the home directory and browse path. I get the same error when I leave browse path blank. When I leave both input blanks the plugin works fine. This problem didn't occur with the previous version.

What could it be?

And the queue index isn't shown. Only total time of the queued tracks

This post has been edited by Tim Schuhmacher: May 26 2008, 20:04
Go to the top of the page
+Quote Post
oblikoamorale
post May 27 2008, 04:10
Post #107





Group: Developer
Posts: 302
Joined: 24-March 08
Member No.: 52244



home dir specifies a directory where plugin will look for template files, and also it serves as a document root of webserver. you should leave it blank if you're satisfied with keeping the above data in components/foo_httpcontrol_data.

for queue indexes to work you have to update foobar to latest version. I'm using 0.9.5.3 built-in queue info field now.
Go to the top of the page
+Quote Post
Jonas Nyrup
post May 27 2008, 09:09
Post #108





Group: Members
Posts: 35
Joined: 5-June 07
Member No.: 44084



If I play a track from one playlist in foobar and have focus on another playlist in httpcontrol it fails to display the right track.
httpcontrol displays information about the track which has the same place in the focused playlist as the actual track has in its playlist.
Go to the top of the page
+Quote Post
Tim Schuhmacher
post May 27 2008, 13:24
Post #109





Group: Members
Posts: 12
Joined: 10-May 08
Member No.: 53426



@oblikoamorale: you're right. thanks
Go to the top of the page
+Quote Post
oblikoamorale
post May 27 2008, 15:41
Post #110





Group: Developer
Posts: 302
Joined: 24-March 08
Member No.: 52244



CODE
    v0.74 27 May 2008
        fix: wrong playlist context (active instead of playing) in helper1-
             helper3 title formats;
Go to the top of the page
+Quote Post
Jonas Nyrup
post May 27 2008, 17:31
Post #111





Group: Members
Posts: 35
Joined: 5-June 07
Member No.: 44084



thanks for the quick fix.
Go to the top of the page
+Quote Post
carmenm
post May 28 2008, 12:00
Post #112





Group: Members
Posts: 720
Joined: 24-November 05
From: Grenoble
Member No.: 25981



i am starting to use this plugin using Fluid on mac, so NICE!
I was wondering is there a way to stream the albumart ? (usually a folder.jpg in playing file dir)
Go to the top of the page
+Quote Post
oblikoamorale
post May 28 2008, 13:26
Post #113





Group: Developer
Posts: 302
Joined: 24-March 08
Member No.: 52244



QUOTE (carmenm @ May 28 2008, 15:00) *
i am starting to use this plugin using Fluid on mac, so NICE!

care to post a screenshot?
QUOTE (carmenm @ May 28 2008, 15:00) *
I was wondering is there a way to stream the albumart ? (usually a folder.jpg in playing file dir)

if albumart is an external file of the certain name, why not, I can make it. although I don't know why would anyone need it, to be honest.
Go to the top of the page
+Quote Post
Chipicui
post May 28 2008, 15:00
Post #114





Group: Members
Posts: 88
Joined: 3-September 07
Member No.: 46732



Well... in my case not a real need, certainly...
but it would be nice if we could have the option to see the album art ("cover.jpg" in the album folder, for me).
And I mention the word "option" because it could make for a very slow redraw, so I'm not sure if i'd use it on wifi connection, but I'd certainly do while using the wired network.
Go to the top of the page
+Quote Post
carmenm
post May 28 2008, 17:43
Post #115





Group: Members
Posts: 720
Joined: 24-November 05
From: Grenoble
Member No.: 25981



QUOTE (oblikoamorale @ May 28 2008, 14:26) *
QUOTE (carmenm @ May 28 2008, 15:00) *

i am starting to use this plugin using Fluid on mac, so NICE!

care to post a screenshot?
QUOTE (carmenm @ May 28 2008, 15:00) *
I was wondering is there a way to stream the albumart ? (usually a folder.jpg in playing file dir)

if albumart is an external file of the certain name, why not, I can make it. although I don't know why would anyone need it, to be honest.



I need to make a black template now quite like my IM on the right

I use my macbook to control my foobar. My pc with foobar doesnt have a screen tongue.gif so it s nice to see the albumart of what i am playing in my http interface. And album art is external file always called folder.jpg and placed in the same dir as the track file .

Thanks for your concern

EDIT: would it be possible for the web interface to update itself when we make modifications to foo_httpcontrol_controls_tpl.html? Currently i have to restart foobar for each modification

This post has been edited by carmenm: May 28 2008, 19:06
Go to the top of the page
+Quote Post
Ritsl
post May 29 2008, 00:47
Post #116





Group: Members
Posts: 35
Joined: 2-December 06
From: The Netherlands
Member No.: 38275



I've optimized the control page for use in a sidebar. Copied the volume up/down from the iphone setup, moved around some buttons, changed the code a bit, changed the styles so the main player buttons stretch to fill the sidebar width. Simplified the markup for the progress bar, adjusted the related styles and the script to make the click-to-seek work independent of the length of the text in it. In my version, you'll get a bordered box you can click in. Also works fine when the text in the progress bar wraps.

Developed and tested in Opera 9.5, also seems works to work fine in Firefox 3 and Opera 9.27 (with minor issues), and looks the same in Safari 3, though that browser doesn't sport a sidebar :-)
Screenshot is taken using the Tango CL skin in Opera.

Screenshot
Zipped HTML File
Go to the top of the page
+Quote Post
carmenm
post May 29 2008, 01:22
Post #117





Group: Members
Posts: 720
Joined: 24-November 05
From: Grenoble
Member No.: 25981




getting closer to something that i want
Go to the top of the page
+Quote Post
pstrg
post May 29 2008, 02:22
Post #118





Group: Members
Posts: 104
Joined: 7-October 05
Member No.: 24946



QUOTE (oblikoamorale @ May 27 2008, 12:41) *
CODE
    v0.74 27 May 2008
        fix: wrong playlist context (active instead of playing) in helper1-
             helper3 title formats;

Replaced 0.72 for this newer version.
Strange that now, after each entry (to the right of the duration) the following text appears: #queue_info#
Go to the top of the page
+Quote Post
oblikoamorale
post May 29 2008, 04:11
Post #119





Group: Developer
Posts: 302
Joined: 24-March 08
Member No.: 52244



QUOTE (carmenm @ May 28 2008, 20:43) *
I use my macbook to control my foobar. And album art is external file always called folder.jpg and placed in the same dir as the track file .
so, I suggest something like this: album art will be retrieved by virtual request of /albumart.jpg. plugin will look for folder.jpg in playing track directory. if folder.jpg is not found there, first of jpg residing in the same dir will be shown. if there still is no picture, I'll show a /nocover.jpg.

and thanks for the shots, they're interesting!

QUOTE (carmenm @ May 28 2008, 20:43) *
EDIT: would it be possible for the web interface to update itself when we make modifications to foo_httpcontrol_controls_tpl.html? Currently i have to restart foobar for each modification
technically - yes. right now I'm reading these files on startup and keep them in memory, for perfomance reasons, again. I'll benchmark reading templates on each request. if no perfomance hit is going to be discovered, I'll leave it be.

QUOTE (Ritsl @ May 29 2008, 03:47) *
I've optimized the control page for use in a sidebar.
yay, I didn't know opera 9.5 had something like built-in sidebar. your work looks promising, gotta try it! thanks for sharing.


QUOTE (pstrg @ May 29 2008, 05:22) *
Replaced 0.72 for this newer version.
Strange that now, after each entry (to the right of the duration) the following text appears: #queue_info#

use the following playlist row format. also you'll need updating to 0.9.5.3
CODE
<td class="p">[%album artist% ]['['%album%[ CD%discnumber%][ #%tracknumber%]']' ]%title%[ '//' %track artist%]</td><td class="t">%length%</td>[<td class="q">%queue_indexes%</td>]


This post has been edited by oblikoamorale: May 29 2008, 04:13
Go to the top of the page
+Quote Post
Ritsl
post May 29 2008, 12:32
Post #120





Group: Members
Posts: 35
Joined: 2-December 06
From: The Netherlands
Member No.: 38275



QUOTE (oblikoamorale @ May 29 2008, 05:11) *
QUOTE (Ritsl @ May 29 2008, 03:47) *
I've optimized the control page for use in a sidebar.
yay, I didn't know opera 9.5 had something like built-in sidebar. your work looks promising, gotta try it! thanks for sharing.
Opera has had customizable panels since version 5.10 smile.gif Just check the box 'Show in panel' in the bookmark properties. I've reordered and prettified the buttons a bit more, and sneakily updated the existing files online.
Go to the top of the page
+Quote Post
pstrg
post May 29 2008, 12:40
Post #121





Group: Members
Posts: 104
Joined: 7-October 05
Member No.: 24946



QUOTE
use the following playlist row format. also you'll need updating to 0.9.5.3
CODE
<td class="p">[%album artist% ]['['%album%[ CD%discnumber%][ #%tracknumber%]']' ]%title%[ '//' %track artist%]</td><td class="t">%length%</td>[<td class="q">%queue_indexes%</td>]

Was already using 0.9.5.3; with the new playlist row string above problem was solved.
Thanks!
Go to the top of the page
+Quote Post
pstrg
post May 29 2008, 22:37
Post #122





Group: Members
Posts: 104
Joined: 7-October 05
Member No.: 24946



I'm trying to modify foo_httpcontrol_controls_tpl.html as shown below in color:

<input name="Stop" title="Stop playback" type="button" style="font-size: 12pt; font-family: webdings;" value="<" onclick="pc(this.name);">

With that, I wanted to change the button captions to Webdings chars that resemble players' signs: "<" for instance is a solid square in that font.
It works with IE (which I don't use) but with Mozilla Firefox 3.0 RC1 the font-size parameter does modify size but the font-family one doesn't change font to Webdings (although Allow pages to use their own fonts is set).

[2008-05-30 update]

I have learned that *dings fonts are not displayable anymore by design in the newest release of Firefox.
Could not find a way to circumvent the limitation yet (directions on http://www.mvps.org/dmcritchie/firefox/firefox.htm do not work anymore).

This post has been edited by pstrg: May 30 2008, 20:13
Go to the top of the page
+Quote Post
saivert
post May 30 2008, 00:08
Post #123





Group: Members
Posts: 167
Joined: 13-June 06
Member No.: 31801



Why not just a "reload page templates" button on the preferences page?


--------------------
http://foobar2000.saivert.com - foobar2000 component repository
Go to the top of the page
+Quote Post
carmenm
post May 30 2008, 12:16
Post #124





Group: Members
Posts: 720
Joined: 24-November 05
From: Grenoble
Member No.: 25981



QUOTE (saivert @ May 30 2008, 01:08) *
Why not just a "reload page templates" button on the preferences page?

Could do it but would be even greater if we had a command for reload page templates. I would use this instead of refresh command.
Go to the top of the page
+Quote Post
oblikoamorale
post May 30 2008, 17:33
Post #125





Group: Developer
Posts: 302
Joined: 24-March 08
Member No.: 52244



CODE
    v0.75 30 May 2008
        add: templates optimized for opera sidebar, by Ritsl;
        add: Browse path values must be separated by '|' instead of ';' now;
        add: templates are reloaded on each page request;
        add, especially for album art addicts: [ALBUMART] macro.
             returns an url link to album art picture.
             picture search variants must be specified in "Album art"
             preferences title formatted field, separated by '|'.

             example of field value, which makes plugin look for folder.jpg
             and then, if folder.jpg is not found, for any jpg in playing
             track directory:
             $puts(dir,$left(%path%,$strrchr(%path%,\)))$get(dir)folder.jpg|$get(dir)*.jpg
            
             if nothing is found, /nocover.jpg is returned.
             if track is not playing, /nocoverinfo.jpg is returned.

             example of macro usage:
             <img src="[ALBUMART]">
Go to the top of the page
+Quote Post

44 Pages V  « < 3 4 5 6 7 > » 
Reply to this topicStart new topic
2 User(s) are reading this topic (2 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 23rd October 2014 - 16:33