IPB

Welcome Guest ( Log In | Register )

129 Pages V  « < 88 89 90 91 92 > »   
Reply to this topicStart new topic
WSH Panel Mod script discussion/help
marc2003
post Apr 2 2013, 23:06
Post #2226





Group: Members
Posts: 4581
Joined: 27-January 05
From: England
Member No.: 19379



you could argue my scripts loading a shared file into memory for every panel is wasteful when most of the code won't be used. but in the grand scheme of things, it doesn't really matter. for me, it's made my life easier to manage them all as i have over 20 now.

only you can answer the question about improving yours. if they do what you need already then leave them be. i wouldn't lock panel sizes on scripts you share though. some people might find that undesirable.
Go to the top of the page
+Quote Post
ruebe
post Apr 3 2013, 11:42
Post #2227





Group: Members
Posts: 187
Joined: 18-September 10
Member No.: 83940



@marc: i was toying around with your now playing script and stumbled upon background > splitter
i don't get the usage point of it...in DUI that is...is this something that's only supposed to be useful for panel stack splitter? if not, what's the point i'm missing?
Go to the top of the page
+Quote Post
marc2003
post Apr 3 2013, 11:54
Post #2228





Group: Members
Posts: 4581
Joined: 27-January 05
From: England
Member No.: 19379



the Background menu is shared between many scripts and the splitter option is mainly useful for button scripts like this....



it's a system colour and it's meant to blend in with the standard look. it will change if you use a 3rd party windows theme.

This post has been edited by marc2003: Apr 3 2013, 11:55
Go to the top of the page
+Quote Post
ruebe
post Apr 3 2013, 16:12
Post #2229





Group: Members
Posts: 187
Joined: 18-September 10
Member No.: 83940



ah, okay, i get it now

once more, thx for all your scripts!
Go to the top of the page
+Quote Post
marc2003
post Apr 3 2013, 19:09
Post #2230





Group: Members
Posts: 4581
Joined: 27-January 05
From: England
Member No.: 19379



samples updated: right click>Update script will only work for those people using the new full update from yesterday (2nd april)

full download: https://dl.dropbox.com/u/22801321/samples.zip
changelog: https://dl.dropbox.com/u/22801321/wsh/changelog.txt
Go to the top of the page
+Quote Post
carlito95
post Apr 4 2013, 21:28
Post #2231





Group: Members
Posts: 5
Joined: 21-September 12
Member No.: 103298



I've been using my own modded MNLT2 theme (all I did was change the colors, font and added a filter panel) for several months now, and now the WSH panel with the progress bar starts crashing everytime I start playing a song. I've tried starting from a fresh download of the skin and re-changed the colors/fonts and added the filter bar and it works fine for the duration my computer is on, but when I turn it on the next day and open up foobar, the progress bar just crashes again. I haven't actually started messing with WSH for myself, but does anyone have an idea of what could be causing this? Thanks in advance.
Go to the top of the page
+Quote Post
marc2003
post Apr 4 2013, 21:49
Post #2232





Group: Members
Posts: 4581
Joined: 27-January 05
From: England
Member No.: 19379



do you have any idea how useless your report is? dry.gif

checking the foobar console and posting the offending errors/code would be a start.

This post has been edited by marc2003: Apr 4 2013, 21:49
Go to the top of the page
+Quote Post
derty2
post Apr 7 2013, 14:40
Post #2233





Group: Members
Posts: 583
Joined: 5-June 11
Member No.: 91257



marc2003

I am still enjoying your WSH Vinyl Turntable script; the novelty hasn't worn off . . . mainly because I am a die-hard vinyl freak. It's purring along nicely; It looks like you permanently solved the crashing issue.

If I was a CD freak, I wouldn't be asking you this question . . . however vinyl records are different; they contain more than one label.

If you have ripped a vinyl record, you have ripped two sides and each label is different. Therefore for every track using disc.jpg, there should actually be a choice between disc1.jpg or disc2.jpg representing side1 and side2 of the record.

For all my vinyl rips, I was thinking of modifying the %tracknumber% tag to have multiple values like these examples:

This is 1 vinyl record — it has 4 tracks , 2 are on side1 , 2 are on side2 — here is the %tracknumber% tags:
QUOTE
01;1
02;1
03;2
04;2

This is 2 vinyl records (a 2-LP album) — it has 8 tracks , 2 are on side1 , 2 are on side2 , 2 are on side3 , 2 are on side4 — here is the %tracknumber% tags:
QUOTE
01;1
02;1
03;2
04;2
05;3
06;3
07;4
08;4


As you can see, the second value in the tracknumber tag is a number representing a side of a record.
How can your script be modified to flag this tag value and choose the appropriate image from   disc1.jpg | disc2.jpg | disc3.jpg| ... | disc(n).jpg

Thanks.
Go to the top of the page
+Quote Post
marc2003
post Apr 7 2013, 15:08
Post #2234





Group: Members
Posts: 4581
Joined: 27-January 05
From: England
Member No.: 19379



