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

WSH Panel Mod script discussion/help

Reply #3800
Hey marc2003, I'm trying and failing to modify your Last Fm Similar Artists script.

Basically I want it to better utilise space in rectangular panels by forcing it to create a new columns if enough space along the X axis is unused

Sort of like this:



How easy would this be to implement?

WSH Panel Mod script discussion/help

Reply #3801
this sort of thing has been asked for before. displaying them like that is easy. the hard part is keeping everything clickable and i'm just too lazy.

WSH Panel Mod script discussion/help

Reply #3802
this sort of thing has been asked for before. displaying them like that is easy. the hard part is keeping everything clickable and i'm just too lazy.


Fair enough

 

WSH Panel Mod script discussion/help

Reply #3803
marc2003:I set it up like this now, realized I wanted the musicbrainz script as well


I have tollbars for the buttons above every wsh-panel, and they of course do things to the selected item. Ideally, I'd want the buttons inside the panels just above the "gr.Drawline".

Though I don't know if I can get all the links to work in the panel? If not, it's maybe not worth it. It's mostly browser links, but also album art downloader (through foo_run), soft_playlist stuff, file operations, and replaygain scan.

I understand how to paint them in the right place and how to use if statements for the different panel modes to show different buttons, but not how to make them clickable... Also, I'd need to understand how to get the value of the marked item (whether it's artist, album or title) I now use li.header_text().replace(/: top tracks/g, '').replace(/ /g, '+') in some places but...

I've tried figuring this out by changing in some old scripts, I've also gone through your tutorial, and I tried inserting the playback buttons and changing stuff there, but didn't figure out what to keep and what to change...

WSH Panel Mod script discussion/help

Reply #3804
@sylla, i need to complete or rather start my tutorial about using buttons.
@hucifer, i might think about working around listing stuff side by side but no promises.

and now for something completely different. i've fixed a long standing annoying bug in WSH panel mod by recompiling it. if people use any of my artist bio or album review scripts (or other scripts that display large chunks of text), they may have noticed stray punctuation not getting wrapped properly. this fixes it...

https://dl.dropboxusercontent.com/u/2280132...h_panel_mod.zip

it requires foobar v1.3 or above because it uses the latest SDK
utils.GetAlbumArt has been removed because the corresponding function has been removed from the foobar SDK.
tested on 7 and 8.1. it doesn't work on XP and i have no idea about vista.


WSH Panel Mod script discussion/help

Reply #3805
sorry mods, i posted by mistake. delete this.

WSH Panel Mod script discussion/help

Reply #3806
@sylla, i need to complete or rather start my tutorial about using buttons.
@hucifer, i might think about working around listing stuff side by side but no promises.

and now for something completely different. i've fixed a long standing annoying bug in WSH panel mod by recompiling it. if people use any of my artist bio or album review scripts (or other scripts that display large chunks of text), they may have noticed stray punctuation not getting wrapped properly. this fixes it...

https://dl.dropboxusercontent.com/u/2280132...h_panel_mod.zip

it requires foobar v1.3 or above because it uses the latest SDK
utils.GetAlbumArt has been removed because the corresponding function has been removed from the foobar SDK.
tested on 7 and 8.1. it doesn't work on XP and i have no idea about vista.


Awesome! That had been bugging me.

And thanks for additional scrips as well - I wanted to get a proper all-in-one menu button working

WSH Panel Mod script discussion/help

Reply #3807
i'm kind of surprised no one has moaned about that bug before. i expect most people thought my script was at fault rather than the component.  for anyone who writes their own scripts, it the EstimateLineWrap function that i fixed.

also, here's a side by side similar artists script. just replace the code in your panel with this. there is no scrolling.

https://dl.dropboxusercontent.com/u/2280132...h%20columns.txt

@sylla, i'll sort out some buttons later.

WSH Panel Mod script discussion/help

Reply #3808
Falstaff,
Question:
You can add to the playlist manager option sorting alphabetically?
(for some reason this option not present anywhere, only seen in the component: "Playlist Organizer", but this spoils the whole design)


