Voilà le code final pour ceux qui l'ont demandé, avec une capture mise à jour
:
Tags utilisés :
- de base : artist, album, tracknumber, genre, date, title
- custom : firstname, band/co-artist, type, style, singletrack, rating
Quelques explications :
1) les points de couleur s'affichent en face des titres si le tag TYPE (live, bootleg, compilation, b-sides) est présent. Jaune pour les lives, rouge pour les boots, bleu pour les compilations, etc.
2) les single tracks s'affichent différemment (en bleu/violet et sans le tracknumber) lorsque le tag SINGLETRACK est présent et a la valeur 1.
3) Le nom de l'artiste s'affiche par défaut en majuscules, mais il suffit de régler l'option sur 0 pour revenir en minuscules.
4) Le prénom de l'artiste s'affiche en minuscules à gauche du nom de l'artiste lorsque le tag FIRSTNAME est présent. De même le nom du groupe ou co-artiste qui accompagne l'artiste principal s'affiche en minuscules à droite du nom de l'artiste si le tag BAND/CO-ARTIST est présent.
5) lorsque le nom de l'album dépasse la longeur de la colonne, il est automatiquement tronqué et suivi de points de suspension (...).
6) Le sous-genre apparaît à droite du genre en couleur plus foncée si le tag STYLE est présent.
7) la mise en forme du tracknumber est compatible avec plusieurs formattings (ex. : 1, 01, 001, 1/10, 01/10) ce qui évite d'avoir à tous les retagger de la même manière.
8) dans les titres, toutes les infos contenues entre parenthèses ou entre crochets apparaissent dans une couleur plus foncée
9) lorsqu'un fichier n'a pas d'Album Gain, une astérique de couleur s'affiche à droite du titre, et disparaît lorsqu'il est passé au replaygain. Sauf dans le cas des single tracks (car ils n'ont pas besoin d'album gain).
10) si vous utilisez mes tags customs, je vous recommande cette ligne de commande pour trier la playlist :
%GENRE% - %STYLE% - %ARTIST% - %SINGLETRACK% - %DATE% - %ALBUM% - $ext(%_path%) - $num(%TRACKNUMBER%,3) - %TITLE%
11) des petites étoiles apparaissent à côté du titre si le tag RATING est présent (valeurs de 1 à 5). Pratique si vous utilisez le Quick Tag pour noter votre titres
Si vous n'utilisez pas mes tags customs tout le formatting marchera aucun sans problème d'affichage (pas de points d'interrogation ou de décalages)
// OPTIONS
// ARTIST NAME IN BOLD LETTERS (1 = on / 0 = off)
$puts(v_bold,1)
//BASICS //////////////////////////////////////////////////////////
// COLORS DISPATCH
// color_bac = Dark tracknumber zeros, File extension, Bitrate/Compression
// color_gri = Grid
// color_num = Playlist number
// color_art = Artist
// color_alb = Album
// color_tec = Genre, File type, Bitrate/Compression, Title length,
// color_tit = Title, Track number
// color_zer = Zeros playlist
// color_zeo = Zeros playlist
//color_gho = Style, Album Gain, Replaygain
// color_liv = album live
// color_cpl = album compilation/ best of
// color_b-s = album compilation (B-Sides)
// color_btl = album bootleg
// color_sgl = singletrack (general)
// color_sglt = singletrack title
// SET COLORS
$puts(color_bac,362E2C|362E2C)
$puts(color_gri,AA9E9A|BBEBFB)
$puts(color_num,524145|0C7689)
$puts(color_art,FFFFFF|FFFFFF)
$puts(color_alb,DCD3D3|D3D3D3)
$puts(color_tec,9D8A8D|9D8A8D)
$puts(color_tit,$if(%_isplaying%,FFFFFF|FFFFFF,D1C1C0|BBEBFB))
$puts(color_zer,474141|474141)
$puts(color_zeo,695F5F|695F5F)
$puts(color_gho
,644F53|644F53)
$puts(color_liv
,4ECEF3|4ECEF3)
$puts(color_cpl
,E99372|E99372)
$puts(color_b-s
,C287AD|C287AD)
$puts(color_btl
,325CDC|325CDC)
$puts(color_liv2
,063948|063948)
$puts(color_cpl
2,481F1E|481F1E)
$puts(color_b-s2
,4A2647|4A2647)
$puts(color_btl2
,092142|092142)
$puts(color_sgl
,BE898C|BE898C)
$puts(color_sgl2
,83505A|83505A)
$puts(color_sgl3
,5C3840|5C3840)
$puts(color_sglt,$if(%_isplaying%,C99CA8|C99CA8,BE898C|BE898C))
// SET COLOMN WIDTHS
$puts(colomn_1,30)
$puts(colomn_2,40)
$puts(colomn_3,200)
$puts(colomn_4,265)
$puts(colomn_5,35)
$puts(colomn_6,43)
// PLAYLIST NUMBERS
$get(color_num)
$ifgreater($len(%_playlist_number%),1,,0)
$ifgreater($len(%_playlist_number%),2,,0)
$ifgreater($len(%_playlist_number%),3,,0)
$get(color_num)%_playlist_number%
$get(color_gri)
// END OF COLOMN ONE
$repeat($char(9),$get(colomn_1))
//ALBUMS //////////////////////////////////////////////////////////
// END OF COLOMN TWO
//$repeat($char(9),$get(colomn_2))
// 1) ARTIST (including SINGLETRACK MODE)
$if($strcmp(%singletrack%,1),$get(color_sgl)'? '[%firstname% ]$if($stricmp($get(v_bold),1),$upper(%artist% ),%artist% )$if2(%band/co-artist% ,)
$transition(
$if($or(%album%,%tracknumber%),' [')
[$iflonger(%firstname%%artist%%band/co-artist%%album%,30,$left(%album%,$sub(38,$len(%firstname%),$len(%artist%),$len(%band/co-artist%)))' (...)',%album%)]$if($and(%tracknumber%,%album%),', ')[%tracknumber%]
$if($or(%album%,%tracknumber%),']')
,$get(color_sgl2),$get(color_sgl3))
$get(color_sgl3)$repeat(' .',70))
$if($strcmp($num(%tracknumber%,1),1),
$if($strcmp(%singletrack%,1),,
$get(color_art)[$if2(%firstname%,)' ']$if($stricmp($get(v_bold),1),$upper(%artist% ),%artist% )$if2(%band/co-artist%,))
$get(color_gri)' '$repeat('?',50),)
// 2) ALBUM
$get(color_alb)
$if($strcmp($num(%tracknumber%,1),2),
$if($strcmp(%singletrack%,1),,
$iflonger(%album%,50,' « '$left(%album%,44)$get(color_tec)'... '$get(color_alb)'»',
' « '%album%' »')))
// 3) DATE
$get(color_alb)
$if($strcmp($num(%tracknumber%,1),3),
$if($strcmp(%singletrack%,1),,
' '$if2(%date%,'[date unknown]')))
// 4) GENRE & STYLE
$if($strcmp($num(%tracknumber%,1),4),
$if($strcmp(%singletrack%,1),,
$get(color_tec)' '%genre%)$get(color_gho)$if2(' > '%style%,),)
// 5) CODEC & BITRATE
// ALL CODECS EXCEPT MPC
$if($strcmp($num(%tracknumber%,1),5),
$get(color_tec)$upper($right(%_filename_ext%,3))
$if($stricmp($info(codec),musepack),,$get(color_tec)' ('%__bitrate%'kb/s)')
// MPC CODEC
$if($stricmp($info(codec),musepack),
$if($stricmp($info(mpc_profile),''Thumb''),
$put(v_compression,'(Thumb)'),)
$if($stricmp($info(mpc_profile),''Radio''),
$put(v_compression,'(Radio)'),)
$if($stricmp($info(mpc_profile),''Standard''),
$put(v_compression,'(Q5)'),)
$if($stricmp($info(mpc_profile),''Xtreme''),
$put(v_compression,'(Q6)'),)
$if($stricmp($info(mpc_profile),''Insane''),
$put(v_compression,'(Q7)'),)
$if($stricmp($info(mpc_profile),''BrainDead''),
$put(v_compression,'(Q8)'),)
$if($stricmp($info(mpc_profile),''quality 9''),
$put(v_compression,'(Q9)'),)
$if($stricmp($info(mpc_profile),''quality 10''),
$put(v_compression,'(Q10)'),)
$if($stricmp($info(mpc_profile),''Unstable/Experimental''),
$put(v_compression,'(Qx)'),),)
//5-bis) ALBUM GAIN
$get(color_gho) ['> Alb. G.'$left(%__replaygain_album_gain%,5)]
)
// END OF COLOMN THREE
$repeat($char(9),$get(colomn_3))
// TRACK NUMBER
$char(32)
$get(color_tit)
// TRACKNUMBER
$if($strcmp(%singletrack%,1),$get(color_sgl)' ? ',
$if($strcmp($len(%tracknumber%),5),$puts(tn,$left(%tracknumber%,2)))
$if($strcmp($len(%tracknumber%),4),$puts(tn,$num($left(%tracknumber%,1),2)))
$if($strcmp($len(%tracknumber%),3),$puts(tn,$right(%tracknumber%,2)))
$if($strcmp($len(%tracknumber%),2),$puts(tn,%tracknumber%))
$if($strcmp($len(%tracknumber%),1),$puts(tn,$num(%tracknumber%,2)))
$if($strcmp($left($get(tn),1),0),$get(color_bac)$left($get(tn),1),$get(color_tit)$left($get(tn),1))
$get(color_tit)$right($get(tn),1)
'. '
)
// TYPE
$if($stricmp(%type%,Live),$get(color_liv)'▪ ')
$if($stricmp(%type%,Compilation),$get(color_cpl)'▪ ')
$if($stricmp(%type%,'Compilation (B-Sides)'),$get(color_b-s)'▪ ')
$if($stricmp(%type%,'Live (Bootleg)'),$get(color_btl)'▪ ')
// TITLE
$if($strcmp(%singletrack%,1),$get(color_sgl),)
$puts(t_title,%title%)
//------color contents of parenthesis-------
$if($greater($len($get(t_title)),0),
$puts(ext1,$ifgreater($strchr($get(t_title),'('),$strchr($get(t_title),'['),$strchr($get(t_title),'('),$strchr($get(t_title),'[')))
//if it starts with one, but there are more later
$if($strcmp(1,$get(ext1)),
$puts(ext1,$ifgreater($strrchr($get(t_title),'('),$strrchr($get(t_title),'['),$strrchr($get(t_title),'('),$strrchr($get(t_title),'[')))
)
// if parenthesis exists
$if($greater($get(ext1),1),
$puts(ext2,$sub($get(ext1),1))
$puts(t_title_extra,$get(t_title))
$puts(t_title,$cut($get(t_title),$get(ext2)))
$puts(t_extra,$substr($get(t_title_extra),$get(ext1),$len($get(t_title_extra))))
))
$if($strcmp(%singletrack%,1),$get(color_sglt),$get(color_tit))
$get(t_title)
$if($strcmp(%singletrack%,1),$transition($get(t_extra),$get(color_sgl2),$get(color_sgl3)),$get(color_tec)$get(t_extra))
// ALBUM REPLAYGAIN -MISSING-
//for MPC
$if($strcmp(%singletrack%,1),,
$if($stricmp($info(codec),musepack),$if($or(%__replaygain_album_peak%,%__replaygain_album_gain%),,0000FF|0000FF *))
//for MP3
$if($stricmp($ext(%_path%),mp3),$if($or(%__replaygain_album_peak%,%__replaygain_album_gain%),,0BB0E8|0BB0E8 *))
//for OGG
$if($stricmp($ext(%_path%),ogg),$if($or(%__replaygain_album_peak%,%__replaygain_album_gain%),,FF6666|FF6666 *)))
//RATING
$if($strcmp(%rating%,1),$get(color_alb)' *'$get(color_zer)' * * * *')
$if($strcmp(%rating%,2),$get(color_alb)' * *'$get(color_zer)' * * *')
$if($strcmp(%rating%,3),$get(color_alb)' * * *'$get(color_zer)' * *')
$if($strcmp(%rating%,4),$get(color_alb)' * * * *'$get(color_zer)' *')
$if($strcmp(%rating%,5),$get(color_alb)' * * * * *')
//GRID
$if($strcmp(%singletrack%,1),$get(color_sgl3)$repeat(' . ',130),$get(color_bac)
$if($strcmp($num(%tracknumber%,1),1),$get(color_gri)' '$repeat('?',100))
$repeat(' . ',130))
// END OF COLOMN FOUR
$repeat($char(9),$get(colomn_4))
// GRID TRANSITION
$if($strcmp(%singletrack%,1),$transition($upper($right(%_filename_ext%,3))
$if($stricmp($info(codec),musepack),$get(v_compression),$num(%__bitrate%,3)) ,$get(color_sgl2),$get(color_sgl3)),
$if($strcmp($num(%tracknumber%,1),1),
$transition($repeat('?',4),
$get(color_gri),$get(color_gho)),
$transition($upper($right(%_filename_ext%,3)) $num(%__bitrate%,3) ,$get(color_bac),$get(color_bac))))
// END OF COLOMN FIVE
$repeat($char(9),$get(colomn_5))
// LENGTH
$get(color_bac)
$ifgreater($len(%_length%),4,,0)
$get(color_tec)%_length%
// END OF COLOMN SIX
$repeat($char(9),$get(colomn_6))
// REPLAYGAIN INFO
$get(color_gri)
$if(%__replaygain_album_gain%,
$get(color_gho)'A',
$get(color_bac)'R')
$get(color_gri)
$if(%__replaygain_track_gain%,
$get(color_gho)'T',
$get(color_bac)'R')
Message édité par panzemeyer le 11-01-2004 à 02:03:33