Wikia

Music Player Daemon Community Wiki

Hack:mpc playlist

525pages on
this wiki
Talk2
#!/usr/bin/perl
# mpc_playlist
# by Niklas Hofer , alzhaimer AT gmx DOT net
# uses mpc to add playlists beginning with special char
# Settings ! please modify !
$playlistdir = '/usr/local/share/mp3/playlists/';
## the begins here
$first=shift || die "you must specify some of the first chars of a playlist\n";
@files=sort <$playlistdir/*.m3u>;
foreach (@files) {
  chomp;
  s/^.+\///;
  if (/^$first/) {
    s/\.m3u$//;
    system("mpc load $_");
  }
}

Around Wikia's network

Random Wiki