IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
folder.jpg code problem in 'foo uie graphical browser', Need help with scripting for album art files
TakuSkan
post Dec 3 2013, 03:40
Post #1





Group: Members
Posts: 324
Joined: 16-February 03
Member No.: 5017



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
$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
Go to the top of the page
+Quote Post
marc2003
post Dec 3 2013, 04:58
Post #2





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



QUOTE (TakuSkan @ Dec 3 2013, 02:40) *
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.
Go to the top of the page
+Quote Post
TakuSkan
post Dec 3 2013, 06:11
Post #3





Group: Members
Posts: 324
Joined: 16-February 03
Member No.: 5017



QUOTE (marc2003 @ Dec 2 2013, 20:58) *
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. happy.gif
Go to the top of the page
+Quote Post
TakuSkan
post Dec 4 2013, 20:30
Post #4





Group: Members
Posts: 324
Joined: 16-February 03
Member No.: 5017



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
$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?

This post has been edited by TakuSkan: Dec 4 2013, 20:35
Go to the top of the page
+Quote Post
marc2003
post Dec 4 2013, 22:44
Post #5





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



assuming you have just one image in each folder...
CODE
*.*


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.
Go to the top of the page
+Quote Post
TakuSkan
post Dec 5 2013, 03:34
Post #6





Group: Members
Posts: 324
Joined: 16-February 03
Member No.: 5017



QUOTE (marc2003 @ Dec 4 2013, 14:44) *
assuming you have just one image in each folder...
CODE
*.*

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..

This post has been edited by TakuSkan: Dec 5 2013, 03:37
Go to the top of the page
+Quote Post
marc2003
post Dec 5 2013, 04:59
Post #7





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



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. rolleyes.gif

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. laugh.gif

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.

This post has been edited by marc2003: Dec 5 2013, 05:06
Go to the top of the page
+Quote Post
TakuSkan
post Dec 5 2013, 06:09
Post #8





Group: Members
Posts: 324
Joined: 16-February 03
Member No.: 5017



QUOTE (marc2003 @ Dec 4 2013, 20:59) *
edit: here's a wonderful example.
laugh.gif 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.
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 1st October 2014 - 13:29