<?sphp $this->text('pagetitle') ?>
 
Home of the Squeezebox™ & Transporter® network music players.

Setup dynamic menu to browse music by tags

From SqueezeboxWiki

Revision as of 15:01, 30 June 2010 by Soulkeeper (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Contents

Overview

This example shows how to set up a dynamic browse menu that allows one to browse music in any order and number of levels. The idea is to browse music by any relevant tag, whether or not it is supported by standard SqueezeCenter (formerly known as SlimServer). The following example is based on classical music, but the same principles may be use for other types of information.

Consider this example as a guide on how to use the "Dynamic Tag" menu, which is added when using the Custom Browse plugin and Custom Scan plugin; the exact tags and menu structures used are not that important --- the main purpose is to show some of the possibilities with these plugins.

Suppose we would like to set up a browse menu structure on the main level as follows:

Classical Music
  Albums
  Artists
  Composers
  Conductors
  Genres
  Works

When browsing down into "Composers", all composers should be shown. When we select a specific composer, such as "Beethoven", we should again get a choice of which tag to browse:

Classical Music
  Albums
  Artists
  Composers
    Beethoven
      Albums
      Artists
      Conductors
      Works
      Genres
      Matching Albums
      Matching Songs
    Mozart
  Conductors
  Genres
  Works

When browsing right when on a single track, we would also like to see a "Tags" menu beside the standard elements already available there, that has the following main menu structure.

Classical Music
  Albums
  Artists
  Composers
  Conductors
  Genres
  Works

The values below "Works", "Composers", Artists" and "Genres" should be limited to those of the selected song, thus making it possible to find other music from the same composer and other performances of the same work.

When selecting a song in the web interface we would like to show the following information besides the standard information available in this page

Work: <Work>

The following information also relating to this configuration is already available in the the song details in the web interface:

Composer: <Composer>
Conductor: <Conductor>
Band: <Band>
Artist: <Artist>

The idea of this description is to provide a more detail regarding setup of the Multi Library, Custom Scan and Custom Browse plugins, and to illustrate some possibilities. This example focuses on how to setup a "Dynamic Tag" menu type.

Installation

To set this up you will have to have installed the following plugins

Note, the Multi Library plugin is only used to limit the new menus to classical music; if you would like the new menu to show all genres of music you don't need the Multi Library plugin. In this case you don't need to specify the "Library" parameters in the instructions below.

If you are using SlimServer 6.5 or earlier, you might want to look at the old guide instead.

Tagging

Not all the information used in this example is part of the standard tags for music files that exist, so the first requirement is that the information exist in tags in your music files. To follow this example exactly, set your tags as follows:

Standard tags

Tag Type of information Example values
ARTIST Name of solist or main artist Vladimir Horowitz, Yo-Yo Ma
ARTISTSORT Name of solist, artist, composer or conductor used when sorting elements Horowitz Vladimir, Ma Yo-Yo, Mozart Wolfgang Amadeus, Bach Johann Sebastian, Albinoni Tomaso Giovanni, Previn Andre
COMPOSER Name of composer Wolfgang Amadeus Mozart, Johann Sebastian Bach, Tomaso Giovanni Albinoni
CONDUCTOR Name of conductor Andre Previn, Seiji Ozawa, James Levine
BAND Name of ensemble New York Philharmonic, Vienna Philharmonic, London Symphony Orchestra
GENRE Name of genre Concerto, Symphony, Overture, Quintet, String Quartet, Piano Sonata

Non standard custom tags

Tag Type of information Example values
WORK Name of the work Piano Concerto No. 5, Piano Concerto No. 9, Piano Concerto No. 14
WORKSORT Name of the work used when sorting elements Piano Concerto No. 05, Piano Concerto No. 09,Piano Concerto No. 14

Scanning custom tags

The first thing to do is to make sure the custom tags are scanned into the SqueezeCenter database. Before this we have of course used tagging software to put the tags in our music files. We have stored the tag as a single value with a semicolon character separating different values, for example:

GENRE="Classical;Piano Sonata"

Custom Scan will use the standard MULTIPLE ITEMS IN TAGS setting found under "SqueezeCenter Settings/Music Library" for the separator character, so make sure this is set to the semicolon character, or use the separator characters you have configured when setting the tags in the music files.

  1. Goto SqueezeCenter Settings/Plugins/Custom Scan in the web interface
  2. Click the Custom Tag scanning module to change it settings as
    • Enable in automatic and full scans: Selected
    • Tags to scan: WORK,WORKSORT
    • Sort tag mapping: WORK=WORKSORT
  3. Click Apply to save the change
  4. Select the settings section "Manage scanning" and then click the Scan link beside the Custom Tag scanning module

The custom tag information has now been scanned into the SqueezeCenter database, it will still not be shown anywhere though. I'm not sure how the SqueezeCenter standard tags will work with all file formats, in case the composers or conductors don't appear later on you might need to enter these also in Tags to scan.

Now, we also want to be able to freely combine information in standard SqueezeCenter and the custom tags, to make this possible we also need to make sure the Mixed Tag scanning module is run:

  1. Goto SqueezeCenter Settings/Plugins/Custom Scan in the web interface
  2. Click the Mixed Tag scanning module to change its parameters as:
    • Enable in automatic and full scans: Selected
    • Album tags: ALBUM
    • Artist tags: ARTIST
    • Composer tags: COMPOSER
    • Conductor tags: CONDUCTOR,ARTIST
    • Band tags: BAND,ARTIST
    • Genre tags: GENRE
    • Include custom tags: Selected
    • Names to show for user: ALBUM(Album:Albums),ARTIST(Artist:Artists),GENRE(Genre:Genres),YEAR(Year:Years),CONDUCTOR(Conductor:Conductors),COMPOSER(Composer:Composers),BAND(Band:Bands),TRACKARTIST(Track Artist:Track Artists),ALBUMARTIST(Album Artist:Album Artists),WORK(Work:Works)
  3. Click Apply to save the change
  4. Select the settings section "Manage scanning" and then click the Scan link beside the Mixed Tag scanning module

Note!

Whenever you run the Custom Tag scanning module manually, you will also have to remember to run the Mixed Tag scanning module. When you use the Scan All links or just perform a SqueezeCenter re-scan this will happen automatically, but if you run a single scanning module, for example as described above, you will have to remember to run them both.

Creating library for classical music

To make it easier to differ between classical music and non classical music we need to start by creating a virtual library for the classical music.

Classical library

  1. Got "Extras/Multi Library" in the web interface
  2. Select Create new library and then select the library type Standard library
  3. Change library configuration parameters:
    • Library name: Classical Music
    • Include genres: Mark Classical
    • Included internal menus: Deselect all checkboxes
    • Show in home menu: Deselect for now
  4. Click Next and enter filename: classical.ml.values.xml
  5. Click Save to store the library

Non classical library

  1. Go to "Extras/Multi Library" in the web interface
  2. Select Create new library and then select the library type Dependent library
  3. Change library configuration parameters:
    • Library name: Standard Music
    • Excluded contents of libraries: Select Classical Music
    • Included internal menus: Deselect all checkboxes
    • Show in home menu: Deselect for now
  4. Click Next and enter filename: standard.ml.values.xml
  5. Click Save to store the library

It doesn't really matter how you define your libraries, we have choose to identify classical music by a genre called Classical in this example, but you may want to identify it by a number of genres or by entering one of the directory parameters.

The only thing these library will do in this example is to make it easier to have different information in the song details menus and pages for classical and non classical music.

Creating browse menus

Now it's time to start creating the browse menu

  1. Goto "SqueezeCenter Settings/Plugins/Custom Browse" in the web interface
  2. Select the settings section 'Manage menus and click the Create new menu link
  3. Select the menu type: Dynamic Tags
  4. Change menu parameters
    • Menu name: Classical Music
    • Limit to these tags: ALBUM,ARTIST,CONDUCTOR,COMPOSER,GENRE,WORK
    • Library: Classical Music
  5. Click Next and enter filename: classicalmusicdynamictags.cb.values.xml
  6. Click Save to store the changes

After this you should have a Classical Music menu under the Browse/Custom Browse menu which contains the new menu we have setup. This is the time to try out the menu and make sure it work correctly before you continue.

Move the browse menus

At the moment the Classical Music menu only exists inside the Custom Browse menu, we like this to be moved outside Custom Browse and into the standard Browse menu. To do this do as follows:

  1. Goto "SqueezeCenter Settings/Plugins/Custom Browse" in the web interface
  2. Select the settings section 'Enabled menus
  3. Select the Show in browse and home menu column for our new "Classical Music" menu.
  4. Click Apply to store the changes

The Classical Music menu should now be available directly in the standard Browse menu.

Configure Song Info web page

The next step will be to add Work to the Song Info page in the web interface.

  1. Goto "SqueezeCenter Settings/Plugins/Custom Browse" in the web interface
  2. Select the settings section 'Manage header/footer items and click the Create new menu link
  3. Select the menu type: Custom Tags Songs for song
  4. Change the menu parameters:
    • Menu name: Work
    • Menu prefix: Work
    • Level 1 tag name: WORK
    • Library: Classical Music
    • Object type: trackheader
  5. Click Next and enter filename: trackheaderworks.cb.context.values.xml
  6. Click Save to store the changes

It is the Object type parameter that controls that the menus should be used for the Song Info page, so setting those to trackheader is really important.

The work should now be shown in the Song Info page in the web interface when showing a song. Note however, that it is only shown when selecting a song from one of the Custom Browse menus, we like to show it also when selecting a song from the current playlist, to accomplish this follow the next section.

Always use customized Song Info page

To make sure the customized Song Info page is used in all situations, we need to change the SqueezeCenter skin to one of the skins provided with the Custom Browse plugin.

  1. Goto SqueezeCenter Settings in the web interface
  2. Select Interface section
  3. In the Web Interface parameter at the top select one of the skins that end with CB, currently ClassicCB, DefaultCB and FishboneCB is available.
  4. Click Apply to store the changes

The customized Song Info page will now be shown in all situations, the same is also for the customized album and artist pages that come with Custom Browse, which have a page header.

Configure Now Playing menu for classical music

It's now time to configure the menu shown when clicking the right arrow on the remote when standing on a song, for example in the Now Playing menu.

  1. Goto "SqueezeCenter Settings/Plugins/Custom Browse" in the web interface
  2. Select the settings section 'Manage header/footer items and click the Create new menu link
  3. Select the menu type: Dynamic Tags for song
  4. Change the menu parameters:
    • Menu name: Classical Music
    • Limit to these tags: ALBUM,ARTIST,COMPOSER,CONDUCTOR,GENRE,WORK
    • Library: Classical Music
    • Object type: track
  5. Click Next and enter filename: trackclassicalmusicdynamictags.cb.context.values.xml
  6. Click Save to store the changes

It is the Object type parameter that controls that the menus should be used for the Now Playing menu, so setting those to track is really important.

The configuration of the Now Playing menu is now finished. When the song details on a classical music song you should see our new "Classical Music" menu.