Skip to main content

Topic: WSH Panel Mod script discussion/help (Read 840301 times) previous topic - next topic

0 Members and 1 Guest are viewing this topic.
  • kjllmeplz
  • [*]
WSH Panel Mod script discussion/help
Reply #2175
marc2003

Thanks for the hard work.

btw, could you make more options in displaying artist picture in your thumbs script, like keep aspect raito(centre), stretch, not only crop ?

  • NEMO7538
  • [*][*][*][*][*]
  • Developer
WSH Panel Mod script discussion/help
Reply #2176
@Marc
I tried your scripts (thumbs, np last fm+wikipedia) on a machine that I stream to using foo_upnp as a renderer.
While the scripts are working well on the machine that i stream from (upnp server + controler), on the renderer i do not see any artist images (only the text and the album art appear in n.p. script and nothing appears in thumbs).

Note:
  • I can see that folders inside the wsh_lastfm directory are created on the target machine, with the "artist get info" and "echonext" json files but no images.
  • If I use the standard lastfm bio plugin (foo_uie_biography), it shows images.


Do you have any idea? Thanks.

  • marc2003
  • [*][*][*][*][*]
WSH Panel Mod script discussion/help
Reply #2177
@kjllmeplz, i'll have a look into it.

@NEMO7538, as the script is obviously getting artist metadata ok for the other parts of the script to work, perhaps it's the art.exe program that i bundle that's not working? can you browse the marc2003 folder and run it from a command prompt? it will tell you the parameters it needs and you can try something manually.

  • marc2003
  • [*][*][*][*][*]
WSH Panel Mod script discussion/help
Reply #2178
@NEMO7538, i completely forgot to mention checking the automatic download options on the context menu first.  by default, it only automatically downloads images for tracks that are monitored as part of your library (and have no images existing already). you can change this to all tracks.

the manual trigger should always work regardless of this setting.

@kjllmeplz, done. https://dl.dropbox.com/u/22801321/samples.zip

thumbs and all now playing scripts have these options. the scripts in the panels need updating though.

files changed:
Code: [Select]
marc2003\common6.js
samples\now playing with track list.txt
samples\now playing with last.fm & wikipedia biography.txt
samples\now playing.txt
samples\thumbs.txt

  • Last Edit: 27 March, 2013, 07:36:54 AM by marc2003

  • NEMO7538
  • [*][*][*][*][*]
  • Developer
WSH Panel Mod script discussion/help
Reply #2179
Thanks .... I'll have a look but unfortunately the context menu doe not work (on both machines). When I right click I only get "Properties" and "Configure" ....

  • marc2003
  • [*][*][*][*][*]
WSH Panel Mod script discussion/help
Reply #2180
the context menu not working is a new one for me. i cannot fathom how that could even be possible. it's not even part of the script that goes in the panel. it's all handled by my common file (the imported script in the preprocessor section).

accessing the properties dialog bypasses most of the context menu options - if you know what to set. setting image_auto_download to all would at least get automatic downloads going.
  • Last Edit: 27 March, 2013, 08:00:02 AM by marc2003

  • kjllmeplz
  • [*]
WSH Panel Mod script discussion/help
Reply #2181
marc2003

thank you so much! you are the best

  • marc2003
  • [*][*][*][*][*]
WSH Panel Mod script discussion/help
Reply #2182
samples updated: use right click>Update script or the full download is here. https://dl.dropbox.com/u/22801321/samples.zip

thumbs: bugfix. right aligned thumbs would not always scroll properly.

and a reminder to anyone using thumbs or any now playing scripts and are finding the new crop/centre/stretch options have no effect. this means you need to download the latest zip and re-import the script.

  • marc2003
  • [*][*][*][*][*]
WSH Panel Mod script discussion/help
Reply #2183
ooh another update. this time i've added more options to allow you to filter and display release type on my musicbrainz script.



files changed:
Code: [Select]
marc2003\common6.js


right click>Update script should work for most people but the full download link is in the post above.

  • ruebe
  • [*][*][*]
WSH Panel Mod script discussion/help
Reply #2184
awesome, two thumbs up!

  • marc2003
  • [*][*][*][*][*]
WSH Panel Mod script discussion/help
Reply #2185
oh yay, another update.   

this applies to all scripts that use artist metadata to perform lookups online. bugfix: do not try to search with blank/missing tags. 

