Fandom

Music Player Daemon Community Wiki

Hack:mpc playlist

525pages on
this wiki
Add New Page
Talk2 Share
#!/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 $_");
  }
}

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.

Also on Fandom

Random Wiki