FYI, feature added (sort Az and Za) for next release (v1.2.0), release planned this week-end


WSH Panel Mod script discussion/help

Reply #3810
JSPlaylist v1.2.0 just released

Changelog:
Playlist Filter added for group patterns
+ Custom Column Color feature added
+ added buttons to sort the playlists
+ fixed crash on expand all (bug brought with v1.1.0)
+ fixed bugs in settings (textboxes focus, mouse cursor...),
+ fixed a bug in custom colors sliders when moved with arrow keys
+ misc bugs fixing and some comestic changes

link

WSH Panel Mod script discussion/help

Reply #3811
Outstanding, Falstaff. Thanks for implementing the filter. 

WSH Panel Mod script discussion/help

Reply #3812
Falstaff,

First, thanks for 1.2.0 of your playlist.

I hope there is an easy answer to this other than the only other long way out of my problem.

I can get 1.2.0 to work if I follow your instruction to clear the properties as you ask but the trouble is I lose my custom group setting (see screenshot in my post above) and the 3 new columns I created.

My question is: Can I reinstate all my custom settings some other way than the long way ie. lots of cutting and pasting?

Am I missing something really obvious?

WSH Panel Mod script discussion/help

Reply #3813
and now for something completely different. i've fixed a long standing annoying bug in WSH panel mod by recompiling it. if people use any of my artist bio or album review scripts (or other scripts that display large chunks of text), they may have noticed stray punctuation not getting wrapped properly. this fixes it...

https://dl.dropboxusercontent.com/u/2280132...h_panel_mod.zip

it requires foobar v1.3 or above because it uses the latest SDK
utils.GetAlbumArt has been removed because the corresponding function has been removed from the foobar SDK.
tested on 7 and 8.1. it doesn't work on XP and i have no idea about vista.


this has now been updated and tested to work with windows XP so obviously all windows OS should now be supported.

WSH Panel Mod script discussion/help

Reply #3814
sorry, but properties in this version 1.2.0 are mostly not compatible with all previous version (that explain i jump version number from 1.1.2 directly to 1.2.0)
normally, properties don't change really, maybe an add or one removed and in this case, Clear is not mandatory, but in v1.2.0 it is.

shouldn't be necesseray in next versions > 1.2.0.

WSH Panel Mod script discussion/help

Reply #3815
Falstaff - Is it possible to remove the  , , ,  placeholders in the ratings column? Prefer to just see the stars. Speaking of which, wouldn't mind the option of changing them to simple dots, too.

WSH Panel Mod script discussion/help

Reply #3816
@falstaff, thanks for the update but would it be possible for the mood column to keep its colour for selected or playing items?



WSH Panel Mod script discussion/help

Reply #3818
i've made another little component update. if you get a script error, that is now reported in the popup window as well as the console.


WSH Panel Mod script discussion/help

Reply #3819
@falstaff, thanks for the update but would it be possible for the mood column to keep its colour for selected or playing items?


ok, done and yes it's better to keep custom color for "graphical" columns regardless of the track state. Columns concerned are Mood, Rating and State.
I will release the update soon.

EDIT: done in v1.2.1 released to fix a big bug when creating a new column, see below...

WSH Panel Mod script discussion/help

Reply #3820
Falstaff,

First I got the playlist working again by cut and paste. Didn't take too long.

Have got 1.2.0 working fine apart from a crash.

I created a custom column and it initially seemed to work now it crashes when it is clicked on in Panel Settings.

