Index: Music/Info.pm =================================================================== RCS file: /cvsroot/slim/server/Slim/Music/Info.pm,v retrieving revision 1.169 diff -u -r1.169 Info.pm --- Music/Info.pm 17 Dec 2004 22:33:00 -0000 1.169 +++ Music/Info.pm 21 Dec 2004 14:25:29 -0000 @@ -62,6 +62,8 @@ my ($currentDB, $localDB); +my %display_cache; + sub init { loadTypesConfig(); @@ -728,7 +730,6 @@ my $track = ref $pathOrObj ? $pathOrObj : $currentDB->objectForUrl($pathOrObj, 1); my $fullpath = ref $pathOrObj ? $track->url : $pathOrObj; - my $title; my $format; if (isPlaylistURL($fullpath) || isList($fullpath)) { @@ -746,9 +747,14 @@ $format = Slim::Utils::Prefs::getInd("titleFormat",Slim::Utils::Prefs::get("titleFormatWeb")); } - $title = infoFormat($fullpath, $format, "TITLE"); + my $ref = ($display_cache{$client} ||= {}); - return $title; + if (!isFile($fullpath) || $fullpath ne $ref->{fullpath} || $format ne $ref->{format}) { + $ref->{fullpath} = $fullpath; + $ref->{format} = $format; + $ref->{display} = infoFormat($fullpath,$format,'TITLE'); + } + return $ref->{display}; } #