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: JScript Panel script discussion/help (Read 283123 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Re: JScript Panel script discussion/help

Reply #125
So, with the lyrics3 panel no longer working I was wondering if it at all possible to have a script whipped up that could fetch lyrics? The ability to add our own sites for the query would be a nice option the extension was missing.

Re: JScript Panel script discussion/help

Reply #126
@OoNebsoO, use foo_facets with foo_playcount. Use a statistics column to reverse sort.

Re: JScript Panel script discussion/help

Reply #127
Is there a way to alter tag colors in properties.txt like this that doesn't involve editing the list.js color option? I dislike poking around in the scripts but in this case it was the only way I seem to be able to do it.


Re: JScript Panel script discussion/help

Reply #128
inside on_paint before calling list.paint(gr)...

Code: [Select]
panel.colours.text = _.RGB(1, 2, 3);
panel.colours.highlight = _.RGB(4, 5, 6);

Re: JScript Panel script discussion/help

Reply #129
@OoNebsoO, use foo_facets with foo_playcount. Use a statistics column to reverse sort.

Thanks, marc2003. Though, shame facets do not work within Column UI.

I am fooling around a bit with autoplaylists + esplaylist (elp in future most likely). Used a bit graphical browser, but for some reason, that won't display all the results. Works well with the whole library, of course, Can't figure out a query for a particular artist that is selected, or is playing though. If that's possible anyway...




Re: JScript Panel script discussion/help

Reply #130
I am getting this error with one of your sample scripts:

JScript Panel (Album Art + Allmusic Review by marc2003): JavaScript runtime error:
Unable to get property 'getElementsByTagName' of undefined or null reference
File: C:\Users\xxx\AppData\Roaming\foobar2000\js_marc2003\js\text.js
Line: 316, Col: 8
<source text only available at compile time>

Re: JScript Panel script discussion/help

Reply #131
Is it happening with all artists/albums or just a specific one? If it's just one then let me know what it is and I'll take a look.

Re: JScript Panel script discussion/help

Reply #132
Is it happening with all artists/albums or just a specific one? If it's just one then let me know what it is and I'll take a look.
Well it's very rare and random it seems. I posted when it crashed during playing
Code: [Select]
Artist Name : Straylight Run
Track Title : Tool Sheds And Hot Tubs
Album Title : Straylight Run
Date : 2004
Genre : Alternative
but playing it a few more times just now didn't give any errors.

Also thanks a lot for your samples, I can't do anything in javascript so these are very helpful  ;)

Re: JScript Panel script discussion/help

Reply #133
Well it worked first time for me. There's not a lot I can when I can't reproduce the problem but I guess I should handle errors more gracefully.


Re: JScript Panel script discussion/help

Reply #135
So, with the lyrics3 panel no longer working I was wondering if it at all possible to have a script whipped up that could fetch lyrics? The ability to add our own sites for the query would be a nice option the extension was missing.

you may mean this:
but......... could read Chinese? or ESLyric would be a good choice.
A rose will bloom, it then will fade.

Re: JScript Panel script discussion/help

Reply #136
marc2003, could Autoplaylists use only the currently playing playlist, and not the whole library? Or think that query could be made that uses currently playing (or selected artist) automatically? Something like %artist% (is playing/is selected) SORT DESCENDING BY %title%?

Thanks.

 

Re: JScript Panel script discussion/help

Reply #137
Using a custom source for autoplaylists would require component changes way beyond my extremely limited capabilities.

You can run a query against an existing playlist and send the results to a new (standard) playlist. This method doesn't support SORT BY but you can use regular title formatting to sort instead.

Re: JScript Panel script discussion/help

Reply #138
Using a custom source for autoplaylists would require component changes way beyond my extremely limited capabilities.

Dread to think how limited some of ours' capabilites are then. ;)

Thank you. Found also one older thread where you again helped a member who had quite similar questions like I had.

Re: JScript Panel script discussion/help

Reply #139
So, with the lyrics3 panel no longer working I was wondering if it at all possible to have a script whipped up that could fetch lyrics? The ability to add our own sites for the query would be a nice option the extension was missing.

you may mean this:
but......... could read Chinese? or ESLyric would be a good choice.

Thank you but I did not have any luck with this

Re: JScript Panel script discussion/help

Reply #140
I hope this is the best place to ask this...
THe "now playing (basic)" Script... is it possible to change the location where the images are downloaded to? When selecting to download the images from last.fm it saves to the user configuration folder.. can I for example change this to my album artist folder? (drive\album artist\artowrk\?) This is something I already use for one source for my images.. ($replace(%path%,$directory(%path%)\%filename_ext%,)extrathumbs\*)

Re: JScript Panel script discussion/help

Reply #141
So, with the lyrics3 panel no longer working I was wondering if it at all possible to have a script whipped up that could fetch lyrics? The ability to add our own sites for the query would be a nice option the extension was missing.

you may mean this:
but......... could read Chinese? or ESLyric would be a good choice.

Thank you but I did not have any luck with this

Once @dreamawake made an English version of ESLyric and shared it with her configuration "Foobox" on deviantart, but got "SHIT" feedback... maybe that is why @ttsping(aka oyeah) has no motion to compile an english version.
A rose will bloom, it then will fade.

Re: JScript Panel script discussion/help

Reply #142
I hope this is the best place to ask this...
THe "now playing (basic)" Script... is it possible to change the location where the images are downloaded to? When selecting to download the images from last.fm it saves to the user configuration folder.. can I for example change this to my album artist folder? (drive\album artist\artowrk\?) This is something I already use for one source for my images.. ($replace(%path%,$directory(%path%)\%filename_ext%,)extrathumbs\*)

Theoretically possible but tricky to explain so I'm just going to say no.  :))

Re: JScript Panel script discussion/help

Reply #143
Theoretically possible but tricky to explain so I'm just going to say no.  :))

Thank you. That's all I needed. Being new to foobar my head is spinning a little and wanted to make sure I wasn't overlooking anything.


Re: JScript Panel script discussion/help

Reply #145
Getting API error after I enter my last.fm password into last.fm sync sample panel, do I have to manually enter it into one of the .js files?

Re: JScript Panel script discussion/help

Reply #146
I want to add a few extra buttons to marc2003's sample "track info + seekbar + buttons", where do I find the functions syntax I need?
For example stop after queue/current.

Re: JScript Panel script discussion/help

Reply #147
docs\interfaces.txt contains most of what you need. You can get/set the state of stop after current with fb.StopAfterCurrent. You can also detect when the state changes using the on_playlist_stop_after_current_changed callback. See callbacks.txt

Assuming stop after queue is provided by some third party component, all you can do is trigger the menu command using fb.RunMainMenuCommand. You cannot query its state.

Re: JScript Panel script discussion/help

Reply #148
docs\interfaces.txt contains most of what you need.

I opened interfaces.txt in Notepad and quickly found that was a mistake. So I opened it in the JScript Panel editor, which obviously should have been my first choice. Can you recommend a text editor that works the same way?

Re: JScript Panel script discussion/help

Reply #149
docs\interfaces.txt contains most of what you need. You can get/set the state of stop after current with fb.StopAfterCurrent. You can also detect when the state changes using the on_playlist_stop_after_current_changed callback. See callbacks.txt

Assuming stop after queue is provided by some third party component, all you can do is trigger the menu command using fb.RunMainMenuCommand. You cannot query its state.

Thank you.