bobertuk wrote: 
> Hi again erland,
> 
> I think I've found the code block used by Custom Browse to sort albums
> by artist...
> 
> ...
> 
> If I wanted to swap around the order text output is displayed in the
> WebUI:
> 
> From: Album (Artist)
> 
> To: Artist (Album)
> 
> Would that be an easy thing to do? If so - how? :)
> 
> Thanks
> 
> Bob
> 
Try something like this:

Code:
--------------------
    
  <option>
        <id>byartist</id>
        <name>Sort by artist</name>
        <itemformat>albumcustom</itemformat>
        <menulinks>number</menulinks>
        <menudata>
                select albums.id,concat(group_concat(distinct 
contributors.name), '(', albums.name ,')') from 
albums,contributor_album,contributors
                where 
                        albums.id=contributor_album.album and
                        contributor_album.contributor=contributors.id and
                        contributor_album.role in (1,5)
                group by albums.id
                order by contributors.namesort asc,albums.year 
desc,albums.titlesort asc,albums.disc asc
        </menudata>
  </option>
  
--------------------


I have not verified this myself, I'm just trying to give you some ideas,
they key changes are:
- Change itemformat from "albumconcat" to "albumcustom", I think this is
needed because "albumconcat" will add the album title first. If
"albumcustom" doesn't work, you can try to remove the
<itemformat>...</itemformat> row completely and see if that works, but I
think albumcustom should give you albumcovers while removing itemformat
row won't.
- Adjust the first line of the SQL so it starts by adding artist names,
then (, the name of the album, and )

The above doesn't handle compilations, so there is a risk compilation
albums are going to look strange.


------------------------------------------------------------------------
erland's Profile: http://forums.slimdevices.com/member.php?userid=3124
View this thread: http://forums.slimdevices.com/showthread.php?t=94975

_______________________________________________
discuss mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/discuss

Reply via email to