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: folder.jpg code problem in 'foo uie graphical browser' (Read 3609 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

folder.jpg code problem in 'foo uie graphical browser'

I've searched and searched on this one and have come up empty.  I've been playing with 2 FB2K builds, Xchange 360 and Nocturne from a couple folks over at DeviantArt that involve either FB2K title formatting or scripting of some sort I'm not familiar with.  And from what I can make out, they're putting their code into 'foo uie graphical browser' panels.

My problem is where the code $puts() is looking for the album art file folder.jpg.  My album art files are named with the value of the %album% ID3 tag in all my album folders, and I can't figure out if it's possible to change the code to have the $puts() variable recognize all my differently named album art files.  Just replacing folder.jpg in the script with %album%.jpg doesn't seem to be something that the variable wants to see.

Here's the code for Xchange 360's right sidebar that's looking for the folder.jpg file. The line '$puts(kcp,$replace(%path%,%filename_ext%,)front.jpg)' near the top seems to be my problem:

Code: [Select]
$puts(img,'./skins/xchange')

//
// Cover Art Path ----<
//

$puts(kcp,$replace(%path%,%filename_ext%,)front.jpg)

//
// Cover Art Path ---->
//

$gp_set_text_rendering_hint(ct)
$gp_set_font(Tahoma,9,n)
$gp_set_string_format(center,center)

// COVER

$set_pen(045-045-050)
$set_brush(0-0-0)
$round_rect(3,2,$sub(%gb_width%,5),$sub(%gb_height%,4),6,6)

$if(%gb_mouse_over%,
    $if(%gb_isplaying%,
        $if2($draw_image(8,8,76,75,$get(kcp),255,nokeepaspect),
            $gp_set_font(Tahoma,8,n)
            $gp_set_brush(ffd0d0d0)
            $gp_draw_string(%album artist%$char(10)%album%$char(10)$ifgreater(%totaldiscs%,1,'(disc '%discnumber%')',),8,8,$eval(%gb_width%-15),$eval(%gb_height%-15))
        )
        $draw_image(1,1,90,89,$get(img)'/bg/gb_playingh.png',255,)
    ,
        $if2($draw_image(2,2,87,86,$get(kcp),255,nokeepaspect),
            $set_pen(035-035-035)
            $set_brush(0-0-0)
            $round_rect(2,2,$sub(%gb_width%,4),$sub(%gb_height%,4),5,5)
            $gp_set_brush(ffd0d0d0)
            $gp_draw_string(%album artist%$char(10)%album%$char(10)$ifgreater(%totaldiscs%,1,'(disc '%discnumber%')',),5,5,$eval(%gb_width%-9),$eval(%gb_height%-9))
        )
        $draw_image(1,1,90,89,$get(img)'/bg/gb_hover.png',255,)
    )
,
    $if(%gb_isplaying%,
        $if2($draw_image(8,8,76,75,$get(kcp),255,nokeepaspect),
            $gp_set_font(Tahoma,8,n)
            $gp_set_brush(fff0f0f0)
            $gp_draw_string(%album artist%$char(10)%album%$char(10)$ifgreater(%totaldiscs%,1,'(disc '%discnumber%')',),8,8,$eval(%gb_width%-15),$eval(%gb_height%-15))
        )
        $draw_image(1,1,90,89,$get(img)'/bg/gb_playing.png',255,)
    ,
        $if2($draw_image(4,4,84,83,$get(kcp),120,nokeepaspect),
            $gp_set_brush(ff404040)
            $gp_draw_string(%album artist%$char(10)%album%$char(10)$ifgreater(%totaldiscs%,1,'(disc '%discnumber%')',),5,5,$eval(%gb_width%-9),$eval(%gb_height%-9))
        )
    )
)

$if(%gb_focused%,
    $if(%gb_isplaying%,
    ,
        $draw_image(1,1,90,89,$get(img)'/bg/gb_focus.png',255,)
    )
,)


Could someone more familiar with scripting tell me if this might be something that a simple change in code can address, or not.

Thanks folks
Geopoliticus Child Watching the Birth of the New Man

folder.jpg code problem in 'foo uie graphical browser'

Reply #1
Just replacing folder.jpg in the script with %album%.jpg doesn't seem to be something that the variable wants to see.


there's no reason why this shouldn't work for the majority of your albums. just consider that some of your album tags could contain characters that are illegal in windows filenames and these will not show.

folder.jpg code problem in 'foo uie graphical browser'

Reply #2
there's no reason why this shouldn't work for the majority of your albums.

Well that's embarrassing.  I retyped that into the settings script again, and found the script window actually pops up a drop-down menu with %album% listed there among other common tags.  Set it, clicked out, and yes... there's the cover art.  I have no idea what I had done at least a few times without getting that to work.

Thanks marc2003... I feel like I've just asked how to light a skyrocket fuse, and got the answer from a rocket scientist.
Geopoliticus Child Watching the Birth of the New Man

folder.jpg code problem in 'foo uie graphical browser'

Reply #3
Ran into a couple problems. 

The 1st was an easy fix. I have some cover art files in the gif file format.  That was easy enough to fix by just changing the value of: %album%.jpg to %album%.* in the script.

Code: [Select]
$puts(kcp,$replace(%path%,%filename_ext%,)%album%.*)

But I ran into a group of classical albums I've ripped that are all part of one big 60 CD 'box set.'  The %album% tags for each designate the CD#, Total CD#, and the catalog number of the composer's works (BWV, KV, RV etc.). For those, instead of renaming copies of the same jpg cover art file or each album, I just used the folder.jpg format, and copied the same file to each album folder.  Seems I've done this for other groups of recordings too.

But now I see no way to modify the album art script to recognize both %album%.* AND folder.jpg.  I'm not a total newb at FB2K title formatting, but I can't see a solution here. 

Ideas?
Geopoliticus Child Watching the Birth of the New Man

folder.jpg code problem in 'foo uie graphical browser'

Reply #4
assuming you have just one image in each folder...
Code: [Select]
*.*


to be honest, i don't even know why you're using %album% as the filename. i'd use front/cover.jpg as it's just easier. i'd avoid the use of folder.jpg because it's possible to overwrite them with shitty little thumbnails if you open WMP without changing certain settings first.

folder.jpg code problem in 'foo uie graphical browser'

Reply #5
assuming you have just one image in each folder...
Code: [Select]
*.*

That would work if I hadn't been putting back.jpg files in the same folders with folder.jpg files and audio files.

Quote
to be honest, i don't even know why you're using %album% as the filename. i'd use front/cover.jpg as it's just easier.

Well, at some point I do need to go through my entire audio library and reorganize everything.  But at this point it's a big job.  I've got a few thousand albums that I started ripping back in '97 with the arrival online of the free Xing MP3 encoder. 

But the reasoning for naming all the cover art files by album name was a result of having to retrieve data from corrupted hard drives one too many times.  Sometimes it's possible to retrieve files where the paths to them have been lost. Back then my thinking was that it'd just be a lot faster to figure out which ones went where if they were named by album instead of something generic.

Quote
i'd avoid the use of folder.jpg because it's possible to overwrite them with shitty little thumbnails if you open WMP without changing certain settings first.

Wow... haven't run into that one yet as far as I can remember.  But, after all those days of retrieving lost data, I now back up everything.  I have 3 copies of my music library.  One on a PC, one on a notebook PC, and one on an external HDD.  Every once in a while I do complete hex file comparisons of all 3 and correct any file issues from one copy of the library or another. With everything backed up so well now, maybe it's time to reconsider naming graphic files cover.jpg/front.jpg, disc.jog, artist.jpg, etc..
Geopoliticus Child Watching the Birth of the New Man

folder.jpg code problem in 'foo uie graphical browser'

Reply #6
i must admit, the last time i was really affected by WMP overwriting my files was on on XP/WMP11.

but i've just made a test folder with a few albums in it and i've let windows 7/WMP12 loose on it..... and it still does it. 

i renamed all my decent art (most is 800x800 or above) to folder.jpg and WMP is currently over-writing it all with 200x200 thumbnails. 

you can turn off these updates but that really isn't the point. WMP does it without even prompting/asking. it really is a nasty piece of software if you're not careful.

edit: here's a wonderful example.

folder.jpg code problem in 'foo uie graphical browser'

Reply #7
edit: here's a wonderful example.
  Sorry.... I might stop laughing any moment now.  Good example of why WMP has always seemed like death incarnate.  I don't even remember remember using it back in Windows 95.  I started with Winamp & Xing in'97, moved on to Lame and FB2K, and have avoided letting WMP anywhere near my media libraries since.  Tho' I have to admit it took until '05, '06', or '07 before I understood FB2K well enough to stop using it just to apply RG, and finally break with Winamp.
Geopoliticus Child Watching the Birth of the New Man