you shouldn't need to modify the script. this should be set in the main foobar2000 artwork preferences dialog.

CODE
disc[%discnumber%].jpg
Go to the top of the page
+Quote Post
derty2
post Apr 7 2013, 16:15
Post #2235





Group: Members
Posts: 583
Joined: 5-June 11
Member No.: 91257



marc

I changed foobar200 artwork preferences for disc exactly as you specified.
I set up a test album . . . some tracks were tagged with %discnumber% value 1, some tracks were tagged with %discnumber% value 2.
Your WSH Turntable panel did not refresh to disc2 at any time . . . "play this, stop, play that" actions had no effect; it continued to play disc1 at all times.
Actually previous line is not totally true . . . If I play a track from another album and then go back to the test album and play a track, the panel will refresh.

This post has been edited by derty2: Apr 7 2013, 16:19
Go to the top of the page
+Quote Post
marc2003
post Apr 7 2013, 16:19
Post #2236





Group: Members
Posts: 4581
Joined: 27-January 05
From: England
Member No.: 19379



oops, i forgot to mention you'll need to edit what triggers a change. change %album% on line56 to whatever you like. just adding %discnumber% should be sufficient.

Go to the top of the page
+Quote Post
derty2
post Apr 7 2013, 16:31
Post #2237





Group: Members
Posts: 583
Joined: 5-June 11
Member No.: 91257



you are referring to the item here in red I presume?:
QUOTE
function on_playback_new_track() {
        metadb = fb.GetNowPlaying();
        if (!metadb) return;
        var temp_album = fb.TitleFormat("%album%").EvalWithMetadb(metadb);
        if (temp_album == album) return;
        album = temp_album;
        img = utils.GetAlbumArtV2(metadb, id);
        if (img) {
                mask();
                calc();
        }
        window.Repaint();
}



Yeah, it worked . . . . thanks +++++++

This post has been edited by derty2: Apr 7 2013, 16:34
Go to the top of the page
+Quote Post
marc2003
post Apr 7 2013, 16:37
Post #2238





Group: Members
Posts: 4581
Joined: 27-January 05
From: England
Member No.: 19379



you presume right. i'm not sure why you had to ask.
Go to the top of the page
+Quote Post
derty2
post Apr 7 2013, 17:03
Post #2239





Group: Members
Posts: 583
Joined: 5-June 11
Member No.: 91257



it's more educational for everyone viewing tongue.gif
Go to the top of the page
+Quote Post
derty2
post Apr 7 2013, 17:19
Post #2240





Group: Members
Posts: 583
Joined: 5-June 11
Member No.: 91257



marc
it still has a small problem . . .
if i change to an album containing one disc.jpg and no %discnumber% tag filled, then the default disc image will show (rather than disc.jpg at track location).

*EDIT*

I think I fixed it by changing this item (in red) in the script from this:
QUOTE
var temp_album = fb.TitleFormat("%discnumber%").EvalWithMetadb(metadb);

to this:
QUOTE
var temp_album = fb.TitleFormat("$if2(%discnumber%,%album%)").EvalWithMetadb(metadb);


This post has been edited by derty2: Apr 7 2013, 17:27
Go to the top of the page
+Quote Post
marc2003
post Apr 7 2013, 17:32
Post #2241





Group: Members
Posts: 4581
Joined: 27-January 05
From: England
Member No.: 19379



you're getting it all mixed up. first of all, i said you should add %discnumber% to the %album% string. with your code, it won't update when switching albums if the %discnumber% remains the same.

QUOTE
then the default disc image will show (rather than disc.jpg at track location)


this is dictated by what is set in the artwork preferences and what i already gave you should account for that.

CODE
disc[%discnumber%].jpg
Go to the top of the page
+Quote Post
derty2
post Apr 7 2013, 17:37
Post #2242





Group: Members
Posts: 583
Joined: 5-June 11
Member No.: 91257



now you've got me confused. . .

> i said you should add %discnumber% to the %album% string . . .

please show me the exact code line which is correct in your eyes, thanks.
Go to the top of the page
+Quote Post
marc2003
post Apr 7 2013, 17:43
Post #2243





Group: Members
Posts: 4581
Joined: 27-January 05
From: England
Member No.: 19379



this is what i said.

QUOTE (marc2003 @ Apr 7 2013, 16:19) *
change %album% on line56 to whatever you like. just adding %discnumber% should be sufficient.


original code on line56:

CODE
var temp_album = fb.TitleFormat("%album%").EvalWithMetadb(metadb);


add %discnumber%

CODE
var temp_album = fb.TitleFormat("%album%%discnumber%").EvalWithMetadb(metadb);


stop me if i'm going too fast...
Go to the top of the page
+Quote Post
derty2
post Apr 7 2013, 17:47
Post #2244





Group: Members
Posts: 583
Joined: 5-June 11
Member No.: 91257



