Confused About Compilation File Organization

General discussions.

Moderator: moderators

Confused About Compilation File Organization

Postby rtilleryweb » Tue Oct 28, 2014 5:22 pm

I'm very new to Subsonic, and I'm trying to collect all my music onto my server. But I'm very confused by all the of the bits and pieces of information on how to organize songs from compilation CDs and the actual results I'm seeing with Subsonic.

I have a number of compilations (like Time-Life collections and soundtracks), as well as single-artist CDs, and MP3s I've purchased.

I'd like to organize these all so that I can have a consistent appearance on Subsonic, indexed by artist.

Single-artist CDs seems to work well. I've organized them by:
-> Artist -> Album -> <track>-<song>.flac
With this, all the artists show in the left panel, and the CDs show up on the right. Cool.

I tried placing the MP3s in a single Various Artists directory, but the artists didn't show up on the left. Instead, a Various Artists entry appeared. Clicking on that, I got the list of songs on the right.
I then tried placing each MP3 in a separate artist directory, like the CD cuts (most with only one song in them), and that seems to work.
-> Artist -> <artist>-<song>.mp3
Some comments online indicated that there were alternatives to this, but this was the only combination that seemed to work for me.

But then there are the Various Artist discs. Like the MP3s in a single directory, the artists don't show up on the left. The albums themselves only show when the Various Artists entry is clicked. The songs are all tagged with "Various Artists" as the albumartist and the artist and title set for the specific song. Some online instructions seemed to say using the albumartist and artist fields this way is enough to get them to integrate into the artist list. But it doesn't seem to work for me. Surely I don't have to divide all the Various Artist CD contents into artist-based directories for Subsonic to recognize them, do I?

Any assistance appreciated.

rtilleryweb
rtilleryweb
 
Posts: 2
Joined: Tue Oct 28, 2014 4:53 pm

Re: Confused About Compilation File Organization

Postby rtilleryweb » Wed Nov 05, 2014 5:38 am

Well, with no responses, and as I mentioned, no luck with Google, it appears that handling of compilations is something that SubSonic doesn't do particularly well. At some point I may try to dig into the code to see if I can add such a feature, but for now, I opted to try my hand at a bash script that would automate creating links to songs in albums of various artists.

The script was designed for use with files ripped to flac, and it uses the metaflac command.

When groups of Various Artist collections (compilations, soundtracks, etc.), their original grouping by album can be maintained. My belief is that this will be more compatible with other software or if/when SubSonic is updated with more direct support. These albums can be grouped under a "Various Artists" directory. However, to keep SubSonic from indexing these songs into a "Various Artists" artist, a dot directory can be used, like ".Various Artists". e.g:

Code: Select all
/media/
  music/
    .Various Artists/
      Guitar Rock Disc 1/
       01-The Jimi Hendrix Experience-Purple Haze.flac
       02-Bad Company-Feel Like Makin' Love.flac
       ...
     Guitar Rock Disc 2/
       01-The Moody Blues-I'm Just A Singer (In A Rock And Roll Band).flac
       02-Rod Stewart with The Faces-(I Know) I'm Losing You.flac
      ...


Then, from the base of the music directory (/media/music in this example), use the script below like this:

Code: Select all
  va.sh ".Various Artists"


This will create a set of directories for each artist (from the "artist" tag), and fill them with symbolic links to the audio files, using relative paths. The names will be the same as the linked files, except any number will be stripped. e.g:

Code: Select all
/media/
  music/
    The Jimi Hendrix Experience/
      The Jimi Hendrix Experience-Purple Haze.flac -> ../.Various Artists/Guitar Rock Disc 1/01-The Jimi Hendrix Experience-Purple Haze.flac
    Bad Company/
      Bad Company-Feel Like Makin' Love.flac -> ../.Various Artists/Guitar Rock Disc 2/02-Bad Company-Feel Like Makin' Love.flac
    The Moody Blues/
      The Moody Blues-I'm Just A Singer (In A Rock And Roll Band).flac -> ../.Various Artists/Guitar Rock Disc 2/01-The Moody Blues-I'm Just A Singer (In A Rock And Roll Band).flac
    Rod Stewart with The Faces/
      Rod Stewart with The Faces-(I Know) I'm Losing You.flac -> ../.Various Artists/Guitar Rock Disc 2/02-Rod Stewart with The Faces-(I Know) I'm Losing You.flac
...


Also, the script should handle collisions of the same artist and title by renaming one using an index. This is so that both versions appear, in case they are different versions of the same song. Differentiation would need to be done based on the album, which doesn't appear to show up in the SubSonic web page, but does seems to show in some other clients.

Anyway, this script is provided as-is, with no warranty, expressed or implied, and with no copyright, so you can do as you want with it.

Oh, and if you find you want to remove the results of this script, I've found these two commands, issued in that same base directory, do the trick, assuming a similar setup to that described above is used:

Code: Select all
  find . -type l -name '*.flac' -execdir rm {} \;
  rmdir *


One last note. I'm not an expert bash script writer, so I'm sure there are better ways of doing this, but it seems to work for my purposes, so I thought I'd share. Here is the script:
Code: Select all
#!/bin/bash

for dir in "$@"
do
  echo "processing dir=" "$dir"
  find -L "$dir" -name "*.flac" | while read -r file
  do
    echo "processing file=" "$file"
    artdir="$( metaflac --show-tag=artist "$file" | sed 's/artist=//' )"
    justname="$(basename "$file")"
    namenonum=$( echo "$justname" | sed 's/[0-9]*[-.]//' )
    if [ ! -d "$artdir" ]; then
        mkdir "$artdir"
    fi
    noext=$( echo "$namenonum" | sed 's/.flac//' | sed 's/.mp3//' )
    num=0
    while [ -f "./$artdir/$namenonum" ]
    do
        num="$(($num + 1))"
        namenonum="$noext-$num.flac"
    done
    ln -s "../$file" "./$artdir/$namenonum"
  done
done


rtilleryweb
rtilleryweb
 
Posts: 2
Joined: Tue Oct 28, 2014 4:53 pm

Re: Confused About Compilation File Organization

Postby KicknGuitar » Sun Nov 30, 2014 9:17 pm

Oh, I'll have to look into this, I just switched from MusicCab to MadSonic and the lack of tag reading (i.e. Various Artists as ") has been killing me. Subsonic should have an option to read & display media by their tags.
The beauty of sharing one's work:
Subsonic • MusicCabinet • Madsonic
KicknGuitar
 
Posts: 39
Joined: Tue Oct 09, 2012 3:57 am


Return to General

Who is online

Users browsing this forum: No registered users and 33 guests