Onkel Andy, care to share the popups code only please?
I have updated the popup code a little bit. Now it looks even nicer and displays icons when the song has lyrics embedded and/or album art. Additionaly I have implemented some sort of logic if you use the comment-tag for info on what soundtrack or single a track was released. Look at the code and comments...
$if($findfile(Z:\_artists_\%artist%.jpg),
$puts(artist_path,Z:\_artists_\%artist%.jpg),
$puts(artist_path,$replace($replace(%path%,$directory(%path%),),%filename_ext%,%artist%.jpg)))
$puts(config_name,%__CONFIG_NAME__%)
$puts(foo_path,%__FOO_PATH__%)
$puts(art_path,%__ART_PATH__%)
$puts(time_of_year,$right($substr(%last_played%,9,10),2)'. '$select($substr(%last_played%,6,7),January,February,March,April,May,June,July,August,September,October,November,December)'
'$substr(%last_played%,1,4))
$puts(time_of_day,$substr(%last_played%,12,13)$substr(%last_played%,14,16))
$puts(row.height,15)
$puts(row.width,0)
$puts(icon,0)
//If you put Information about Single or Soundtrack in your comments, this information will be displayed as Album Info!!
//To disable this behaviour, just replace the "2" by a "1"
$puts(comment,$if(%comment%,$if($or($strstr(%comment%,'Single'),$strstr(%comment%,'Soundtrack')),2,1),0) )
$if($findfile($get(artist_path)),$puts(artist_size,$ifequal(%el_item_count%,1,%__ART_SIZE__%,200)),$puts(artist_size,0))
$if($imageabs(1,1,0,0,%path%,artreader),$puts(cover_size,%__ART_SIZE__%),$puts(cover_size,0))
$puts(space,0)
$puts(deb,1)
$puts(ind,5)
$if($findfile($get(artist_path)),$imageabs(1,1,200,200,$get(artist_path),,nodisplay))
////Calculate height and width////
$ifequal(%el_item_count%,1,
$if($or(%lyrics%,%unsynced lyrics%),$puts(row.width,$add($get(row.width),30)) )
$if($imageabs(1,1,0,0,%path%,artreader),$puts(row.width,$add($get(row.width),30)) )
$if(%artist%,
$puts(row.width,$gettextwidth(Artist: %artist%,Arial,9,bold))
$puts(row.height,$add($get(row.height),15)) )
$if(%original artist%,
$puts(row.width,$max($get(row.width),$gettextwidth('Original Artist: '%original artist%,Arial,9,bold)) )
$puts(row.height,$add($get(row.height),15)) )
$if(%origartist%,
$puts(row.width,$max($get(row.width),$gettextwidth('Original Artist: '%origartist%,Arial,9,bold)) )
$puts(row.height,$add($get(row.height),15)) )
$ifequal($get(comment),2,
$puts(row.width,$max($get(row.width),$gettextwidth('Album: '%comment%,Arial,9,bold)) )
$puts(row.height,$add($get(row.height),15)),
$if(%album%,
$puts(row.width,$max($get(row.width),$gettextwidth('Album: '%album%,Arial,9,bold)) )
$puts(row.height,$add($get(row.height),15)) ) )
$if(%title%,
$puts(row.width,$max($get(row.width),$gettextwidth('Title: '%title%,Arial,9,bold)) )
$puts(row.height,$add($get(row.height),15)) )
$if(%featuring%,
$puts(row.width,$max($get(row.width),$gettextwidth('Featuring: '%featuring%,Arial,9,bold)) )
$puts(row.height,$add($get(row.height),15)) )
$if(%remixed by%,
$puts(row.width,$max($get(row.width),$gettextwidth('Remixed by: '%remixed by%,Arial,9,bold)) )
$puts(row.height,$add($get(row.height),15)) )
$if(%date%,
$puts(row.width,$max($get(row.width),$gettextwidth('Year: '%date%,Arial,9,bold)) )
$puts(row.height,$add($get(row.height),15)) )
$if($or(%genre%,%publisher%,%bitrate%),
$puts(row.height,$add($get(row.height),18)))
$if(%genre%,
$puts(row.width,$max($get(row.width),$gettextwidth('Genre: '%genre%,Arial,9,bold)) )
$puts(row.height,$add($get(row.height),15)))
$if(%publisher%,
$puts(row.width,$max($get(row.width),$gettextwidth('Publisher: '%publisher%,Arial,9,bold)) )
$puts(row.height,$add($get(row.height),15)))
$if(%bitrate%,
$puts(row.height,$add($get(row.height),15)))
$if(%BPM%,
$puts(row.height,$add($get(row.height),15)))
$ifequal($get(comment),1,
$puts(row.width,$max($get(row.width),$gettextwidth('Comment: '%comment%,Arial,9,bold)))
$puts(row.height,$add($get(row.height),15)),)
$if(%play_counter%,
$puts(row.height,$add($get(row.height),15)) )
$if(%last_played%,
$puts(tags,$add($get(tags),1))
$puts(row.width,$max($get(row.width),$gettextwidth('Last played: '$get(time_of_year)' at '$get(time_of_day),Arial,9,bold)) )
$puts(row.height,$add($get(row.height),15)) )
$ifequal($get(comment),1,$puts(row.height,$add($get(row.height),18)),
$if($or(%play_counter%,%last_played%),
$puts(row.height,$add($get(row.height),18)) ))
,)
$puts(row.width,$add($get(row.width),$add(48,$max($get(artist_size),$get(cover_size)))) )
$ifequal(%el_item_count%,1,
$puts(width,$max(
$add(40,$gettextwidth(%artist% - %album% - %tracknumber% - %title%,Arial,9,bold)),
$get(row.width)) )
$puts(height,$max($add($add(58,$get(space)),$add($get(cover_size),$get(artist_size))),$add($get(row.height),60)))
,
$if($findfile($get(artist_path)),
$puts(width,224)
$puts(height,224),
$popuphide())
)
/////
// BACKGROUND //
$popupsize($get(width),$get(height))
$imageabs(0,0,$get(width),$get(height),$get(foo_path)'images/'%__CONFIG_NAME__%'/bg/popup.png',nokeepaspect,,250)
// Cover And Artist Picture//
$ifequal(%el_item_count%,1,
$if($findfile($get(artist_path)),$imageabs(12,40,$get(artist_size),$get(artist_size),$get(artist_path),nokeepaspect,) $puts(space,12),)
$imageabs(12,$add($add($get(space),40),$get(artist_size)),$get(cover_size),$get(cover_size),%path%,artreader,,)
,$imageabs(12,12,$get(artist_size),$get(artist_size),$get(artist_path),,)
)
//////Header Info/////
$puts(header,$if(%artist%,%artist%)$if(%album%, - %album%)$if(%tracknumber%, - %tracknumber%)$if(%title%, - %title%))
$font(Arial,9,bold)
$ifequal(%el_item_count%,1,$drawstring($get(header)
,0,15,$get(width),%el_height%,255-255-255,hcenter nowrap elipchar),)
$font(Arial,9,bold)
/////Additional Track Info/////
$ifequal(%el_item_count%,1,$drawtextex(
$if(%artist%,Artist: %artist%)
$if(%original artist%,$crlf()Original Artist: %original artist%)
$if(%origartist%,$crlf()Original Artist: %origartist%)
$ifequal($get(comment),2,$crlf()Album: %comment%,$if(%album%,$crlf()Album: %album%))
$if(%title%,$crlf()Title: %title%)
$if(%featuring%,$crlf()Featuring: %featuring%)
$if(%remixed by%,$crlf()Remix: $crlf()%remixed by%)
$if(%date%,$crlf()Year: %date%)
$if($or(%genre%,%publisher%,%bitrate%),$crlf(),)
$if(%genre%,$crlf()Genre: %genre%)
$if(%publisher%,$crlf()Publisher: %publisher%)
$if(%bitrate%,$crlf()Bitrate: %bitrate% Kbit/s)
$if(%BPM%,$crlf()BPM: %BPM%)
$crlf()
Filesize: $div(%_filesize%,1048576).$left($num($muldiv($mod(%_filesize%,1048576),100,1048576),2),2) $get(anno)'MB'
$crlf()
$ifequal($get(comment),1,$crlf()Comment: %comment%,)
$if(%play_counter%,$crlf()Playcount: %play_counter%)
$if(%last_played%,$crlf()Last Played: $get(time_of_year) at $get(time_of_day) )
,$add(24,$max($get(artist_size),$get(cover_size))),40,$sub(%el_width%,12),%el_height%,192-192-192,nowrap elipchar),)
////Icons for Lyrics and Artwork////
$ifequal(%el_item_count%,1,
$if($or(%lyrics%,%unsynced lyrics%),$imageabs($sub($get(width),35),38,15,15,$get(foo_path)'images/'$get(config_name)'/bt/vscrollbar_hide_on.png',,)$puts(icon,20),)
$if($imageabs(1,1,0,0,%path%,artreader),
$imageabs($sub($get(width),$add($get(icon),35)),38,15,15,
$get(foo_path)'images/'$get(config_name)'/bt/artists_show_on.png',,),))
CAN ANYONE HELP? I'm looking for a way to check whether the artwork is embedded as a tag or not. The %path%,artreader is true whenever some sort of art is found, means not only when artwork is embedded
P.S.: Feel free to optimize the code and re-post it here