:: gregory zwart ::      

 

Friendly Links script

The HP Digital Entertainment Center rips audio CDs and stores the files using names based on the CDDB ID of the ripped track. This script creates a directory tree of "friendly" symbolic links that point to the original DEC files. Rather than using an unfriendly, CDDB ID-based name, the symbolic link hierarchy uses names based on the actual artist, album, and track information. The script also creates an album playlist of all of the files for each ripped album (in the correct order).

The script is particularly useful if you're using the network file sharing feature of the DEC or you've installed Apache::MP3, as it allows you to browse through your music collection using the friendly names of the tracks.

The "unfriendly" tree uses a format such as:

  • cc0e5b0e_ea7e785a_01.mp3
  • cc0e5b0e_ea7e785a_02.mp3
  • cc0e5b0e_ea7e785a_03.mp3
  • 7408f209_ad78caa0_01.mp3
  • 7408f209_ad78caa0_02.mp3
  • 7408f209_ad78caa0_03.mp3
  • f0113a0f_11bf5122_01.mp3
  • f0113a0f_11bf5122_02.mp3
  • f0113a0f_11bf5122_03.mp3

The "friendly" tree uses a format such as:

  • 10,000 Maniacs
    • MTV Unplugged
      • _playlist.m3u
      • These Are The Days
      • Eat For Two
      • Candy Everybody Wants
  • AC/CD
    • Who Made Who
      • _playlist.m3u
      • Who Made Who
      • You Shook Me All Night Long
      • D.T.
  • Aerosmith
    • Big Ones
      • _playlist.m3u
      • Walk On Water
      • Love In An Elevator
      • Rag Doll

Prerequisites

There are a few prerequisites required before the friendly_links.pl can be used:

  1. You will need to hack the DEC before you can install this script. The process to hack the DEC can be found by perusing the HP DEC Yahoo group.
  2. Enable file sharing on the DEC.

Download

Instructions

To install and configure friendly_links.pl:

  1. Create a "mapping" directory within one of the exported network shares. The recommended directory is /content/exported-music/mappings.
  2. Edit the configuration parameters within the script to match your configuration. In most cases, the defaults will be sufficient.
  3. Copy the script to the DEC
  4. Run the command: perl <path-to-friendly_links.pl>.
  5. Better yet, schedule the script. This will always keep the links up to date:
    • Edit the /etc/cron.fiji/fiji.cronjobs file
    • Add the following line to the file, which will run the script every 30 minutes:
      0,30 * * * * perl <path-to-friendly_links.pl>
    • Save the crontab
 
©2002, gregory zwart