just right click any one>Update script.

  • NEMO7538
  • [*][*][*][*][*]
  • Developer
WSH Panel Mod script discussion/help
Reply #2186
the context menu not working is a new one for me. i cannot fathom how that could even be possible. it's not even part of the script that goes in the panel. it's all handled by my common file (the imported script in the preprocessor section).

Nevermind ... I got the latest version of foo_uie_wsh_panel_mod and it works.
Now what about if I want to directly access the properties and manually change some parameters (e.g. set the download limit to 6 images) ?

  • marc2003
  • [*][*][*][*][*]
WSH Panel Mod script discussion/help
Reply #2187
have you not seen the Limit option on the context menu? from there you can set 1,3,5,10 or 20.

you can of course edit the properties if you really must have 6. image_limit is the one you want.
  • Last Edit: 28 March, 2013, 06:13:42 PM by marc2003

  • NEMO7538
  • [*][*][*][*][*]
  • Developer
WSH Panel Mod script discussion/help
Reply #2188
have you not seen the Limit option on the context menu? from there you can set 1,3,5,10 or 20.

you can of course edit the properties if you really must have 6. image_limit is the one you want.

Yes I have seen it but how do I access the properties?
Edit: Using the Layout Editing mode ...
  • Last Edit: 28 March, 2013, 06:26:58 PM by NEMO7538

  • marc2003
  • [*][*][*][*][*]
WSH Panel Mod script discussion/help
Reply #2189
hold shift when you right click.

i hide it for most people because all settings are usually set via the context menu. the one exception being the tweaking of numerical values such as the limit.

  • NEMO7538
  • [*][*][*][*][*]
  • Developer
WSH Panel Mod script discussion/help
Reply #2190
Thanks Marc for your hard work .... Some comments below:
  • Sometimes it seems that artist pictures do not show up immediately, I have to manually "Re-scan folder" to have them appear. I guess it takes some time when requesting several images at once (or one after the other ?)
  • What happens if I have several panels within tabs (eg. Now Playing + thumbs), will the source be queried several times or is there some sort of optimization


  • marc2003
  • [*][*][*][*][*]
WSH Panel Mod script discussion/help
Reply #2191
you shouldn't have to re-scan the folder. it does refresh automatically when downloading is complete. it can take awhile depending on how last.fm is behaving. sometimes it's pretty much instant, other times it can take 5 seconds+.

and there was no optimisation. in your case, it would lookup twice as those panels are independent of each other. however, i've just added in panel notifications. if you Update script, restart when prompted and then turn off automatic download in all panels but one, the "downloading" one should now notify others when downloading is complete.
  • Last Edit: 29 March, 2013, 04:57:19 AM by marc2003

  • marc2003
  • [*][*][*][*][*]
WSH Panel Mod script discussion/help
Reply #2192
a few more bugfixes:

simple text reader / simple tag reader: fix crash if tag/filename input dialog is left blank.
simple text reader: fix font size not working on fixed width font.
last.fm similar artists: spotify buttons did not work properly if it was set to pause foobar before launching. i think this was reported before and i thought i'd fixed it but i just stumbled across it again realising i hadn't fixed it at all. 

for those, a simple right click>Update script will do.

full download is here: https://dl.dropbox.com/u/22801321/samples.zip

  • Bratman
  • [*][*][*]
WSH Panel Mod script discussion/help
Reply #2193
Oh sweet I found the properties dialog using shift, now I can set the thumb size to fit my layout perfectly, awesome stuff.

  • derty2
  • [*][*][*][*][*]
WSH Panel Mod script discussion/help
Reply #2194
marc2003

