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: foo_uie_single_column_playlist (Read 736605 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

foo_uie_single_column_playlist

Reply #601
okay from now on ill post in the relative thread, but how do i set up the relative path for the imageabs2?

i have my music set up differently, all my music is in one folder, and i have all my album art in a separate folder. And my art is saved in the format %artist%.jpg

C:\Documents and Settings\xxxx\My Documents\My Music\Album Art\%artist%.jpg

that is where my album art lies, how do i put that in a relative format? where do i need to put my art so that i can use relative paths?


1) how do you find different album covers for two differnt albums from one artist? (nevermind thats your trouble not mine)

2) if you use such path as given up first i would suggest to use ' ' i use code such as this an it works:
$imageabs2(38,38,0,0,38,38,93,4,'images\bands\'%album artist%'.jpg',)
but my artist photos are realtive to foobar you have to use absolute path if you use windows document folder.

3) everytime you experiment with imageabs2 code restart foobar.

foo_uie_single_column_playlist

Reply #602

okay from now on ill post in the relative thread, but how do i set up the relative path for the imageabs2?

i have my music set up differently, all my music is in one folder, and i have all my album art in a separate folder. And my art is saved in the format %artist%.jpg

C:\Documents and Settings\xxxx\My Documents\My Music\Album Art\%artist%.jpg

that is where my album art lies, how do i put that in a relative format? where do i need to put my art so that i can use relative paths?


1) how do you find different album covers for two differnt albums from one artist? (nevermind thats your trouble not mine)

2) if you use such path as given up first i would suggest to use ' ' i use code such as this an it works:
$imageabs2(38,38,0,0,38,38,93,4,'images\bands\'%album artist%'.jpg',)
but my artist photos are realtive to foobar you have to use absolute path if you use windows document folder.

3) everytime you experiment with imageabs2 code restart foobar.



I have my whole music set up by artist, not by album, so i just have one art for each artist, and i arrange by artist, but thats beside the point.

