Freevo

- User Documentation

# PluginAudioAlbumTree

This Plugin is not available in the core distribution.

You can download the latest version at http://members.home.nl/gvoncken/mvo/

Author: Martijn Voncken (mvoncken at gmail.com)

## Summary

Plugin to browse songs in a tree-like way.

Requires pysqlite.

Tested on freevo 1.5.3 and a 12499 mp3/6.4 MB database.

freevo2 has no stable database implementation yet (doesn't need to be sql)

## Screenshots

## Pre Installation

The sqlite-meta-database should be available.

The audio.logger plugin also uses this database,you can skip the pre-installation if this plugin is already sucesfully installed.

- install pysqlite,sqlite

- edit your local_config.py : Configure AUDIO_ITEMS (AudioConfig ,don't leave it at the default!)

- run `freevo cache`

- wait.....

- The meta database should be available now.

## Installation

- Download freevo-audio-albumtree-0.x.x.tar.gz

-     su root
      tar -zxvf freevo-audio-albumtree-0.x.x.tar.gz
      cd freevo-audio-albumtree-0.x.x
      python setup.py install
      exit

## Configuration

- Edit your local_config.py and add this:

    plugin.activate('audio.album_tree')
    AUDIO_ALBUM_TREE_SPEC = []

    #You could add all trees below:, but you probably only want 1 or 2 of them:
    AUDIO_ALBUM_TREE_SPEC.append({'name':'Artist/Album/Track'
         ,'spec':["artist","album","track||'-'||title"]
         ,'alt_grouping':[None,None,'track']
        })
    #A case sensitive tree like above...
    #Is easy to convert to a convert to a case insensitive tree like below:
    AUDIO_ALBUM_TREE_SPEC.append({'name':'nocase:artist/album/Track'
         ,'spec':["lower(artist)","lower(album)","track||'-'||title"]
         ,'alt_grouping':[None,None,'track']
        })

    #my favorite layout:
    AUDIO_ALBUM_TREE_SPEC.append({'name':'(A-Z)/Artist/Album-Year/Track'
        ,'spec':["upper(substr(artist,0,1))"
                ,"artist","album||'-'||year"
                ,"track||'-'||title"]
        ,'alt_grouping':[None,None,'year||album','track']
        })

    #you can comment out a tree definition like this:
    #AUDIO_ALBUM_TREE_SPEC.append({'name':'Artist-Album/Track'
    #    ,'spec':["artist||'-'||album","track||'-'||title"]
    #    ,'alt_grouping':[None,'track']
    #    })

    #More Examples:
    AUDIO_ALBUM_TREE_SPEC.append({'name':'Year/Artist-Album/Track'
        ,'spec':["year","artist||'-'||album","track||'-'||title"]
        ,'alt_grouping':[None,None,None,'track']
        })

    AUDIO_ALBUM_TREE_SPEC.append({'name':'Dirtitle/Artist/Album/Track'
        ,'spec':["dirtitle","artist","album","track||'-'||title"]
        ,'alt_grouping':[None,None,None,'track']
        })

    #see http://www.sqlite.org/lang_expr.html for "scripting" functions
    #available fields in the meta database:id,dirtitle,path,filename,type,artist,title
    #,album,year,track,track_total,bpm,last_play,play_count,start_time,end_time,rating

    #I need more fields in the meta-database for better trees!
    #Fields not in meta-database : genre,album_artist,comment,grouping,etc..

## Post Installation

New plugins are not immediately visible on the freevo webserver.

You might want to restart the freevo webserver after the installation of a new plugin.

Back to AudioPlugins

## Notes

mvo: I had some problems with freevo cache , only lower case .mp3's were scanned and the windows drive I mounted had some *.Mp3 and some *.MP3 albums.... Those wil not be scanned by freevo. 1.5.3 Pease mail me ,or better freevo-users@sourceforge.net if you have te same problem. I will submit a patch if there is some demand.

last edited 2005-05-19 17:49:01 by mvoncken
current version: http://freevo.sourceforge.net/cgi-bin/doc/PluginAudioAlbumTree