Display Albums, by ALBUMARTIST & not by ARTIST

Refer to this tracklist from an album by name, “Athu Oru Kanakkaalam”, composed by, “Ilayaraja”:
Track Number. Title - Artist - Composer/AlbumArtist/Album Artist

  1. Andha Naal Nyabagam - Vijay Yesudas, Shreya Ghoshal - Ilayaraja
  2. Kaattu Vazhi - Ilayaraja - Ilayaraja
  3. Unnala Thookkam - Ranjith, Malathi - Ilayaraja
  4. Kili Thattu - Bhavatharini, Jothi - Ilayaraja
  5. Ennada Nenacha - Ranjith, Vijay Yesudas - Ilayaraja

Refer to this tracklist from an album by name, “Lagaan”, composed by, “A.R. Rahman”:
Track Number. Title - Artist - Composer/AlbumArtist/Album Artist

  1. Ghanan Ghanan - Lagaan - Udit Narayan, Alka Yagnik, Sukhwinder Singh, Shankar Mahadevan, Shaan, Kishori Gowarikar & Chorus - A.R. Rahman
  2. Mitwa - Lagaan - Alka Yagnik, Udit Narayan, Sukhwinder Singh & Srinivas - A.R. Rahman
  3. Radha Kaise Na Jale - Lagaan - Asha Bhosle, Udit Narayan, Vaishali & Chorus - A.R. Rahman
  4. O Rey Chhori - Lagaan - Alka Yagnik, Udit Narayan, Vasundhara Das - A.R. Rahman
  5. Chale Chalo - Lagaan - A.R. Rahman, Srinivas & Chorus - A.R. Rahman
  6. Waltz for a Romance - Lagaan - Instrumental - A.R. Rahman
  7. O Paalanhaare - Lagaan - Lata Mangeshkar, Udit Narayan & Chorus - A.R. Rahman
  8. Lagaan…Once upon a Time in India - Lagaan - Anuradha Sriram & Chorus - A.R. Rahman

    I would like the Albums to be listed as:
  • Athu Oru Kanakkaalam
    Ilayaraja
  • Lagaan
    A.R. Rahman

And not like this:
Volumio_Screenshot_002.png
That’s a lot of entries for a single album.

Almost always, Indian content is mostly songs for films. And there are a lot of singers & lots of tracks. So sorting by Artist will never work for us.
Every film has only one composer, so we tag songs with “COMPOSER”, “ALBUM ARTIST” & “ALBUMARTIST”. All these fields represent only the COMPOSER.

And I’m not sure how and from where, the second track has the “Composer’s Picture”. Reason maybe, since for this particular track, he’s the composer as well as singer… His name is there in artist tag and Volumio pulled a picture of it from the internet…

Instead, a better option would be… the list can use pictures tagged within the tracks as “Front Cover”, “Media”, “Back Cover”, “Artist” & “Icon” or if there are no pictures tagged into tracks, then Volumio can search for pictures from the same directory as the tracks and use them…

Also, if the track is tagged with more than one picture, or if the directory has more than one picture, clicking on the picture in Volumio’s UI should bring the next pictures. Or, Volumio can also auto cycle pictures every 1 minute or 30 seconds…

This is also something that could be handle by MusicBrainz with the AlbumID, check this suggestion -> using-musicbrainz-tags-t5592.html
But I agree, having the option to use either ARTIST or ALBUMARTIST would shouldn’t be too difficult.

+1 for this. I have 54 “various artist” compilation albums in my library but the Album library list shows them as 1,388 “albums”, i.e. one “album” per track!

Would it be possible to get this old PHP logic converted into the new v2 engine?:

$artist = $songData[“AlbumArtist”] ? $songData[“AlbumArtist”] : ($songData[“Artist”] ? $songData[“Artist”] : “Unknown”);

replace /volumio/app/plugins/music_service/mpd/index.js with following code and the album list should group into albumartists instead of artists.
make a backup of the existing file before overwriting!

pastebin.com/NtrBYTN7

reboot volumio

I haven’t tried this to see its effects, but if you think that it is an enhancement to Volumio, write it up on the Github site https://github.com/volumio/Volumio2 and add a pull request.

to be a good enhancement it should check if the album artist is set and if not fallback to artist. sadly my skills are not that good. this right now just replaces artist with album artist which might break display for some users.

but your skills are much better than mine! Thanks for the idea but I just checked my library and only half of my songs have an AlbumArtist. So, if I used your code, does that mean I would only see the songs which have an AlbumArtist?

first: this is not my code, just saw there was a fix of this issue by fanciulli on github [1] where I changed two parameters for the album list.

