ljames28
Apr 25 2007, 09:17
Hey,
Just wanted to check, is there an activex control for controlling foobar and viewing current track info? I ask because i'd like to add support to foobar for
this gadget. If not, anyone working on an activex control?
foosion
Apr 25 2007, 11:21
See the COM Automation Server from my components page.
ljames28
Apr 25 2007, 12:08
Awesome, got everything implemented but four things. If they're not possible that's fine, i've never used foobar before so don't know if it has track ratings or a separate volume control.
How do i get and set the track rating?
How can i change and get the volume?
How do i get track duration? I tried playback.length but got nothing from that.
How do i get the source url of the track? Aka where is it located on the computer
Thanks very much, Law
foosion
Apr 25 2007, 12:44
QUOTE(ljames28 @ Apr 25 2007, 20:08)

Awesome, got everything implemented but four things. If they're not possible that's fine, i've never used foobar before so don't know if it has track ratings or a separate volume control.
How do i get and set the track rating?
How can i change and get the volume?
Volume control is present, but there is no demonstration code in the VBScript examples. You can access the volume in dB through the playback.Settings.Volume property.
Rating is just another metadata field for foobar2000. You can access those through the titleformatting functions, for example:
CODE
strRating = playback.FormatTitle("%rating%")
This will return "?" if there is no rating tag.
QUOTE(ljames28 @ Apr 25 2007, 20:08)

How do i get track duration? I tried playback.length but got nothing from that.
Strange, works for me.
QUOTE(ljames28 @ Apr 25 2007, 20:08)

How do i get the source url of the track? Aka where is it located on the computer
You have to use titleformatting here as well:
CODE
strPath = playback.FormatTitle("%path%")
ljames28
Apr 25 2007, 13:12
Cool, volume and path work now

With the track rating, do you need an addon to foobar for that? I can't see how to change the track rating within foobar, nor do i get anything other than "?" in the gadget.
With the trackduration, quite oddly i just get nothing when a track is playing, but when theres no track playing i get a 0.
Can you post the gadget here?
ljames28
Apr 25 2007, 16:49
http://www.gadgetspark.com/ljames28/nowplaying.gadgetIf you could tell me exactly how the first run goes, I'd be very greatful

I try to get the plug ins for the various players to install without the user really knowing, this one was a little more tricky, but i think it works.
Before installing i removed the WMP and winamp plugins as i don't need them. (don't know when it installs them but dont want that stuff on my pc)

The gadget works

but like you said the trackduration isn't showing. (haven't seen volume control

)
Unfortunately I can't use the cover function because 80% of my music collection is japanese and there are almost no covers on amazon. I wish there was a way to get the covers localy.
Also I think the rating system should have an option to be disabled, lots of users don't use ratings.
Another thing is the undocked state is nicer as the nowplaying info doesn't block the cover (if there is one

).
A smaller font could be used as the text doesn't really fit in text only, undocked and docked state. Text-only mode doesn't have controls, so it's impossible to actually use the gadget without cover showing.
It's a nice gadget but it needs some improvements.
ljames28
Apr 26 2007, 05:52
Okay, points taken. Volume control, you click on the gadget to bring it into focus then scroll your mouse wheel. The problem with a lot of what you mention is it conflicts with what other people say. I used to have controls on text only, then people complained that they're un-necessary. I used to have smaller font, people complained it was too small.
And to create options for everything slows it down, takes longer to create, and goes against the gadget philosophy.
Erm with the plugins, in the latest version they should only install if you select the player. So if you select wmp it'll install the plugin.
Covers, it looks everywhere but ID3 tags currently, the main way people seem to use covers with this gadget is via a folder.jpg
Do ratings actually work for you?
QUOTE(ljames28 @ Apr 26 2007, 12:52)

Okay, points taken. Volume control, you click on the gadget to bring it into focus then scroll your mouse wheel. The problem with a lot of what you mention is it conflicts with what other people say. I used to have controls on text only, then people complained that they're un-necessary. I used to have smaller font, people complained it was too small.
And to create options for everything slows it down, takes longer to create, and goes against the gadget philosophy.
Erm with the plugins, in the latest version they should only install if you select the player. So if you select wmp it'll install the plugin.
Covers, it looks everywhere but ID3 tags currently, the main way people seem to use covers with this gadget is via a folder.jpg
Do ratings actually work for you?
Oh well, different people have different opinions.

I would much rather have the full title in the gadget than trying to figure out half of the title.
Good to know that about the plugins.

I don't use folder.jpg after wmp overwrited some of my covers with crappy resolution covers of its own, so now i use cover.jpg and they're in the same folder as the album/single.

Don't know

I dont use and have never used ratings, don't even know how to use it.

