Option to create dynamic playlists?

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • #857

    mt-daapd 0.2.4

    Is there a way to create dynamic playlists with Artist, Album or any other attribute?

    For example, we can create a playlist by specifying:

    "Beck" {
    Artist is "Beck"

    But, is there a way to do it with something like:

    $ARTIST {
    Artist is $ARTIST

    I don’t see anything like that in the docs.

    Is it possible?


    seeing as 0.2.4 is rather old, Id suggest you upgrade to one of the nightlies, especially since the ‘smart’ playlist handling has changed quite a bit.

    Your request is kinda intriguing though. 🙂

    With $ARTIST the request seems rather silly tbh, because one can just browse by artist, assuming you use a soundbridge…?

    Or maybe Im just getting it all plain wrong. 😉


    No, my request might be silly, I am still new to this, so it’s entirely possible.

    I prefer to see lists broken down. True you can sort by artist and album, but it would be nice to create a playlist for an artist or for an album.

    I’ll check out a newer version.


    I wrote a quick script to take care of that, I’m not sure if it’s usefull. It prints the playlist to the stdout.

    You will need to install the MP3::Info perl module before you can use the script.

    Just: # cpan install MP3::Info

    So I can currently:
    ./playlist.pl /media/music/ ARTIST > /etc/mt-daapd.playlist
    ./playlist.pl /media/music/ ALBUM > /etc/mt-daapd.playlist

    #!/usr/bin/perl -w
    use strict;
    use MP3::Info;

    my %playlistdata;

    unless (@ARGV && @ARGV == 2){
    print "Please specify the path and attributen";
    print "ex. ./playlist.pl /media/mp3 ARTISTn";

    unless (-d $ARGV[0]){
    print "Invalid directory given: $ARGV[0]n";

    unless ( $ARGV[1] eq "ARTIST" || $ARGV[1] eq "ALBUM" ){
    print "Invalid attrib given $ARGV[1]n";
    print "Specify either ARTIST or ALBUMn";

    chomp(my @mp3s = `find $ARGV[0] -iname *.mp3`);
    die "There was an error with the find commandn" if $? != 0;;

    foreach my $mp3 (@mp3s){
    my $tag = get_mp3tag($mp3) or next;
    $playlistdata{$tag->{$ARGV[1]}} = $tag->{"ARTIST"} if !$playlistdata{$tag->{$ARGV[1]}};

    foreach my $data (keys %playlistdata){
    print qq|"$data" { $ARGV[1] is "$data" }n| if $ARGV[1] eq "ARTIST";
    print qq|"$data - $playlistdata{$data}" { $ARGV[1] is "$data" }n| if $ARGV[1] eq "ALBUM";
Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘General Discussion’ is closed to new topics and replies.