I just tested it: If there is no Album Artist set it will use Artist instead already! So you will have those albums multiple times in the albumlist with the different trackartists. If you click on it, you see the full album, not just the tracks with the one trackartist.

[1] github.com/volumio/Volumio2/com … ff=unified

1 Like

I have just begun using Volumio on a Raspberry Pi 4. I must say that I like Volumio a lot and I have just updated to the new version 3. However, my library contains over 3000 albums all tagged by "Album Artist’ for the whole album (let’s say “Miles Davis”) and “Artist” for particular tracks on the album (let’s say track1. “Miles Davis, Wayne Shorter, … etc”; track 2. Miles Davis, John Coltrane, … etc ") and so on. Volumio’s indexing system seems to see albums like these where there are different “Artists” but the same “Album Artist” as not one but several albums so that my library of over 3000 albums has become a library of over 4000 albums! It is also very difficult to search because I don’t know whether to look for Album Artists or Artists. So I was pleased to find this old thread that suggested there might be a way to edit the /volumio/app/plugins/music_service/mpd/index.js file to force Volumio to index by Album Artist where the Album Artist tag is populated. My questions are 1) does the script at pastebin.com/NtrBYTN7 really make this happen? and 2) if the script worked in version 2 will it still work in version 3? This is a beginner’s question and I hope someone with a little more experience than I have can help. I am reasonably confident with text editing in ssh. Thanks in anticipation.

Please check your setting in Sources:

1 Like

Thanks for your reply Wheaten. This setting is as it is in your screen shot!

I have had another look at this and I am now sure that this problem only occurs with .flac files and not .mp3 files (my library is made up entirely of flacs and mp3s). In other words, if an album of .mp3 files has an Album Artist “A” but different Artists for different tracks then this Album will be listed correctly as one Album by Album Artist “A” in the Volumio Albums library. But if an Album of .flac files has Album Artist “A” but, say, tracks 1, 2 and 3 with the Artist field tagged “a, b, c, d” but tracks 4, 5 and 6 with the artist field tagged “a, e, f, g” this will, show in the library as TWO Albums, one under Artist “a, b, c, d” and the other under Artist “a, e, f, g”. You will see how this makes the library very difficult to navigate. Does anybody have a similar issue, or any idea about how to solve this problem so that ALL Albums, whatever the file type they contain, are catalogued by Album Artist? Thanks in anticipation of a helpful response.

I can’t confirm this. If I go via artist I only have an overview of album artists.
Is there a difference between the tagging in MP3 and Flac in your library?

example, Pop Classics - The Long Version 1

Volumio:
image

I’ve seperated multiple artist with “;”

image

So maybe you should perform a rescan of the library.

I think I have solved this issue. I noticed that (at least on a Windows PC) in a flac file’s Properties the Album Artist field is not populated even when the Tag for Album Artist is filled. So I guessed that Volumio was reading the Properties of files in the library rather than their Tags. I found a Tag Editor which would fill this field (“db PowerAmp Edit ID Tags”) so I re-edited the files’ tags with this. Volumio is now displaying Albums by Album Artist. It is a time consuming solution but it works so I hope others will find it useful.

A script was created to combine participating artists in the same directory (same album) with “&” and write them to the album artist. (tag.py)
I also wrote a script to do it all at once. (change.bat)

The folder structure should be as follows
top~\albumA*.flac

–example–

Put the two script files in the same directory as top. Then start .bat.

Translated with www.DeepL.com/Translator (free version)

--------------------change.bat---------------
@echo off
setlocal

set ROOT=%~dp0
set count=1

for /r “%ROOT%” /d %%d in (*) do (
pushd “%%d”
for /f “usebackq delims=” %%i in (dir /b /ad "%%d" 2^>nul ^| find /v /c "") do set count=%%i
setlocal enabledelayedexpansion
if “!count!”==“0” (
endlocal
xcopy /y “%~dp0\tag.py” “%%d”
cd “%%d”
python tag.py
del tag.py
)
endlocal
popd
)

pause

------------------tag.py-------------------------(Installation required) pip install mutagen

import os
import glob
import mutagen.flac

directory = os.getcwd()

flac_files = glob.glob(os.path.join(directory, “*.flac”))

artist_set = set()

for flac_file in flac_files:
flac = mutagen.flac.FLAC(flac_file)
artist_set.update(flac.get(“artist”))

album_artist = " & ".join(sorted(artist_set))

for flac_file in flac_files:
flac = mutagen.flac.FLAC(flac_file)
flac[“albumartist”] = album_artist
flac.save()