perlscript to set path to itune music library.xml

FireFly Media Server Firefly Media Server Forums Firefly Media Server Add-on Software perlscript to set path to itune music library.xml

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #2166
    dutchm
    Guest

    For those who like me wish to store their music folder on a nas but create their play list in itunes I have created a simple perl script to make setting the path of the music folder simple and quick. It can be run from the command line on your nas with “perl -w musicpath.pl” as long as your nas has perl installed. Simply edit the paths in your favorite text editor to suit your needs. Enjoy!

    1. create playlist in itunes
    2. move “iTunes Music Library.xml” to your nas itunes folder location
    3. run perl script to edit .xml path locations
    4. rescan in firefly to pick up the new playlists

    [/code]
    #! /usr/bin/perl -w

    #Simple perl script to open the iTunes music library.xml and reset path to whatever
    #Useful if your itunes music folder is located on your nas instead of your local drive.
    #Enjoy

    #Enter the path of your music folder as seen by iTunes on your pc
    $find = ‘file://localhost//Mybookworld/music/’;

    #Enter the path of your music folder as seen on the nas
    $replace = ‘file://localhost/music/’;

    #Enter the path of the iTunes Music Library.xml
    open (IN, “+;

    seek IN,0,0;

    foreach $file (@file){
    $file =~ s/$find/$replace/g;
    print IN $file;
    }
    close IN; 💡

Viewing 1 post (of 1 total)
  • The forum ‘Add-on Software’ is closed to new topics and replies.