Script for creating my playlist?

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #907
    krolben
    Participant

    Hi all

    I have just installed mt-daapd on Ubuntu 6.10, and it seems to be running very fine 😀

    The next step is to create playlists of all my albums, to be used on my Soundbridge. Before updating the playlist file manually, I’d like to know if it’s possible to make some kind of script, that could do it for me. I have about 5500 songs, so the manual process of creating playlists for all albums would take many hours.

    The structure of my music folders is:
    /home/music/band name/album name/music file

    The naming convention I’d like to have in the playlist is:
    “band name – album title” {
    paths to songs
    }

    I am VERY new to linux, so I know nothing about scripting with it. I do work as a programmer, so I guess I can learn 😀

    Could someone give me an example of such a script, or direct me to somewhere where I can read about it?

    Thank you!

    #8033
    rpedde
    Participant

    @krolben wrote:

    The structure of my music folders is:
    /home/music/band name/album name/music file

    The naming convention I’d like to have in the playlist is:
    “band name – album title” {
    paths to songs
    }

    Not much of a shell scripter myself, but something like this ought to work:


    #!/bin/sh

    for artist in *; do
    if [ -d "$artist" ]; then
    pushd "$artist"
    for album in *; do
    find "$album" -name '*.mp3' -o -name '*.m4a' > "$artist - $album.m3u"
    done;
    popd
    fi;
    done;

    That should make .m3u files for each album, or so I reckon.

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘General Discussion’ is closed to new topics and replies.