your vinyl turntable script has eventually decided to crash again (using your tracing code modification at Post #2160).

Here is the console output:
Quote
. . .
Opening track for playback: "F:\music\lib\rock\iggy pop and the stooges\(1973) raw power\vinyl - columbia kc 32111, usa\02. gimme danger.flac"
image:0
nw: 0
nh: 0
object
Error: WSH Panel Mod ({40845811-E334-4CB0-B4C5-DE5B1B33E36F}): Microsoft JScript runtime error:
Object required
File: <main>
Ln: 170, Col: 9
<source text only available at compile time>
. . .

Here is line 170 (red) in my script:
Quote
function calc() {
    if (!img) return;
    for (i = 0; i < images.length; i++) {
        try { images.Dispose(); } catch(e) {}
    }
    images = [];
    try {
        for (i = 0; i < 36; i ++) {
            images = gdi.CreateImage(nw,  nh);
            var temp_gr = images.GetGraphics();
            temp_gr.SetInterpolationMode(6);
            temp_gr.DrawImage(bg, 0, 0, nw, nh, 0, 0, bg.width, bg.height);
            temp_gr.DrawImage(img, disc_x, disc_y, disc_size, disc_size, 0, 0, img.Width, img.Height, i * 10);
            images.ReleaseGraphics(temp_gr);
            temp_gr = null;
        }
    } catch(e) {
        fb.trace("image:" + i);
        fb.trace("nw: " + nw);
        fb.trace("nh: " + nh);
        fb.trace(typeof images);
        fb.trace("width: " + images.Width);
        fb.trace("height: " + images.Height);
    }
}

I went to the containing folder of the track and there is no "disc.jpg", therefore (if no error) default disc should have been used.
I right-clicked the crashed panel, went to the "WSH Panel Mod Configuration" window, clicked the "Apply" button . . . . . and the panel started working again.
  • Last Edit: 29 March, 2013, 07:19:03 PM by derty2

  • marc2003
  • [*][*][*][*][*]
WSH Panel Mod script discussion/help
Reply #2195
hasn't the novelty worn off yet? 

try this updated version... https://dl.dropbox.com/u/22801321/2013/march/turntable.txt


  • derty2
  • [*][*][*][*][*]
WSH Panel Mod script discussion/help
Reply #2196
marc2003

That is an EXCELLENT update of your turntable script!

-It works slightly faster than the previous script!
-Freezing is no longer perceptible if choosing another track from the same containing folder!
-Console reports nothing irregular!

Brilliant work mate ++++++++++++
 
 
 
        > hasn't the novelty worn off yet? ...

I think these guys need your advice more than I do: "The Prisoner Appreciation Society"

Who/What is TPAS?
They are fanatical fans of the 1967 British TV series "The Prisoner" . . . . Only one season and 17 episodes were ever made,
yet these fans meet up once a year at the same location where the series was made and re-enact scenes from the show,
and they have not stopped doing this since 1967 !!!! 

  • marc2003
  • [*][*][*][*][*]
WSH Panel Mod script discussion/help
Reply #2197
i think you're experiencing good old placebo. the changes were very minor.

Quote
-It works slightly faster than the previous script!


if playback is running when the panel is loaded, i've actually increased the delay from 200ms to 300ms so it's slower to load the first image. the difference is negligible but it ain't faster. and there is no change in the code when switching albums. the freeze is still very noticeable.

Quote
-Freezing is no longer perceptible if choosing another track from the same containing folder!


i'm not sure what you mean. it still uses %album% as the title formatting to trigger a change.  there was never any freezing when switching tracks with the same %album% tag. but as mentioned above, the freeze is most definitely still there when albums change.

Quote
-Console reports nothing irregular!


well to be fair the old one only crashed for you twice (well that's what you've reported anyway). it could happen to this one still.

the thing that proved useful from the debugging message you posted was the values of nw and nh which were 0. these should get set on startup and will change if you resize the panel. i've put in some checking to make sure it does not attempt to create any images if those values are 0. i'm hoping it won't crash but as it's not been possible to reliably reproduce it, there's no way i can test for sure.
  • Last Edit: 30 March, 2013, 03:40:41 AM by marc2003

  • marc2003
  • [*][*][*][*][*]
WSH Panel Mod script discussion/help
Reply #2198
i've updated my now playing script. you can now toggle various elements on or off via the context menu. because displaying an artist bio is now optional, i've ditched the separate script i had for that.

here are 2 instances running side by side: screenshot

https://dl.dropbox.com/u/22801321/samples.zip

files changed:
Code: [Select]
marc2003\common6.js
samples\now playing.txt
samples\now playing with last.fm & wikipedia biography <<deleted

  • marc2003
  • [*][*][*][*][*]
WSH Panel Mod script discussion/help
Reply #2199
i stupidly bodged the now playing.txt file in my previous update. the fixed version is in the zip from the post above.

(one of the settings wasn't loaded properly on startup. not serious but could be puzzling/annoying )