$imageabs2(38,38,0,0,38,38,93,4,'images\bands\'%album artist%'.jpg',)

your code, im guessing the first two numbers are the size of the image, what do the other ones do, im  trying to learn this, so that i can figure it out on my own, and not have to ask here everytime something doesnt work.

P.S. I  have moved my albumart to

images\albumart\%artist%.jpg 

and i put that in your code, put your code in my foobar, and nothing showed up... any idea what im doing wrong?

foo_uie_single_column_playlist

Reply #603
Is letter-spacing available? This would provide quite a few more options when it comes to usable fonts. eg I like to have a small font in upper case with some letter-spacing.

foo_uie_single_column_playlist

Reply #604

Will not work with useing alignabs, must use $cut if you wish to take of characters and not whole words.
Alright. I can't think of any good way to have the playlist not completely cut off long words in the playlist using cut, though. The only way I could think to do it would be to use a font that has a consistent character width and base the amount cut off on the width of the panel.


Yeah, that seems to be the best way at the moment.


Another idea (dirty but maybe working okay?) is:

1. Use calcwidth to find out the width of the string
2. If the width is bigger than desired maximum width, then:
3. Calculate how many percent the width was bigger than desired max width.
4. Count number of characters in string.
5. Reduce the number of characters proportinally to how bigger the width was compared to the maximum width (plus reduce a little extra for safety)
6. Add three dots.

If anyone gets me..

foo_uie_single_column_playlist

Reply #605
your code, im guessing the first two numbers are the size of the image, what do the other ones do, im  trying to learn this, so that i can figure it out on my own, and not have to ask here everytime something doesnt work.


i already posted about this in a reply to your post in the appearance thread....

Code: [Select]
$imageabs2(122,122,,,,,6,2,$replace(%path%,%filename_ext%,)folder.png,)


in my code the imagesize is 122x122.

x position (horizonatal ) is 6 and y postion (vertical) is 2. i don't need anything else.

of course your group rows multiplied by row height must be big enough to display your image. for example my row height is 25 and group rows is 5 which gives me 125. as my images are 122, i have a little border....

foo_uie_single_column_playlist

Reply #606
ya i didnt check there till just now,

and i didnt know why i was using the $replace , it was just given to me by someone else ,
so anyway, i have now moved my album art  so that i can use relative paths'
album art is located here

C:\Documents and Settings\xxxx\Application Data\foobar2000\images\albumart


$imageabs2(122,122,,,,,6,2,$replace(%path%,%filename_ext%,)folder.png,)

so how would i change your code ^^^ to fit my needs, since you said i dont need the $replace anymore?

foo_uie_single_column_playlist

Reply #607
This already may have been asked before (but HA doesn't support a thread search):

Pressing ENTER does not play a track? Any way I can achieve this?

foo_uie_single_column_playlist

Reply #608
$imageabs2(38,38,0,0,38,38,93,4,'images\bands\'%album artist%'.jpg',)

your code, im guessing the first two numbers are the size of the image, what do the other ones do, im  trying to learn this, so that i can figure it out on my own, and not have to ask here everytime something doesnt work.


short explanation i was talking about in appearnace thread:

I've posted a new version which fixes the playback status not changing.

The arguments for $imageabs2 are

- resize width
- resize height

- srcX - the x position on the resized image where you want to start
- srcY - the y position on the resized image where you want to start
- srcW - the width on the resized image you want
- srcH - the height on the resized image you want

- dstX - the x position on the screen where you want the image drawn
- dstY - the y position on the screen where you want the image drawn

and yes, there will be problems with the '#' character in commands.

Both images commands use GDI+.


im not quite sure how these works : srcX, srcY, srcW, srcH i just know that the code above works the way i need .

im not quite sure what you are trying to achive. pls expres your needs more. you're reffering to %artist%.jpg as album cover but i guess you need to show artist photo somewhere. am i right? do you need to place that image in group header or next to your item rows? cause code looks different depending on this. the code i was posting for you i use in group row. Dont mind the relative/absolute path just use the one youre used to both works quite fine.

 

foo_uie_single_column_playlist

Reply #609
Code: [Select]
$imageabs2(75,75,0,,,,3,3,$replace($replace(C:\Documents and Settings\xxxx\Application Data\foobar2000\images\albumart\nocover.png,',',),?,),)
$imageabs2(75,75,0,,,,3,3,$replace($replace(C:\Documents and Settings\xxxx\Application Data\foobar2000\images\albumart\%artist%.jpg,',',),?,),)


that is the current code that i am using for my images, and they are displaying, but i want to clean the code up, i was told that i dont need the $replace, and since it is in my application data foobar, i should be able to use relative path's,  how can i modify this code to achieve this ?

foo_uie_single_column_playlist

Reply #610


Will not work with useing alignabs, must use $cut if you wish to take of characters and not whole words.
Alright. I can't think of any good way to have the playlist not completely cut off long words in the playlist using cut, though. The only way I could think to do it would be to use a font that has a consistent character width and base the amount cut off on the width of the panel.


Yeah, that seems to be the best way at the moment.


Another idea (dirty but maybe working okay?) is:

1. Use calcwidth to find out the width of the string
2. If the width is bigger than desired maximum width, then:
3. Calculate how many percent the width was bigger than desired max width.
4. Count number of characters in string.
5. Reduce the number of characters proportinally to how bigger the width was compared to the maximum width (plus reduce a little extra for safety)
6. Add three dots.

If anyone gets me..


Eh, gotta get going to work, but this one seems ok at the moment. It just calculates the width of O, which seems to be the widest character.

Code: [Select]
$puts(c,$div($calcwidth(%artist% - %title%),$calcwidth(O)))

$ifgreater($calcwidth(%artist% - %title%),%_width%,
$cut(%artist% - %title%,$get(c))'...'
,
%artist% - %title%
)

foo_uie_single_column_playlist

Reply #611
Code: [Select]
$imageabs2(75,75,0,,,,3,3,$replace($replace(C:\Documents and Settings\xxxx\Application Data\foobar2000\images\albumart\nocover.png,',',),?,),)
$imageabs2(75,75,0,,,,3,3,$replace($replace(C:\Documents and Settings\xxxx\Application Data\foobar2000\images\albumart\%artist%.jpg,',',),?,),)


that is the current code that i am using for my images, and they are displaying, but i want to clean the code up, i was told that i dont need the $replace, and since it is in my application data foobar, i should be able to use relative path's,  how can i modify this code to achieve this ?


here you go....

Code: [Select]
$imageabs2(75,75,,,,,3,3,'images\albumart\nocover.png',)
$imageabs2(75,75,,,,,3,3,'images\albumart\'%artist%'.jpg',)



foo_uie_single_column_playlist

Reply #612
Quote
QUOTE(speedemonV12 @ Oct 6 2006, 16:29) *

CODE

$imageabs2(75,75,0,,,,3,3,$replace($replace(C:\Documents and Settings\xxxx\Application Data\foobar2000\images\albumart\nocover.png,',',),?,),)
$imageabs2(75,75,0,,,,3,3,$replace($replace(C:\Documents and Settings\xxxx\Application Data\foobar2000\images\albumart\%artist%.jpg,',',),?,),)


that is the current code that i am using for my images, and they are displaying, but i want to clean the code up, i was told that i dont need the $replace, and since it is in my application data foobar, i should be able to use relative path's, how can i modify this code to achieve this ?


here you go....

CODE
$imageabs2(75,75,,,,,3,3,'images\albumart\nocover.png',)
$imageabs2(75,75,,,,,3,3,'images\albumart\'%artist%'.jpg',)


smile.gif



ok i did put that code into my foobar, and it does not work


foo_uie_single_column_playlist

Reply #614
ok i did put that code into my foobar, and it does not work


i did test the code before i posted. i even created the folder/filename structure so it's the same as yours.... 

you did restart, didn't you....

foo_uie_single_column_playlist

Reply #615
I Most definately did restart lol , ive been told that too many times, this is killing me that i cant get it to work!!!

it doesnt make sense that this code works:
$imageabs2(75,75,0,,,,3,3,$replace($replace(C:\Documents and Settings\xxxx\Application Data\foobar2000\images\albumart\nocover.png,',',),?,),)
$imageabs2(75,75,0,,,,3,3,$replace($replace(C:\Documents and Settings\xxxx\Application Data\foobar2000\images\albumart\%artist%.jpg,',',),?,),)

and then this doesnt:
$imageabs2(75,75,,,,,3,3,'images\albumart\nocover.png',)
$imageabs2(75,75,,,,,3,3,'images\albumart\'%artist%'.jpg',)

its just being simplified.. is there something small we are missing?



ill explain everything out of how i have my music set up, ,just in case it will make a difference,

i have all my music located in:
C:\Documents and Settings\xxxx\My Documents\My Music
and my music is saved in this format: %artist% - %tracknumber.mp3

i have all my images for my foobar stored here:
C:\Documents and Settings\xxxx\Application Data\foobar2000\images

and my album art is located here:
C:\Documents and Settings\xxxx\Application Data\foobar2000\images\albumart
and my album art is saved in this format: %artist%.jpg
this is because i organize my music by artist, not by album, and i have all the correct tags, so that it works for me, i just set the album tag to be the same as the artist tag, so that i did not have to change all the code that people posted, since they sort by album,

anyway, thats where everything is stored, i still have no idea why the shortened code doesnt work

foo_uie_single_column_playlist

Reply #616
I Most definately did restart lol , ive been told that too many times, this is killing me that i cant get it to work!!!

it doesnt make sense that this code works:
$imageabs2(75,75,0,,,,3,3,$replace($replace(C:\Documents and Settings\xxxx\Application Data\foobar2000\images\albumart\nocover.png,',',),?,),)
$imageabs2(75,75,0,,,,3,3,$replace($replace(C:\Documents and Settings\xxxx\Application Data\foobar2000\images\albumart\%artist%.jpg,',',),?,),)

and then this doesnt:
$imageabs2(75,75,,,,,3,3,'images\albumart\nocover.png',)
$imageabs2(75,75,,,,,3,3,'images\albumart\'%artist%'.jpg',)

its just being simplified.. is there something small we are missing?


AFAIK, you can't use relative paths with $imageabs2(), they only work with $imageabs(), so you'll have to keep the whole path in the code.

foo_uie_single_column_playlist

Reply #617

I Most definately did restart lol , ive been told that too many times, this is killing me that i cant get it to work!!!

it doesnt make sense that this code works:
$imageabs2(75,75,0,,,,3,3,$replace($replace(C:\Documents and Settings\xxxx\Application Data\foobar2000\images\albumart\nocover.png,',',),?,),)
$imageabs2(75,75,0,,,,3,3,$replace($replace(C:\Documents and Settings\xxxx\Application Data\foobar2000\images\albumart\%artist%.jpg,',',),?,),)

and then this doesnt:
$imageabs2(75,75,,,,,3,3,'images\albumart\nocover.png',)
$imageabs2(75,75,,,,,3,3,'images\albumart\'%artist%'.jpg',)

its just being simplified.. is there something small we are missing?


AFAIK, you can't use relative paths with $imageabs2(), they only work with $imageabs(), so you'll have to keep the whole path in the code.


so can i just get rid of the 2 in $imageabs2(), and then everything will work ?

or should i just have the code like this?
$imageabs2(75,75,,,,,3,3,'C:\Documents and Settings\xxxx\Application Data\foobar2000\images\albumart\%artist%.jpg',)

kuz i think that i have tried that, and it doesnt work ..

foo_uie_single_column_playlist

Reply #618
AFAIK, you can't use relative paths with $imageabs2(), they only work with $imageabs(), so you'll have to keep the whole path in the code.


well sort of..... just been testing and you can't use your profile directory with imageabs2. but having the a folder as subdirectory of the main foobar2000 folder works.

so just copy over your 'images' folder to \program files\foobar2000\ and that should do it. 

foo_uie_single_column_playlist

Reply #619
...or add the path back
err... i'm not using windows any more ;)

foo_uie_single_column_playlist

Reply #620
$imageabs2(75,75,,,,,3,3,'C:\Documents and Settings\xxxx\Application Data\foobar2000\images\albumart\%artist%.jpg',)

so would this be adding the path back ?




edit: marc , you were right, i moved the folder, and now the clean code works,

foo_uie_single_column_playlist

Reply #621
edit: marc , you were right, i moved the folder, and now the clean code works,


ok so now it works. but what a strange setup to have.    do you have multiple albums by the same artist? it's going to show the same image for every one. surely you'd want to have individual art for each album?

but then i suppose it's good in a way that we don't all think the same...... 

foo_uie_single_column_playlist

Reply #622
HA doesn't support a thread search
Have you tried the Search Topic button at the end of the page? Or do you mean something else?
I've overseen that one for years, thanks!

But it didn't bring me a result for my question. So, is it intended behaviour, if I press <enter> that nothing happens? Or something wrong here?

foo_uie_single_column_playlist

Reply #623

edit: marc , you were right, i moved the folder, and now the clean code works,


ok so now it works. but what a strange setup to have.    do you have multiple albums by the same artist? it's going to show the same image for every one. surely you'd want to have individual art for each album?

but then i suppose it's good in a way that we don't all think the same...... 



no i only have one album for my artists.. but now i have the code, and it works, thanks for all the help

foo_uie_single_column_playlist

Reply #624
any chance to show the album art with imageabs2, files from different folders with different filennames?
right now i have $replace(%path%,%filename_ext%,folder.jpg)

though i have many files that are not named "folder.jpg".
*.jpg doesn't work =/

maybe anyone know of a good mass file renamer?