Maybe i'll check it out.
ljames28
Apr 26 2007, 12:02
The issue with track duration was my fault

i didn't round the number so it caused issues in the calculation steps.
The track rating, if you install foo_custominfo then that'll display the track info.
Being able to set track rating, thats something that's not implemented yet right?
Pingue
Apr 27 2007, 01:45
Hi,
Tried this gadget out yesterday, and really liked the idea and the layout of it. However, a few initial points to make.
When I first loaded it up, i selected Foobar, and clicked where it said to open. Foobar displayed for a few seconds, but then just ended. I think it came up with an error, but didn't display it long enough to read. After that, though, it worked brilliantly, and I've hardly had any problems. One thing I did notice was that rating didn't work, but it sounds like I need to get hold of foo_custominfo. I tried, and it definitely worked in wmp, so I presume it's ok. Again, track duration didn't show, ie "2:35 / ".
Also for some of my albums, instead of showing the name, it just displayed "No Album" when in large, undocked view. However, I think it displays OK in text-only mode, so there may be some discrepancy there.
Would it be at all possible to implement something as in album art, to insert locations you wish to search for pictures. Personally, I store all my artwork in one folder, under the name of the album.png, and there's very few albums with pictures left in the original folder.
Another request: could (instead of a smaller font) you implement some sort of scrolling text function if the title is too long, a la Track Info.
Hope some of this is useful: I know I've repeated some of what others have said, but overall, this is a wonderful gadget
ljames28
Apr 27 2007, 01:52
The issue you had when you first ran the gadget, thanks for the feedback, don't think i can do anything though, to install the plugin it has to close foobar, but to check if the plugin is installed it has to open foobar...so you can see where it gets iffy! Its a bit of an ugly method but easier than telling the user to install the plug-in themself.
With foo_custominfo rating seemed to work on the latest version, i thought i fixed duration too, have you tried closing and re-opening the gadget to check you have the latest version? If it's still an isue i guess i'l take another look a that.
Could you please re-verify there is a difference in album names when in text mode and big mode?
With the album art thing, probably wont do that, theres so so so many different ways people store art i can't cater for them all.
Scrolling text will hopefully be in the next release
masterrossi
Apr 27 2007, 05:41
is there a way to change the font size? I think it is slightly too big
ljames28
Apr 27 2007, 09:50
Edit the css style sheets. gadget.css to be precise.
masterrossi
Apr 27 2007, 09:51
ahh ok, thanks. That should do the trick indeed.
masterrossi
Apr 27 2007, 11:05
something else i noticed now:
When I change an album it keeps the art of the previous album and name of the last track from the previous album if there is no art in the new album.
I name all album art files "folder.jpg" and they are all in the same folder as the mp3's are.
What can this be, and can this be solved by some trick?
ljames28
Apr 27 2007, 11:12
I cant really explain that at all.
Could you pleas open the main.js file in the js folder please. On the like 8th line or something change debug=0 to debug=1.
Then try and re-create what you did before and see if it gives any errors
masterrossi
Apr 27 2007, 11:51
it doesn't give any errors at all.
and to make it even weirder...if i change song focus in foobar it doesn't change anything even when there is artwork. It changes only when I use the next or previous button in the gadget.
ljames28
Apr 27 2007, 11:52
So basically, what you're saying, the gadget ONLY updates what foobar is playing if you use the next/previous buttons in the gadget?
Have you tried waiting a while, like 30 seconds for example?
masterrossi
Apr 27 2007, 11:59
Now it seems to work again, though switching to albums that do not have artwork (and that are not at amazon) doesn't work.
For example I switched from "Faust vs Dälek - Derbe Respect, Alder" to "John Duncan - Dark Market Broadcast" and after about 2 minutes it is still showing me the "Faust vs. Dälek" artwork and track information, instead of a blank screen and information about "John Duncan".
ljames28
Apr 27 2007, 12:06
And this is after you change the debug to 1?
masterrossi
Apr 27 2007, 12:09
yes
ljames28
Apr 27 2007, 12:11
Is this just with some albums then? Not with all of them i assume.
masterrossi
Apr 27 2007, 12:13
it's with all that i tested which is quite some by now.
Also notice that if you do not have the artwork in the folder, but it gets it from amazon, next time you go to an album with artwork in the folder it doesn't change. That's the case that it only changes when you use the buttons in the gadget.
ljames28
Apr 27 2007, 12:58
masterrossi
Apr 27 2007, 12:59
ok, will try it.
EDIT: perfect.
It works now. I get this big musical note if there is no artwork. And the switching goes really good.
ljames28
Apr 27 2007, 13:32
Ah that's good. When it had to resort to looking for artwork in google, if it found an image on google, then the gadget failed basically