Code: [Select]
Error: WSH Panel Mod (JSPlaylist v1.2.0 by Br3tt aka Falstaff >> http://br3tt.deviantart.com): Microsoft JScript runtime error:
Overflow
File: C:\Users\Administrator\AppData\Roaming\foobar2000\wsh_br3tt\jsplaylist\js\WSHsettings.js
Ln: 1289, Col: 13
<source text only available at compile time>



I naturally cannot delete the column either.

WSH Panel Mod script discussion/help

Reply #3821
Falstaff,

First I got the playlist working again by cut and paste. Didn't take too long.

Have got 1.2.0 working fine apart from a crash.

I created a custom column and it initially seemed to work now it crashes when it is clicked on in Panel Settings.

Code: [Select]
Error: WSH Panel Mod (JSPlaylist v1.2.0 by Br3tt aka Falstaff >> http://br3tt.deviantart.com): Microsoft JScript runtime error:
Overflow
File: C:\Users\Administrator\AppData\Roaming\foobar2000\wsh_br3tt\jsplaylist\js\WSHsettings.js
Ln: 1289, Col: 13
<source text only available at compile time>



I naturally cannot delete the column either.


ok, problem reproduced easily, my bad, i will post a fix asap, thanx for reporting

EDIT: fixed in v1.2.1 just released:

for those like Marcus that have encounter the crash after adding a new custom column and that don't want to use the 'Clear properties method' because of their customization just redone, then after having applied the new version, in panel window Properties, just update the property "SYTEM.HeaderBar.TotalColumns from 15 to 14, it will do a logical delete of the previously custom column and then you'll be able to create new ones after properly.

HTH

WSH Panel Mod script discussion/help

Reply #3822
Thanks Falstaff,

I applied 1.2.1 made the change in properties a la the screenshot. But it still crashed.

So I deleted in properties two references to the custom column in

SYSTEM.Headerbar.label  AND
SYSTEM.Headerbar.percent

All works fine now! 


WSH Panel Mod script discussion/help

Reply #3824
marc2003: This paints the icons where I want them:
Code: [Select]
 
p.draw_image(gr, img6, p.w - bs, bh, bs, bs)
    p.draw_image(gr, img3, p.w - 4 - bs * 2, bh, bs, bs)
    p.draw_image(gr, img4, p.w - 8 - bs * 3, bh, bs, bs)
    p.draw_image(gr, img4, p.w - 12 - bs * 4, bh, bs, bs)
    p.draw_image(gr, img, p.w - 16 - bs * 5, bh, bs, bs)
    p.draw_image(gr, img7, p.w - 20 - bs * 6, bh, bs, bs)
    gr.DrawLine(p.w - 25 - bs * 6, 13,p.w - 25 - bs * 6, 0, 1, p.textcolour_hl & 0x45ffffff);
    if (li.lastfm_mode == 0) //similar artists
    {
    p.draw_image(gr, img, p.w - 16 - bs * 8, bh, bs, bs)
    p.draw_image(gr, img, p.w - 20 - bs * 9, bh, bs, bs)
    //p.draw_image(gr, img5, p.w - (bstart + 5 + bs * 4), bh, bs, bs)
    }
    else if (li.lastfm_mode == 3) //top albums
    {
    p.draw_image(gr, img9, p.w - 16 - bs * 8, bh, bs, bs)
    p.draw_image(gr, img10, p.w - 20 - bs * 9, bh, bs, bs)
    p.draw_image(gr, img13, p.w - 24 - bs * 10, bh, bs, bs)
    }
   
    else if (li.lastfm_mode == 4) //top tracks
    {
    p.draw_image(gr, img11, p.w - 16 - bs * 8, bh, bs, bs)
    p.draw_image(gr, img12, p.w - 20 - bs * 9, bh, bs, bs)
    p.draw_image(gr, img13, p.w - 24 - bs * 10, bh, bs, bs)
    }
I want all the paneltype independent-buttons to perform browser searches similar to this:
p.browser("https://www.youtube.com/results?search_query=" + li.header_text().replace(/: top tracks/g, '').replace(/ /g, '+'));
(But I suspect there is a better way than to replace "top tracks" and so on...)

Then, I thought about extra buttons for:
File operations (move selected tracks)
Scan replaygain
Open foo_run? I want to open album art downloader and search for art for current album (the header in the "top album" version, but would need to get artist and directory as well... hmm)
Some "softplaylist" stuff like search for artists top tracks and so on, available in context menu

No idea if these last buttons can even be done here, or if they are better suited for a toolbar... Again, space is important