PDA

View Full Version : Patch for adding album art to listings



2005-01-21, 20:01
From kdf:

> Are you certain you have a 6.0 nightly and not the 5.4.1 nightly?

Yes, they came from here:

http://www.slimdevices.com/downloads/nightly/latest/6.0/SlimServer_v2005-01-21/Slim/Web/Pages.pm

> These lines are disabled in 6.0 builds, being as they are now part
> of a routine called browseid3_old().

Yes, I see that now. As I said in my prior message, I had no idea whether my changes would work with version 6.0 since I am not yet running that version of slimserver. I simply saw that the lines of code that I had commented out in 5.4.0 were still in the version 6.0 code. I didn't know that they were consigned to a subroutine no longer in use.

On a cursory glance, it looks like the following lines in browsedb might deal with the selection of the form:

if ($levels[$level] eq 'artwork') {
$params->{'browse_list'} .= ${Slim::Web::HTTP::filltemplatefile \
("browsedb_artwork.html", \%list_form)};
} else {
$params->{'browse_list'} .= ${Slim::Web::HTTP::filltemplatefile \
("browsedb_list.html", \%list_form)};
}

If so, then perhaps the selection condition could be changed to use browsedb_artwork.html anytime the browse level is 'album' or 'artwork'.

Taylor

kdf
2005-01-22, 03:37
Quoting trmp3 (AT) hoghill (DOT) net:

> >From kdf:
>
> > Are you certain you have a 6.0 nightly and not the 5.4.1 nightly?
>
> Yes, they came from here:
>
>
http://www.slimdevices.com/downloads/nightly/latest/6.0/SlimServer_v2005-01-21/Slim/Web/Pages.pm
>
> > These lines are disabled in 6.0 builds, being as they are now part
> > of a routine called browseid3_old().
>
> Yes, I see that now. As I said in my prior message, I had no idea whether my
> changes would work with version 6.0 since I am not yet running that version
> of slimserver. I simply saw that the lines of code that I had commented out
> in 5.4.0 were still in the version 6.0 code. I didn't know that they were
> consigned to a subroutine no longer in use.
>
> On a cursory glance, it looks like the following lines in browsedb might deal
> with the selection of the form:
>
> if ($levels[$level] eq 'artwork') {
> $params->{'browse_list'} .= ${Slim::Web::HTTP::filltemplatefile \
> ("browsedb_artwork.html", \%list_form)};
> } else {
> $params->{'browse_list'} .= ${Slim::Web::HTTP::filltemplatefile \
> ("browsedb_list.html", \%list_form)};
> }
>
> If so, then perhaps the selection condition could be changed to use
> browsedb_artwork.html anytime the browse level is 'album' or 'artwork'.

yes, you are correct. that part is easy enough. The patch to actually grab the
artwork for each browse mode, post earlier, is a bit trickier with 6.0. The
earlier patch basically does an loop to search through the cache for albums
matching the artist, genre or track and pulls artwork for one of those albums.
6.0 requires a query to the database. It should be much faster, but its not a
simple cut and paste :)

However, putting that together with the browsedb_artwork template would be a
very nice feature.

-kdf