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 1375476 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

WSH Panel Mod script discussion/help

Reply #4350
@marc2003

There a trick to use custom backgrounds for newest menu button sample?


WSH Panel Mod script discussion/help

Reply #4352
would it be possible to make it so you can change the artist field mapping with the thumbs script? i keep featured artists in the artist tag so using %album artist% for this would be great.

thanks alot for the scripts either way

WSH Panel Mod script discussion/help

Reply #4353
the script should have that feature but i've missed it out. right click the panel>configure. replace

Code: [Select]
var panel = new _.panel("Thumbs", ["metadb", "custom_background"]);


with

Code: [Select]
var panel = new _.panel("Thumbs", ["metadb", "custom_background", "remap"]);

WSH Panel Mod script discussion/help

Reply #4354
Now I'm using Br3tt's foo_Razor Skin after some modification.
There is a toggle script which changes the panel size according "Toggle" state.
I figured out that the panel color can be changed by 'var COLOR_BTNFACE'.
I want to make the color of this panel change between two colors according to the panel size.
For example, for the width=390 : Black, for the width=1 : White.
I'd like to know if this is possible and where I have to change.
Thank you for reading and helping.

Code: [Select]
var COLOR_BTNFACE = 15;
var toggle = window.GetProperty("toggle", false);
var ww = 0, wh = 0;
//var COLOR_BTNFACE = 15;
var g_syscolor = 0;

function get_colors() {
g_syscolor = utils.GetSysColor(COLOR_BTNFACE);
}
get_colors();

// START
function on_size() {
ww = window.Width;
wh = window.Height;
if(toggle) {
window.MinWidth = 390;
window.MaxWidth = 390;
} else {
window.MinWidth = 1;
window.MaxWidth = 1;
};
window.MinHeight = 4;
window.MaxHeight = 4;
}

function on_paint(gr) {
gr.FillSolidRect(0, 0, ww, wh, g_syscolor);
}

function on_mouse_lbtn_up(x, y) {
toggle = !toggle;
window.SetProperty("toggle", toggle);
if(toggle) {
window.MinWidth = 390;
window.MaxWidth = 390;
} else {
window.MinWidth = 1;
window.MaxWidth = 1;
};
}

function on_colors_changed() {
get_colors();
window.Repaint();
}

function on_notify_data(name, info) {
switch(name) {
case "left_pane":
toggle = !toggle;
window.SetProperty("toggle", toggle);
if(toggle) {
window.MinWidth = 390;
window.MaxWidth = 390;
} else {
window.MinWidth = 1;
window.MaxWidth = 1;
};
break;
}
}

function on_mouse_rbtn_up(x, y) {
return true;
}

WSH Panel Mod script discussion/help

Reply #4355
I'm modifying a display panel and I was wondering if anyone can help me find the proper tags to display encoding (lossless), bitspersampe (IE 16 /24).

I'm using commands like:

}

Info.prototype.setBitrate = function() {
   this.Bitrate = fb.TitleFormat("%bitrate%").Eval();
}

Tags like "bitrate", "samplerate" and "codec" display fine.  But "encoding" and "bitspersample" do not. Are there other official terms for these tags?

Thanks


WSH Panel Mod script discussion/help

Reply #4357
Thanks. But to answer my own question, I figured it out:

}

Info.prototype.setBitrate = function() {
this.Bitrate = fb.TitleFormat("$info(bitspersample)").Eval();
}

You'd think it would be "%bitspersample%", but no...it couldn't be THAT easy.  Same thing applies to encoding. (Although oddly, encoding displays as lower case only)

WSH Panel Mod script discussion/help

Reply #4358
Is there a way to force a font to display uppercase only? IE: Getting "lossless" to display as "LOSSLESS".

WSH Panel Mod script discussion/help

Reply #4359
Is there a way to force a font to display uppercase only? IE: Getting "lossless" to display as "LOSSLESS".


Never mind.  To get upper, you would go: $upper($info(encoding))

WSH Panel Mod script discussion/help

Reply #4360
@marc2003

How painful would it be to parse embedded images with the thumbs script? Noticed Falstaff's CoverFlow displays them and was wondering if this could as well.

WSH Panel Mod script discussion/help

Reply #4361
i've not tested it because i can't be bothered to embed any art but this should work. open thumbs.js in a decent text editor and find this...

Code: [Select]
this.images = _.map(this.files, _.img);


insert this directly after it...

Code: [Select]
var tmp = utils.GetAlbumArtEmbedded(panel.metadb.RawPath, 4); //4 assumes you want the artist image
if (tmp) {
    this.files.unshift(panel.metadb.Path);
    this.images.unshift(tmp);
}


unshift puts the embedded image first. if you want it last, use push instead.

WSH Panel Mod script discussion/help

Reply #4362
Hi, i'm getting this error when trying to import library with lastfm playcount sync

Quote
Last.fm Playcount Sync: {"error":26,"message":"API Key Suspended - This application is not allowed to make requests to the web services"}


any help?

WSH Panel Mod script discussion/help

Reply #4363
where to begin....

that api key is no longer valid.
last.fm are not allowing anyone to register for a new api key.
even if you did have an api key, the import doesn't even work any more

WSH Panel Mod script discussion/help

Reply #4364
Hi marc2003, how do I set the background colour in the rating panel? I can't figure it out. Thanks!

WSH Panel Mod script discussion/help

Reply #4365
i did add "custom_background" as an option but i forgot to include this function which is needed for it to work.

Code: [Select]
function on_mouse_rbtn_up(x, y) {
    return panel.rbtn_up(x, y);
}


just paste it at the end inside the panel.


WSH Panel Mod script discussion/help

Reply #4366
Do you have a legend for this?

Code: [Select]
 var tmp = utils.GetAlbumArtEmbedded(panel.metadb.RawPath, 4); //4 assumes you want the artist image


EG: cycle through all types embedded if that is enabled.

Mainly interested in cover & artist but not sure what the key for each is.

WSH Panel Mod script discussion/help

Reply #4367
check flags.txt inside the docs folder. but if you just want the front, it's 0.

WSH Panel Mod script discussion/help

Reply #4368
Can it be variable? If (any) present = display.

WSH Panel Mod script discussion/help

Reply #4369
do you really think the answer to that question could be no?

WSH Panel Mod script discussion/help

Reply #4370
Sorry, man. Just asking. Not sure where to look for an example that allows it go both ways.

EG: two panels > one displays embedded (say cover) > one uses embedded artist image without conflicting

edit: clarified example

WSH Panel Mod script discussion/help

Reply #4371
just use an artwork panel?? check file>preferences>advanced>display>album art>embedded vs external.

WSH Panel Mod script discussion/help

Reply #4372
Yeah, I could do that. I like how your script centers the image is all. Mostly it was just curiosity if it could done as a fallback method if encountered.

Thanks.

edit: Just because.


WSH Panel Mod script discussion/help

Reply #4373
you can modify the album art script so it has borders around the edge. replace

Code: [Select]
function on_size() {
    panel.size();
    albumart.w = panel.w;
    albumart.h = panel.h;
}


with

Code: [Select]
function on_size() {
    panel.size();
    albumart.x = albumart.y = 20;
    albumart.w = panel.w - 40;
    albumart.h = panel.h - 40;
}


WSH Panel Mod script discussion/help

Reply #4374
where to begin....

that api key is no longer valid.
last.fm are not allowing anyone to register for a new api key.
even if you did have an api key, the import doesn't even work any more
I see. Anyway any chance to get this script working again?

Code: [Select]
//show if a track is loved
$ifequal(%LASTFM_LOVED_DB%,1,♥,)