Should have shown an error really but oh well it works now.
Hows the scrolling text?
masterrossi
Apr 27 2007, 13:38
no scrolling text on my gadget.
ljames28
Apr 27 2007, 13:41
You have to undock it, and the track name has to be long
masterrossi
Apr 27 2007, 14:56
Ahh yes, nice.
masterrossi
Apr 27 2007, 15:59
one more thing i found. I have my foobar installed at another location than c:\program files\foobar
If i click on the gadget when foobar is turned off it says it can't find foobar. How can you change the location in the program? Although of course it is no problem of actually opening foobar, but just the idea...
ljames28
Apr 27 2007, 17:13
You can also edit that in main.js
I suggest you search for foobar2000.exe or something
Pingue
Apr 29 2007, 09:03
Right: I can now confirm that the Album name varies depending on what size it is. I'm having difficulty including screenshots of the same file playing, but I can assure you it's not my imagination. However, I've not tried this with the newest version yet: I'll do that tonight, and get back to you tommorrow.
muitommy
Apr 29 2007, 10:46
wow. thanks that's pretty
but i wonder can i make changes to the fonts??
masterrossi
Apr 29 2007, 11:08
QUOTE(masterrossi @ Apr 27 2007, 13:41)

is there a way to change the font size? I think it is slightly too big
QUOTE(ljames28 @ Apr 27 2007, 17:50)

Edit the css style sheets. gadget.css to be precise.
QUOTE(muitommy @ Apr 29 2007, 18:46)

wow. thanks that's pretty
but i wonder can i make changes to the fonts??
ljames28
Apr 29 2007, 11:09
Mui: that can be edited in the css files
Edit: lol
I would put it in the readme file, but for some reason many people seem to miss it, maybe size 18 font isn't big enough :|
Pingue
Apr 30 2007, 01:46
Right: here's my proof that the Album name does change. And this is with the latest (April 27th?) version of the gadget.
Here for text mode
and
here for large mode.
The scrolling text is really nice: works well
ljames28
May 1 2007, 11:48
Afraid i don't really know why thats happening, sorry.
Hmm. Bizarre. Never mind: I've got it all set up left in text mode, which is quite handy to sit on the desktop anyway.
saivert
May 2 2007, 17:16
You should be able to get the path where foobar2000.exe is installed using the fb2k COM Component thingy or else you can use Windows Script Host's registry scripting components.
WSH RegRead function:
http://www.pctools.com/guides/scripting/de.../?act=referenceExample (JavaScript as used by Gadgets):
CODE
var WshShell = new ActiveXObject("WScript.Shell");
var fb2k_path;
fb2k_path = WshShell.RegRead("HKLM\\Software\\foobar2000\\InstallDir");
// A little test to see if it really works:
alert('foobar2000 is installed in "' + fb2k_path + '"');
And always remember to escape backslashes (by using \\ ) in strings if what you want is backslashes. That has tricked me more than one time especially when copying code from VBScript.
Hope this helps!
ljames28
May 3 2007, 00:41
Thanks

If memory serves correctly in the end i actually just searched the registry for foobar and found that, i think its in the latest release, 2.9
Simon G
Nov 30 2007, 05:32
I have a problem with this gadget, It only says"Notice: Play a song in Foobar" when I listens to some music. Do I have to change something in Foobar to get this one to work?
/Simon
Superpiccolo
Jan 8 2008, 18:22
^ I think you have to have the COM Automation Server installed for it to work. I had your problem, but I then installed that and it worked.
Aha! This is tops. Great alternative to foo_title on vista. One question though, is it possible to have the track length/time left display all the time? As atm it only shows when you cursor over the gadget.
EDIT: Also the Artist & Album field dont seem to scroll when it is longer than its width. I have it in full view mod (Normal, Undocked).
DaSilva
Jan 9 2008, 13:26
I can't get it to work.
I downloaded the gadget from the first post on this page (2) and installed it but it is not on the sidebar and not on the list of the additional gadgets.
What could be my problem?
Iam using Windows Vista Ultimate 32 Bit German.
Thanks for help.
Superpiccolo
Jan 9 2008, 17:33
DaSilva
Jan 10 2008, 11:15
Sorry, but that doesn't solve the problem.
Nothing happens.
Superpiccolo
Jan 10 2008, 21:41
Your right. Mine is also not working now.
ljames28
Jan 27 2008, 11:39
DaSilva...do you have the latest version...3.92?
If not get it from here:
http://gallery.live.com/liveItemDetail.asp...6af0328&l=1The link at the top of the page is an old version and might not auto update
You do need the Com Automation Server for this to work, the gadget should install it automatically if foobar is in it's normal location.
DaSilva
Jan 27 2008, 12:13
That version works.
Thanks!
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please
click here.