Skip to main content
Topic: foo_uie_trackinfo (Read 738257 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

foo_uie_trackinfo

Reply #300
Is there a string that would keep the track info panel on Now Playing mode while a song is playing, but in Cursor Mode while nothing is playing?  What I've tried so far hasn't worked. 

foo_uie_trackinfo

Reply #301
I second this request.

foo_uie_trackinfo

Reply #302
@Storm:
Wow, great trackinfo config. Really simple and neat. Liked it alot. Just added some stuff to fit my need, it works perfectly, thanks.

foo_uie_trackinfo

Reply #303
I concur with rapsodie and mj-barton.

morph: Oh, wow, thanks. I started learning this stuff like some week ago, so that's really flattering.

Here's v2:

Code: [Select]
//// Three star song or 3 star song?
$puts(ratingwords,0)

$if(%_trackinfo_nowplaying%,20bcffNow playing,
ffffffSelected track) 9a9a9amode.$char(10)$char(10)

$if(%_trackinfo_notrack%,
9a9a9aNo track$if(%_trackinfo_nowplaying%, playing).
9a9a9aStatistics unavailable.,

$if($and(%_trackinfo_nowplaying%,$not(%_isplaying%)),
9a9a9aPlayback stopped. ,

$if($or(%artist%,%title%,%album%),
[»$replace(%title%,'(',c2b1a3'(',')',')','[',c2b1a3'[',']',']')«]
[ 9a9a9aby »%artist%«]

$if(%tracknumber%,9a9a9a',' 9a9a9atrack 9a9a9a#
$if($strcmp($left(%tracknumber%,1),0),$right(%tracknumber%,1), %tracknumber%))

[ 9a9a9afrom 9a9a9athe 9a9a9aalbum »
$replace(%album%,'(',c2b1a3'(',')',')','[',c2b1a3'[',']',']')«]

[ 9a9a9areleased 9a9a9ain %date%]
[9a9a9a, 9a9a9aoriginally
' '9a9a9areleased 9a9a9ain %origyear%]9a9a9a.,
Does not contain artist/album info.))

$if($and(%_trackinfo_nowplaying%,$not(%_isplaying%)),,$char(10)$char(10)

//// If rating exists, print it
$if(%rating%,$puts(rword,$select(%rating%,One,Two,Three,Four,Five))
069bff$if($strchr($get(ratingwords),1),$get(rword),%rating%) star song. ,
9a9a9aYou haven''t rated this song yet. $char(10)$char(10))

//// If playcount exists, print in appropriate form
$puts(countstring,$if(%play_counter%,Played
' '$if($strcmp(%play_counter%,1),$puts(p1,1)once,
$if($strcmp(%play_counter%,2),twice,%play_counter% times))9a9a9a,
$if($not(%play_date%),$if(%rating%,$char(10)$char(10))666666Never played))
$if($or(%play_counter%,$not(%play_date%)),$if($get(p1),',', since added.)))

$if($and(%play_counter%,$get(p1)),$char(10)$char(10))$get(countstring)

////  Play date needs to be in DDMMYY format
$if(%play_date%,
$if($get(p1), 9a9a9aon,$char(10)$char(10)9a9a9aLast played)

//// Make day 01 -> 1
$puts(pday,$left(%play_date%,2))
$if($strcmp($left($get(pday),1),0),$puts(pday,$right($get(pday),1)))

//// Make 12th, 23rd, 74th, 1st, 42nd etc
$if($or($strcmp($get(pday),11),$strcmp($get(pday),12),$strcmp($get(pday),13)),$puts(xx,th),
$if($strcmp($right($get(pday),1),1),$puts(xx,st),
$if($strcmp($right($get(pday),1),2),$puts(xx,nd),
$if($strcmp($right($get(pday),1),3),$puts(xx,rd),
$puts(xx,th)))))

//// Name the months
$puts(pmonth,$select($substr(%play_date%,3,4),
January,February,March,April,May,June,July,
August,September,October,November,December))

//// Fix year to tell millennium as well
$puts(pyear,$right(%play_date%,2))
$puts(pyear,$if($greater($get(pyear),80),19,20)$get(pyear))

$puts(ptime,$left(%play_time%,2):$substr(%play_time%,3,4))

//// Print date
' '$get(pmonth) $get(pday)$get(xx) $get(pyear)
$if(%play_time%, 9a9a9aat $get(ptime))9a9a9a.)))

//// Playing a song? then print audioscrobbler status
$if(%_isplaying%,$char(10)$char(10)$if(%_ispaused%,Paused,Playing). $ifgreater(
$muldiv(%_time_elapsed_seconds%,100,%_time_total_seconds%),50,
c2b1a3Audioscrobblered.,9a9a9aNon-audioscrobblered.))


Edit: morph: I also replaced the "since Dec 2004" (that's when I filled up my music library for the first time ) with "since added", and removed it for "once" playcounts so that it could go on the same line as the playdate. I can't remember now but I think I did something else as well. :>

Edit #2: Oh yeah, full name months too, and I think I shortened the code on some spots. Well, as for the rating field you've already mentioned, I also added "You haven't rated this song yet" but maybe you saw that.

Edit #3: I've made updates to the code during the day, so you should copy it again in a few minutes after I've fixed a bug caused by this forum (it won't print out spaces in the beginning or end of a line)... Edit #4: There, all done.

foo_uie_trackinfo

Reply #304
@Storm:
Good update on the rating field. Did you update anything else?

EDIT: I've noticed a bug though, don't know what's causing it. On some tracks the "You havn't rated this song." text doesn't jump down two rows from the track info. So it's attached on the track info right after the Year field.

foo_uie_trackinfo

Reply #305
Now it should be totally bug-free and also tell when playback's paused.

Edit: Err, wrong.  Linebreak bug when you select a track with no rating that's played once... hold on.

foo_uie_trackinfo

Reply #306
I noticed
Your last update works great. Big thanks! 

EDIT: Now.. all that's left is to figure out how to implant a rating-bar into a colum in the playlist 

foo_uie_trackinfo

Reply #307
Kind of like this?

http://branstrom.nu/shots/program/foobar/050420.png

Code: [Select]
$puts(r_cl,93612F)
$if(%rating%,
$select(%rating%,
●$get(r_cl)●●●●,
●●$get(r_cl)●●●,
●●●$get(r_cl)●●,
●●●●$get(r_cl)●,
●●●●●)
)


Edit: Another screenshot to show off the playing mode:
http://branstrom.nu/shots/program/foobar/050420-2.png

foo_uie_trackinfo

Reply #308
Oh yeh! 
Many swede's around here, including myself 


foo_uie_trackinfo

Reply #310
Yeah

However, the rating isn't working for me, I only get a empty colum 

foo_uie_trackinfo

Reply #311
You have to use certain fonts like Tahoma or Verdana for example in the playlist for that to work, or you'll have to exchange the ● character for something else.

foo_uie_trackinfo

Reply #312
ohh nevermind, i noticed the script didn't return anything on a not-rated track..
for the font side, i understood that far

EDIT: You should evolve the script a bit, first of all put in something to return if the track isn't rated and somehow return negative rated tracks. For this the dots could change color to red to indicate negative.

foo_uie_trackinfo

Reply #313
I don't think anyone's rating tracks on the other side of zero - take a look at QuickTag and you'll see that at least that plugin is only meant to be used with positive ratings. Maybe it's a good idea though... But as for the rest, you're right, it could show a faint line of dots for the ones that aren't rated, and the rest of my playlist can also be improved upon, maybe I'll even remove a few columns as I get a lot of info through the trackinfo panel anyway.


foo_uie_trackinfo

Reply #314
Perhaps your rigth, negative rating isn't meant to be used. Then
1 star  = hate
5 stars = love

Yes, a faint line of dots would be excellent.
And yes, I had the same problem, having info repeating itself on different places. Now I'm just trying to have a clean as possible config.


foo_uie_trackinfo

Reply #315
Yep. One wonders why one would keep songs in one's music library if they were so bad you'd give them five negative stars. Songs like that are just easier dealt with by the delete button.

I have a problem with Columns UI colors - it seems I can't control the _selected_ color for a _part_ of a column, like if I wanted to make

Code: [Select]
$puts(r_cl,93612F)
$if(%rating%,
$select(%rating%,
●$get(r_cl)●●●●,
●●$get(r_cl)●●●,
●●●$get(r_cl)●●,
●●●●$get(r_cl)●,
●●●●●),644737●●●●●)


but have another selected color than the default inverted color, how would I go about? I don't get it. I should sleep perhaps.

This is my color code for the rating column at the moment:

Code: [Select]
||432C15|$if(%_isplaying%,0068D0,34281C)


Hmm, another problem, when I try to copy the code from the pref window (talking about the Display code that I pasted first...) to this form, it doesn't copy the color control characters for the second color, just the first one.

foo_uie_trackinfo

Reply #316
@Storm:
I found another line break error 
On some songs there's 3 empty lines between the rating and last played date.

foo_uie_trackinfo

Reply #317
That's the one I mentioned earlier I think, haven't fixed it yet... Show me a screenshot so I can be sure we're talking about the same thing.

Edit: To minimize the number of posts on such a trivial matter, I'm writing here, confirming that it is the same bug that I mentioned on the previous page... Working on it now. Believe it or not, linebreaks can be vicious...


foo_uie_trackinfo

Reply #319
[span style='font-size:14pt;line-height:100%']Bug report![/span]

If you look at my code you'll see that I've encased practically everything that is separated by spaces in its own color code. That's because if I don't, this will happen:

Here it is:

Code: [Select]
//// Three star song or 3 star song? Audioscrobbler or not?
$puts(ratingwords,0)$puts(audioscrobbler,1)

$if(%_trackinfo_nowplaying%,20bcffNow playing,
ffffffSelected track) 9a9a9amode.$char(10)$char(10)

$if(%_trackinfo_notrack%,
9a9a9aNo track$if(%_trackinfo_nowplaying%, playing).
9a9a9aStatistics unavailable.,

$if($and(%_trackinfo_nowplaying%,$not(%_isplaying%)),
9a9a9aPlayback stopped. ,

$if($or(%artist%,%title%,%album%),
[»$replace(%title%,'(',c2b1a3'(',')',')','[',c2b1a3'[',']',']')«]
[ 9a9a9aby »%artist%«]

$if(%tracknumber%,9a9a9a',' 9a9a9atrack 9a9a9a#
$if($strcmp($left(%tracknumber%,1),0),$right(%tracknumber%,1), %tracknumber%))

[ 9a9a9afrom 9a9a9athe 9a9a9aalbum »
$replace(%album%,'(',c2b1a3'(',')',')','[',c2b1a3'[',']',']')«]

[ 9a9a9areleased 9a9a9ain %date%]
[9a9a9a, 9a9a9aoriginally
' '9a9a9areleased 9a9a9ain %origyear%]9a9a9a.,
Does not contain artist/album info.))

$if($and(%_trackinfo_nowplaying%,$not(%_isplaying%)),,$char(10)$char(10)

$puts(countstring,$if(%play_counter%,Played
' '$if($strcmp(%play_counter%,1),$puts(p1,1)once,
$if($strcmp(%play_counter%,2),twice,%play_counter% times))9a9a9a,
$if($not(%play_date%),$if(%rating%,$char(10)$char(10))666666Never played))
$if($or(%play_counter%,$not(%play_date%)),$if($get(p1),',', since added.)))

$if(%rating%,$puts(rword,$select(%rating%,One,Two,Three,Four,Five))
069bff$if($strchr($get(ratingwords),1),$get(rword),%rating%) star song. ,
9a9a9aYou haven''t rated this song yet. $if($get(p1),,$char(10)$char(10)))

$if($get(p1),$char(10)$char(10))$get(countstring)

////  Play date needs to be in DDMMYY format
$if(%play_date%,
$if($get(p1), 9a9a9aon,$char(10)$char(10)9a9a9aLast played on)

$puts(pday,$left(%play_date%,2))
$if($strcmp($left($get(pday),1),0),$puts(pday,$right($get(pday),1)))

$if($or($strcmp($get(pday),11),$strcmp($get(pday),12),
$strcmp($get(pday),13)),$puts(xx,th),
$if($strcmp($right($get(pday),1),1),$puts(xx,st),
$if($strcmp($right($get(pday),1),2),$puts(xx,nd),
$if($strcmp($right($get(pday),1),3),$puts(xx,rd),
$puts(xx,th)))))

$puts(pmonth,$select($substr(%play_date%,3,4),
January,February,March,April,May,June,July,
August,September,October,November,December))

$puts(pyear,$right(%play_date%,2))
$puts(pyear,$if($greater($get(pyear),80),19,20)$get(pyear))

$puts(ptime,$left(%play_time%,2):$substr(%play_time%,3,4))

' '$get(pmonth) $get(pday)$get(xx) $get(pyear)
$if(%play_time%, 9a9a9aat $get(ptime))9a9a9a.)))

$if(%_isplaying%,$char(10)$char(10)$if(%_ispaused%,Paused,Playing)
. $if($strchr($get(audioscrobbler),1),
$ifgreater($muldiv(%_time_elapsed_seconds%,100,%_time_total_seconds%),50,
c2b1a3Audioscrobblered.,9a9a9aNon-audioscrobblered.)))


Edit #2: Another update.

foo_uie_trackinfo

Reply #320
Great, thanks again.

foo_uie_trackinfo

Reply #321
Quote
Hey, I got a minor problem with the "Last Played" code in my track info.

Example: "Last played: 19.04.2020 05:14:24"

As you can see, the year is messed up. Also, I never played this track 5am in the morning. So.. could someone point out to me where the code fails?

Code: [Select]
$if($and(%play_date%,%play_time%),$substr(%play_date%,1,2).$substr(%play_date%,3,4).20$substr(%play_date%,5,6) $substr(%play_time%,1,2):$substr(%play_time%,3,4):$substr(%play_time%,5,6),$rgb(128,128,128)No date found)$char(10)

The code was written by Shadikka and posted here, so I just copied it.
Also, is there a way to change the date format to "April 19th 2005"?...
[a href="index.php?act=findpost&pid=291997"][{POST_SNAPBACK}][/a]

Change
Code: [Select]
$substr(%play_date%,5,6)
to
Code: [Select]
$substr(%play_date%,7,8)


Change
Code: [Select]
$substr(%play_date%,3,4)
to
Code: [Select]
$select($substr(%play_date%,3,4),January,February,March,April,May,June,July,August,September,October,November,December)


Play with that. 

foo_uie_trackinfo

Reply #322
Quote
Play with that. 
[a href="index.php?act=findpost&pid=292389"][{POST_SNAPBACK}][/a]


Thanks for your help, but he's already using my code.

 

foo_uie_trackinfo

Reply #323
This is my first post in here.  So far I have been able to get fb2k up and running pretty well with what I have been able to find on the forum.  I am having a problem with a foo_uie_trackinfo script though.  I have added a couple of lines to the script originally from necropimp and edited by AstreaEdge, which was posted previously in this thread.  (Awesome script!!)  I didn't want to post the whole script over again.

I have added the following lines:
Code: [Select]
$if(%play_counter%,$get(head)Number of times played: $get(info)%play_counter%$char(10),)
$if(%play_date%,$get(head)Last played on: $get(info)%play_date% at $get(info)%play_time%$char(10),)


This gives me text as follows:
Number of times played: X
Last played on MMDDYYYY at h:MM:SS (the colons are there since that is how I set up Play Count)

I have tried a number of ways to get the date to show as Month DD, YYYY (e.g. April 26, 2004) but I cannot get a working script.  Does anyone have any suggestions?

Thanks!


 
SimplePortal 1.0.0 RC1 © 2008-2020