penny has dropped . . . . thanks ++++++
Go to the top of the page
+Quote Post
marc2003
post Apr 7 2013, 17:52
Post #2245





Group: Members
Posts: 4581
Joined: 27-January 05
From: England
Member No.: 19379



i suppose i should have put discnumber in the original script but because all my multi-disc CD rips have the same art, i didn't think to do that. i've updated it now:

script: https://dl.dropbox.com/u/22801321/2013/march/turntable.txt
turntable image: https://dl.dropbox.com/u/22801321/2013/march/turntable.jpg
Go to the top of the page
+Quote Post
Falstaff
post Apr 7 2013, 20:49
Post #2246





Group: Members
Posts: 2800
Joined: 12-November 06
Member No.: 37463



QUOTE (derty2 @ Apr 7 2013, 17:31) *
you are referring to the item here in red I presume?:
QUOTE
function on_playback_new_track() {
        metadb = fb.GetNowPlaying();
        if (!metadb) return;
        var temp_album = fb.TitleFormat("%album%").EvalWithMetadb(metadb);
        if (temp_album == album) return;
        album = temp_album;
        img = utils.GetAlbumArtV2(metadb, id);
        if (img) {
                mask();
                calc();
        }
        window.Repaint();
}



Yeah, it worked . . . . thanks +++++++


just FYI, no need to grab the metadb of the playing item in this function, because you have it in input argument, so simply add it in args and remove the first line :

QUOTE
function on_playback_new_track(metadb) {
metadb = fb.GetNowPlaying();
if (!metadb) return;
var temp_album = fb.TitleFormat("%album%").EvalWithMetadb(metadb);
if (temp_album == album) return;
album = temp_album;
img = utils.GetAlbumArtV2(metadb, id);
if (img) {
mask();
calc();
}
window.Repaint();
}


wink.gif

EDIT: typo

This post has been edited by Falstaff: Apr 7 2013, 20:50


--------------------
http://br3tt.online.fr/
Go to the top of the page
+Quote Post
marc2003
post Apr 7 2013, 21:21
Post #2247





Group: Members
Posts: 4581
Joined: 27-January 05
From: England
Member No.: 19379



given the absolutely horrible performance of this script on album change, i don't think this change will make much difference. but thanks anyway. tongue.gif
Go to the top of the page
+Quote Post
Falstaff
post Apr 7 2013, 22:44
Post #2248





Group: Members
Posts: 2800
Joined: 12-November 06
Member No.: 37463



QUOTE (marc2003 @ Apr 7 2013, 18:52) *
i suppose i should have put discnumber in the original script but because all my multi-disc CD rips have the same art, i didn't think to do that. i've updated it now:

script: https://dl.dropbox.com/u/22801321/2013/march/turntable.txt
turntable image: https://dl.dropbox.com/u/22801321/2013/march/turntable.jpg


does this do something? i haven't followed previous discussion about it but just pasted in a WSH panel Mod with image set in the right folder, nothing happens on new track playing ... ?

asking to quickly, id set to 2 = cd image, i've none wink.gif better with id = 0 for me...

This post has been edited by Falstaff: Apr 7 2013, 22:48


--------------------
http://br3tt.online.fr/
Go to the top of the page
+Quote Post
derty2
post Apr 8 2013, 03:49
Post #2249





Group: Members
Posts: 583
Joined: 5-June 11
Member No.: 91257



Falstaff
marc2003 forgot to share one more image . . . default disc when no 'disc.jpg' exists for the album, giving the effect of an empty spinning turntable platter:

empty platter image (click to see/copy full size):        
Go to the top of the page
+Quote Post
marc2003
post Apr 8 2013, 23:35
Post #2250





Group: Members
Posts: 4581
Joined: 27-January 05
From: England
Member No.: 19379



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

new script: small web links

description from the full changelog: https://dl.dropbox.com/u/22801321/wsh/changelog.txt

CODE
08.04.2013.01

NEW: "Small Web Links"

     Unlike my old "Web Links" which generates 5 buttons
     based on track metadata, this new script uses the same
     backend as my "Musicbrainz" script to fetch real links.
     Unlike my "Musicbrainz" script which displayed a list
     of wesbites, this displays a more compact row of
     buttons. The most common wesbites have familiar logos.
     For ones that don't, you'll see a tooltip
     when hovering your mouse. If already using the "Musicbrainz"
     script in "links" mode, it should be removed (or kept in
     "releases" mode). Lastly, it can take a second or two
     for buttons to appear on artists that haven't been played
     before due to background web requests that have to be made.




files changed:
CODE
marc2003\common7.js
samples\small web links.txt


edit: it would help if i put the file in the zip. done. rolleyes.gif
edit2: rewrote changelog.

This post has been edited by marc2003: Apr 9 2013, 00:15
Go to the top of the page
+Quote Post

129 Pages V  « < 88 89 90 91 92 > » 
Reply to this topicStart new topic
2 User(s) are reading this topic (1 Guests and 1 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 21st October 2014 - 21:17